Remove "f=" Place in Topic URLs

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
User avatar
halil16
Registered User
Posts: 1266
Joined: Fri Jul 24, 2020 11:30 pm
Location: Turkiye
Name: Halil
Contact:

Remove "f=" Place in Topic URLs

Post by halil16 »

Hi,
I want the links in my forum to be the same as what Google indexed. For this reason, I want to change the topic URLs. Is it possible to lift the thick place below? After all, these URL actually exist.

/viewtopic.php?f=133&t=1099
>
/viewtopic.php?t=1099

Best regards.
Last edited by thecoalman on Sun Apr 11, 2021 2:23 am, edited 1 time in total.
Reason: Moved to custom coding
* Hire me at fiverr for your phpBB board.
"The day we will need ideas more than possessions, we will find the secret to true wealth." - Peyami Safa
I'm learning English...
Contributions: #Hashtag, Elegance, Latte
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Remove "f=" Place in Topic URLs

Post by david63 »

There is nothing in the core of phpBB that would achieve that - you will either need an extension or quite a bit of custom coding.

The problem with trying to do something like that is that it is pretty much irreversible and you could end up not being able to access your board.

Personally I cannot see what difference it will make to anything - Google does not seem to have a problem with indexing phpBB sites.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52768
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Remove "f=" Place in Topic URLs

Post by stevemaury »

You would be spending a lot of time for zero benefit.
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
User avatar
halil16
Registered User
Posts: 1266
Joined: Fri Jul 24, 2020 11:30 pm
Location: Turkiye
Name: Halil
Contact:

Re: Remove "f=" Place in Topic URLs

Post by halil16 »

I understand. The reason is Adsense. The URL must be visited and crawled by bots to show ads. I wanted the current URL to stay the same as Google crawled, unchanged. Also so that the URL does not disappear when I move a topic to another forum.

Anyway. I just wondered if it could be done. Thank you very much for your answers.

The fact that you and phpBB can do anything can sometimes lead to excessive ideas. :)

Best regards.
* Hire me at fiverr for your phpBB board.
"The day we will need ideas more than possessions, we will find the secret to true wealth." - Peyami Safa
I'm learning English...
Contributions: #Hashtag, Elegance, Latte
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 5871
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Remove "f=" Place in Topic URLs

Post by thecoalman »

david63 wrote: Sat Apr 10, 2021 8:35 pm
The problem with trying to do something like that is that it is pretty much irreversible and you could end up not being able to access your board.

Personally I cannot see what difference it will make to anything - Google does not seem to have a problem with indexing phpBB sites.
The only thing the f parameter is used for on topic links I'm aware of is the "Users browsing this forum" list. Removing it wouldn't have any effect other than rendering "Users browsing this forum" useless, I believe it would also affect the "forum location" listing for the who is online list.

The fact that Google can index both is the problem whether it's related to indexing or ads. If you look in the head tags for a topic there is canonical url set which tells the SE what the base url is that contains no f parameter.
<link rel="canonical" href="https://www.phpbb.com/community/viewtopic.php?t=12345">

Typical usage is the main published links on site match the canonical url , links on that page may have links with other parameters for sorting etc. When a bot follows one of those links from the page or somewhere else the page with the extra parameters should have canonical URL of base page if it's basically same content, e.g. sorting. You are telling the bot don't index this as it's duplicate content. phpBB's usage is a bit backwards because the canonical URL's used in the head tags are published no where on the site. Minimally the impact is a SE may be utilizing both their resources and server resources downloading the duplicate URL's when the bot could spend that time indexing new content or reindexing old content.

As a side note there in one benefit to this parameter as far as bots go. You can use it as wildcard in robots.txt to prevent a bot from trying to download topics they do not have permission too.
stevemaury wrote: Sat Apr 10, 2021 8:37 pm You would be spending a lot of time for zero benefit.
As far as Adsense goes although a small one this can be an issue, as halil16 noted they may not display ad when the URL changes. You would need to wait for the Adsense bot to reindex it only for it to find it's a duplicate of the canonical URL. It's another source of duplicate content. If you remove the f parameter from the published links that are going to get indexed first it never changes when topic is moved etc.
Last edited by thecoalman on Mon Apr 12, 2021 6:18 pm, edited 3 times in total.
Reason: Edited to make clearer
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Remove "f=" Place in Topic URLs

