phpbb3 seo mod bug?

Discussions and support about the different URL Rewriting techniques for phpBB.

Moderator: Moderators

phpbb3 seo mod bug?

Postby apeee » Sat Jan 05, 2008 8:27 pm

Hi!

I didn't notice this until I saw it in my google webmaster tool sitemap. Please check the page http://phpbb3.phpbb-seo.net/administrators-g5.html and http://phpbb3.phpbb-seo.net/global-moderators-g4.html . You will find a blue bar just below Global moderators and Administrators with text links saying "Group leader, Ranks, Posts, Websites, Location, Joined" all of which, sadly to say, point to 404 page.

I hope this is a small bug which can be repaired easily.

Rgds
apeee
PR0
PR0
 
Posts: 60
Joined: Tue Nov 06, 2007 11:47 am

Advertisement

Postby dcz » Sun Jan 06, 2008 12:34 pm

Jeez, a bug !

phpBB3 does not use the append_sid() function on all links fully, that's why.

So the fix is easy and will be included in the next update, open memberlist.php and find :
Code: Select all
      $sort_url = append_sid("{$phpbb_root_path}memberlist.$phpEx", implode('&', $sort_params));


After add :
Code: Select all
      // www.phpBB-SEO.com SEO TOOLKIT BEGIN
      $seo_saparator = strpos($sort_url, '?') === false ? '?' : '&';
      // www.phpBB-SEO.com SEO TOOLKIT END


Find :

Code: Select all
         'U_SORT_USERNAME'      => $sort_url . '&sk=a&sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_SORT_FROM'         => $sort_url . '&sk=b&sd=' . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_SORT_JOINED'         => $sort_url . '&sk=c&sd=' . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_SORT_POSTS'         => $sort_url . '&sk=d&sd=' . (($sort_key == 'd' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_SORT_EMAIL'         => $sort_url . '&sk=e&sd=' . (($sort_key == 'e' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_SORT_WEBSITE'      => $sort_url . '&sk=f&sd=' . (($sort_key == 'f' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_SORT_LOCATION'      => $sort_url . '&sk=b&sd=' . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_SORT_ICQ'         => $sort_url . '&sk=g&sd=' . (($sort_key == 'g' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_SORT_AIM'         => $sort_url . '&sk=h&sd=' . (($sort_key == 'h' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_SORT_MSN'         => $sort_url . '&sk=i&sd=' . (($sort_key == 'i' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_SORT_YIM'         => $sort_url . '&sk=j&sd=' . (($sort_key == 'j' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_SORT_ACTIVE'         => ($auth->acl_get('u_viewonline')) ? $sort_url . '&sk=l&sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a') : '',
         'U_SORT_RANK'         => $sort_url . '&sk=m&sd=' . (($sort_key == 'm' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_LIST_CHAR'         => $sort_url . '&sk=a&sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a'),


replace with :

Code: Select all
         // www.phpBB-SEO.com SEO TOOLKIT BEGIN
         'U_SORT_USERNAME'      => $sort_url . $seo_saparator . 'sk=a&sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_SORT_FROM'         => $sort_url . $seo_saparator . 'sk=b&sd=' . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_SORT_JOINED'         => $sort_url . $seo_saparator . 'sk=c&sd=' . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_SORT_POSTS'         => $sort_url . $seo_saparator . 'sk=d&sd=' . (($sort_key == 'd' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_SORT_EMAIL'         => $sort_url . $seo_saparator . 'sk=e&sd=' . (($sort_key == 'e' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_SORT_WEBSITE'      => $sort_url . $seo_saparator . 'sk=f&sd=' . (($sort_key == 'f' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_SORT_LOCATION'      => $sort_url . $seo_saparator . 'sk=b&sd=' . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_SORT_ICQ'         => $sort_url . $seo_saparator . 'sk=g&sd=' . (($sort_key == 'g' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_SORT_AIM'         => $sort_url . $seo_saparator . 'sk=h&sd=' . (($sort_key == 'h' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_SORT_MSN'         => $sort_url . $seo_saparator . 'sk=i&sd=' . (($sort_key == 'i' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_SORT_YIM'         => $sort_url . $seo_saparator . 'sk=j&sd=' . (($sort_key == 'j' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_SORT_ACTIVE'         => ($auth->acl_get('u_viewonline')) ? $sort_url . $seo_saparator . 'sk=l&sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a') : '',
         'U_SORT_RANK'         => $sort_url . $seo_saparator . 'sk=m&sd=' . (($sort_key == 'm' && $sort_dir == 'a') ? 'd' : 'a'),
         'U_LIST_CHAR'         => $sort_url . $seo_saparator . 'sk=a&sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a'),
         // www.phpBB-SEO.com SEO TOOLKIT BEGIN



The way things are done would make it hard to run the zero dupe in strict mode, but it's not very important here, so for the zero dupe, just add :
Code: Select all
         $phpbb_seo->seo_opt['zero_dupe']['strict'] = false;

Before :
Code: Select all
         $phpbb_seo->seo_chk_dupe($phpbb_seo->seo_path['uri'], $phpbb_seo->page_url);


and everything will work fine. This code is online on the demo board ;)
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: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Postby apeee » Mon Jan 07, 2008 6:03 pm

It works fine. Currently I'm using strict mode. Should I need to change it when I apply the above codes to memberlist.php??

And.......
At http://phpbb3.phpbb-seo.net/member/SeO you will find Most active topic which doesn't shows .html url although which redirects to actual page. Not a bug but fix would be appreciated. I think a very small change can fix it.
apeee
PR0
PR0
 
Posts: 60
Joined: Tue Nov 06, 2007 11:47 am

Postby dcz » Wed Jan 09, 2008 12:51 pm

I'll look into the most active topic.

About the zero dupe, the fix bypasses the zero dupe strict option, so it will not apply the strict mode in this case whatever your general setting.

++
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: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Re: phpbb3 seo mod bug?

Postby samysoft » Sun Jul 11, 2010 1:48 pm

Hello I'm new to you and love is all useful topics that learning from them
samysoft
 
Posts: 5
Joined: Sun Jul 11, 2010 1:37 pm


Return to phpBB mod Rewrite

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 3 guests