New "f" tag for viewtopic?
Forum rules
Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here. Feature requests are closed.
Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here. Feature requests are closed.
Re: New "f" tag for viewtopic?
If you get rid of the 'f', you loose the 'First unread post' link, and you aren't logged as currently reading the forum the topic is in.
Re: New "f" tag for viewtopic?
Maybe could it be activated only for normal users, and not for bots ?
-
- Registered User
- Posts: 7
- Joined: Sat Jan 06, 2007 2:01 am
Re: New "f" tag for viewtopic?
It's odd that no one thought of this when developing 3.0...
PHPBB2 points to viewtopic.php?t=100.... then another website links to viewtopic.php?t=100... Google says great, this page get's 2 points.
Then you convert to PHPBB3, and suddenly viewtopic.php?t=100 is now viewtopic.php?f=1&t=100 but the external link is still pointing to the viewtopic.php?t=100....
Google comes along and see's two pages, gives each 1 point and drops one from the listing. To compound the issue, if Google maintains the PHPBB2 standard url format, it will continue to gain PR.
Enough of this duplicate content could cause Google to mark a penalty against a site.
Unfortunately I'm not very technically inclined when it comes to PHP, but the simpliest thing to do would be, rather then showing the page when the phpbb2 url is accessed to actually redirect it via a 301 redirect in the header of the software. (like we used to do with deleted posts on PHPBB2). Then Google would come along and see the 301, realize the page has a new URL and everybody is happy.
PHPBB2 points to viewtopic.php?t=100.... then another website links to viewtopic.php?t=100... Google says great, this page get's 2 points.
Then you convert to PHPBB3, and suddenly viewtopic.php?t=100 is now viewtopic.php?f=1&t=100 but the external link is still pointing to the viewtopic.php?t=100....
Google comes along and see's two pages, gives each 1 point and drops one from the listing. To compound the issue, if Google maintains the PHPBB2 standard url format, it will continue to gain PR.
Enough of this duplicate content could cause Google to mark a penalty against a site.
Unfortunately I'm not very technically inclined when it comes to PHP, but the simpliest thing to do would be, rather then showing the page when the phpbb2 url is accessed to actually redirect it via a 301 redirect in the header of the software. (like we used to do with deleted posts on PHPBB2). Then Google would come along and see the 301, realize the page has a new URL and everybody is happy.
- Nicholas the Italian
- Registered User
- Posts: 659
- Joined: Mon Nov 20, 2006 11:19 pm
- Location: 46°8' N, 12°13' E
- Contact:
Re: New "f" tag for viewtopic?
If you think it's that important, let them know: bug tracker.
-
- Registered User
- Posts: 7
- Joined: Sat Jan 06, 2007 2:01 am
Re: New "f" tag for viewtopic?
I don't know if there's a truly "great" workaround without initiating alot more code. From what I can tell (I'm no programmer), viewtopic doesn't have the ability to distinguish what forum it's in? It would need to be able to do that in order to redirect to the correct url. (tell me if I'm wrong).
I got this code to work I took from the old deleted phpbb topic mod... it wouldn't be a good idea to initiate this on immediate conversion from phpbb2 to phpbb3 but after a month or so, and Google has come along and re-indexed everything... it should work, as it will point all old page rank to the front page.
I got this code to work I took from the old deleted phpbb topic mod... it wouldn't be a good idea to initiate this on immediate conversion from phpbb2 to phpbb3 but after a month or so, and Google has come along and re-indexed everything... it should work, as it will point all old page rank to the front page.
Code: Select all
// We overwrite $_REQUEST['f'] if there is no forum specified
// to be able to display the correct online list.
// One downside is that the user currently viewing this topic/post is not taken into account.
if (empty($_REQUEST['f']) && empty($_REQUEST['p']))
{
header("Status: 301 Moved Permanently", false, 301);
header("Location: http://yourforumindex.com/");
exit();
}
Last edited by ascensions on Mon Jul 02, 2007 6:14 pm, edited 1 time in total.
Re: New "f" tag for viewtopic?
Or, indeed, you could run a query to find out the forum ID, and then redirect to the *correct* url, meaning that search engines and users don't get thrown back to the index for no apparent reason.
-
- Registered User
- Posts: 7
- Joined: Sat Jan 06, 2007 2:01 am
Re: New "f" tag for viewtopic?
If I was only smart enough to do that!
-
- Registered User
- Posts: 40
- Joined: Fri Jan 30, 2004 2:43 pm
- Location: Kiev, Ukraine
- Contact:
Re: New "f" tag for viewtopic?
That's a really smart way on handling things. Another idea for this mod is redirecting ?p= requests to appropriate ?f&t requests.the_dan wrote:Or, indeed, you could run a query to find out the forum ID, and then redirect to the *correct* url, meaning that search engines and users don't get thrown back to the index for no apparent reason.
-
- Registered User
- Posts: 7
- Joined: Sat Jan 06, 2007 2:01 am
Re: New "f" tag for viewtopic?
Well I've been using this mod for a few weeks, and it works beautifully. The old URLs are disappearing and the news ones are showing up in index....
I did have to have one aggregator modify their code because of the 2 variables on the end... and I think that's going to be a problem for alot of PHPBB'ers... they should have left it just one variable. Now if someone passes the URL unencoded, as often lazy webmasters do, you'll lose the second variable, and of course that will cause nothing to work.
Not that it will make an difference, but I'd certainly like to voice my opinion that PHPBB should lose the second variable by the time it's "fully" released. Certainly the forum could be configured without the passing of the variable....
Until then, this looks like the next best option.
I did have to have one aggregator modify their code because of the 2 variables on the end... and I think that's going to be a problem for alot of PHPBB'ers... they should have left it just one variable. Now if someone passes the URL unencoded, as often lazy webmasters do, you'll lose the second variable, and of course that will cause nothing to work.
Not that it will make an difference, but I'd certainly like to voice my opinion that PHPBB should lose the second variable by the time it's "fully" released. Certainly the forum could be configured without the passing of the variable....
Until then, this looks like the next best option.
-
- Registered User
- Posts: 7
- Joined: Sat Jan 06, 2007 2:01 am
Re: New "f" tag for viewtopic?
I worked on it a bit longer, and indeed viewtopic already does pull the forum id..... we just need to redirect it... I thought I'd post it here for others. Thanks for listening to me! (again not a programmer, so syntax might be off, but it works)
Code: Select all
// 301 Redirect PHPBB 2 posts to PHPBB 3
$bb2url=$phpbb_root_path.'viewtopic.php?f=' . $forum_id. '&t=' . $topic_id;
if (empty($_REQUEST['f']) && empty($_REQUEST['p']))
{ header("Status: 301 Moved Permanently", false, 301);
header("Location: $bb2url ");
exit();
}