Post by 3Di »

Eliminate redundant f= and t= parameters from board urls is in fact already planned and the PR is ready to be merged.

https://tracker.phpbb.com/browse/PHPBB3-16138
https://github.com/phpbb/phpbb/pull/5760
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
halil16
Registered User
Posts: 1266
Joined: Fri Jul 24, 2020 11:30 pm
Location: Turkiye
Name: Halil
Contact:

Re: Remove "f=" Place in Topic URLs

Post by halil16 »

About not seeing which forum the user is on... I tried it on my forum. It accurately indicates which forum the user is on.

Also thank you very much for your support.
3Di wrote: Sun Apr 11, 2021 7:11 am Eliminate redundant f= and t= parameters from board urls is in fact already planned and the PR is ready to be merged.

https://tracker.phpbb.com/browse/PHPBB3-16138
https://github.com/phpbb/phpbb/pull/5760
As far as I understand this is a pending patch. It is nice that it will come soon. Thanks. Is there anything I can do?
* Hire me at fiverr for your phpBB board.
"The day we will need ideas more than possessions, we will find the secret to true wealth." - Peyami Safa
I'm learning English...
Contributions: #Hashtag, Elegance, Latte
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53400
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Remove "f=" Place in Topic URLs

Post by Brf »

thecoalman wrote: Sun Apr 11, 2021 2:22 am
The only thing the f parameter is used for on topic links I'm aware of is the "Users browsing this forum" list.
Isn't it still used for Global Announcement permissions? or is that use obsolete?
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 5871
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Remove "f=" Place in Topic URLs

Post by thecoalman »

Brf wrote: Mon Apr 12, 2021 4:06 pm Isn't it still used for Global Announcement permissions? or is that use obsolete?
As I recall there was a bug related to Global Announcements. When you set as Global it would remove the original forum ID and select the top forum, if that forum for example was a private forum it would take on those permissions. I don't think that had anything to do with the f parameter.

Just checked on my own forum and a Global works with or without f parameter.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53400
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Remove "f=" Place in Topic URLs

Post by Brf »

It must have been way back in 3.0.
I remembered the the "f=" parameter was set to the original forum the global announcement came from, so it could be used for permissions.
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 5871
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Remove "f=" Place in Topic URLs

Post by thecoalman »

That was many years ago but the only thing I can think of somewhat related. I'm an elephant. :D
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Remove "f=" Place in Topic URLs

Post by 3Di »

halil16 wrote: Sun Apr 11, 2021 10:17 am About not seeing which forum the user is on... I tried it on my forum. It accurately indicates which forum the user is on.
...
Is there anything I can do?
Well, there it was one bug I noticed in 3.1.x which it was the "ghost users" one.

See: Online user list fails on notifications - https://tracker.phpbb.com/browse/PHPBB3-15060

It seems like it was fixed but I haven't had the time to really check it out. Do you volunteer?
See my comment here: https://tracker.phpbb.com/browse/PHPBB3 ... ment-59508
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Remove "f=" Place in Topic URLs

Post by 3Di »

Brf wrote: Mon Apr 12, 2021 4:06 pm ...
Isn't it still used for Global Announcement permissions? or is that use obsolete?
This has been fixed in 3.2.2 - https://github.com/phpbb/phpbb/pull/5012

But see the above post of mine since is related.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
halil16
Registered User
Posts: 1266
Joined: Fri Jul 24, 2020 11:30 pm
Location: Turkiye
Name: Halil
Contact:

Re: Remove "f=" Place in Topic URLs

Post by halil16 »

Any progress on the subject?
* Hire me at fiverr for your phpBB board.
"The day we will need ideas more than possessions, we will find the secret to true wealth." - Peyami Safa
I'm learning English...
Contributions: #Hashtag, Elegance, Latte
Post Reply

Return to “phpBB Custom Coding”