Topic nav not rewritten

phpBB2 SEO Advanced mod Rewrite support forum.
This mods performs URL rewriting for phpBB, injecting categories, forums and topic titles in their URLs.

Moderator: Moderators


Topic nav not rewritten

Postby zinnerz » Wed Jan 31, 2007 8:54 pm

Hi Dcz,

I found that topic navigation is not rewritten:

Image

:)
zinnerz
PR0
PR0
 
Posts: 76
Joined: Thu Jun 08, 2006 7:25 am

Advertisement

Postby dcz » Wed Jan 31, 2007 9:26 pm

This is on purpose.

Because it would mean two sql query per topic page to rewrite them properly, as you need to find out both next and previous topic info, which is why phpBB does not directly link to the next and previous topics.
So there is no real need to set up a new rewritten url type for links you should end up http 301 redirecting with the zero dupe, as they are originally a great source of duplicates.

So leaving these urls untouched is saving resources and the default robots.txt is disallowing them so ...

You could as here only show them to logged users if you prefer, but SEO wise, it's in all cases a link to disallow.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 19926
Joined: Fri Apr 28, 2006 9:03 pm

Postby zinnerz » Wed Jan 31, 2007 10:07 pm

Nice idea :wink:
Thanks Dcz for the info..
zinnerz
PR0
PR0
 
Posts: 76
Joined: Thu Jun 08, 2006 7:25 am

Postby zinnerz » Wed Jan 31, 2007 10:24 pm

Btw what is the code to mark a link in purpose to show for members only?
zinnerz
PR0
PR0
 
Posts: 76
Joined: Thu Jun 08, 2006 7:25 am

Postby dcz » Wed Jan 31, 2007 10:47 pm

You can do the following :

Code: Select all
#
#-----[ OPEN ]------------------------------------------
#


viewtopic.php


#
#-----[ FIND ]------------------------------------------
#

$view_prev_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=previous");
$view_next_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=next");

//
// Mozilla navigation bar
//
$nav_links['prev'] = array(
   'url' => $view_prev_topic_url,
   'title' => $lang['View_previous_topic']
);
$nav_links['next'] = array(
   'url' => $view_next_topic_url,
   'title' => $lang['View_next_topic']
);


#
#-----[ REPLACE WITH ]------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if ($userdata['session_logged_in']) {
$view_prev_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=previous");
$view_next_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=next");

//
// Mozilla navigation bar
//
$nav_links['prev'] = array(
   'url' => $view_prev_topic_url,
   'title' => $lang['View_previous_topic']
);
$nav_links['next'] = array(
   'url' => $view_next_topic_url,
   'title' => $lang['View_next_topic']
);
}
// www.phpBB-SEO.com SEO TOOLKIT END

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM


Will get rid of the same links in Mozilla navigation bar as well for guest
;)
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 19926
Joined: Fri Apr 28, 2006 9:03 pm


Return to phpBB2 Advanced mod Rewrite

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 1 guest


 
cron