Advanced phpBB3 SEO mod for phpbb3.0.1 ?

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

Moderator: Moderators

Advanced phpBB3 SEO mod for phpbb3.0.1 ?

Postby tomhank » Thu Dec 11, 2008 9:58 am

Hello,

I'm using phpbb3.0.1, for several reasons so I do not update them on new versions.
I have searched for and do not see this mod package for phpbb3.0.1
I'd like to use this mod package, please help

Thanks a lot
tomhank
 
Posts: 9
Joined: Thu Dec 11, 2008 9:23 am

Advertisement

Postby SeO » Thu Dec 11, 2008 10:06 am

mm this could be tough because we do not maintain old versions.

What you could try to do, since the changes where minor between 0.4.4 and 0.4.6 and since 0.4.4 should still be compatible with 3.0.1 is the following :

Download the 0.4.6 and install it. Once done, just perform the 0.4.4 to 0.4.6 update backward every time you see the the generate_link_hash() function (introduced in 3.0.3) or the hash= something get var in the code to replace.

This way you should en up with a 0.4.6 compatible with 3.0.1. I encourage you to test this locally to be able to report about error before you go online.

The same procedure should work with the zero duplicate, adding the uid get var in the lines to skip.
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby tomhank » Fri Dec 12, 2008 8:34 am

hello,
I have a problem, open includes/functions_display.php, I do not find the command line
Code: Select all
         $group_name = (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']);


but I found the following

Code: Select all
   while ($row = $db->sql_fetchrow($result))
   {
      if (!empty($row['user_id']))
      {
         $forum_moderators[$row['forum_id']][] = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);
      }
      else
      {
         $forum_moderators[$row['forum_id']][] = '<a' . (($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . ';"' : '') . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id']) . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</a>';
      }
   }
   $db->sql_freeresult($result);


Open index.php, do not find the command line

Code: Select all
      $legend[] = '<a' . $colour_text . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id']) . '">' . $group_name . '</a>';


but I found the following:

Code: Select all
$legend = '';
while ($row = $db->sql_fetchrow($result))
{
   $colour_text = ($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . '"' : '';

   if ($row['group_name'] == 'BOTS')
   {
      $legend .= (($legend != '') ? ', ' : '') . '<span' . $colour_text . '>' . $user->lang['G_BOTS'] . '</span>';
   }
   else
   {
      $legend .= (($legend != '') ? ', ' : '') . '<a' . $colour_text . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id']) . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</a>';
   }
}
$db->sql_freeresult($result);


How to fix ?
Thank a lot
tomhank
 
Posts: 9
Joined: Thu Dec 11, 2008 9:23 am

Postby SeO » Fri Dec 12, 2008 8:43 am

Oh yes, the code to find changed for groups, but not the code to add, so in functions_display.php, you need to :
Code: Select all
#
#-----[ FIND ]------------------------------------------
#

         $forum_moderators[$row['forum_id']][] = '<a' . (($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . ';"' : '') . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id']) . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</a>';

#
#-----[ BEFORE, ADD ]------------------------------------------
#

         // www.phpBB-SEO.com SEO TOOLKIT BEGIN
         if ( $phpbb_seo->seo_opt['profile_inj'] && empty($phpbb_seo->seo_url['group'][$row['group_id']]) ) {
            $phpbb_seo->seo_url['group'][$row['group_id']] = $phpbb_seo->format_url($row['group_name'], $phpbb_seo->seo_static['group']);
         }
         // www.phpBB-SEO.com SEO TOOLKIT END


Then in index.php :
Code: Select all
#
#-----[ FIND ]------------------------------------------
#

      $legend .= (($legend != '') ? ', ' : '') . '<a' . $colour_text . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id']) . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</a>';

#
#-----[ BEFORE, ADD ]------------------------------------------
#

      // www.phpBB-SEO.com SEO TOOLKIT BEGIN
      if ( $phpbb_seo->seo_opt['profile_inj'] && empty($phpbb_seo->seo_url['group'][$row['group_id']]) ) {
         $phpbb_seo->seo_url['group'][$row['group_id']] = $phpbb_seo->format_url($row['group_name'], $phpbb_seo->seo_static['group']);
      }
      // www.phpBB-SEO.com SEO TOOLKIT END


And in memberlist.php (was added in 0.4.6) :
Code: Select all
#
#-----[ FIND ]------------------------------------------
#

            $group_name = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];

#
#-----[ AFTER, ADD ]------------------------------------------
#

            // www.phpBB-SEO.com SEO TOOLKIT BEGIN
            if ( $phpbb_seo->seo_opt['profile_inj'] && empty($phpbb_seo->seo_url['group'][$row['group_id']]) ) {
               $phpbb_seo->seo_url['group'][$row['group_id']] = $phpbb_seo->format_url($row['group_name'], $phpbb_seo->seo_static['group']);
            }
            // www.phpBB-SEO.com SEO TOOLKIT END


I still encourage you to update because it will only get worst in the future, but here you go ;)
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby tomhank » Sun Dec 14, 2008 11:54 am

mm I have upgraded phpbb3.0.1 up phpbb3.0.2, and I use Advanced phpBB3 SEO mod Rewrite V 0.4.4
when I View a forum
and errors have occurred

Code: Select all
Fatal error: Call to undefined function generate_forum_nav() in /home/cungband/public_html/testformod/viewforum.php on line 130


How to fix?

Regards
Last edited by tomhank on Sun Dec 14, 2008 4:16 pm, edited 1 time in total.
tomhank
 
Posts: 9
Joined: Thu Dec 11, 2008 9:23 am

Postby tomhank » Sun Dec 14, 2008 4:15 pm

sorry, I have fix,

I was confused between [ AFTER, ADD ] and [ REPLACE WITH ]
Code: Select all
#-----[ OPEN ]------------------------------------------
#

viewforum.php

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

include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

#
#-----[ AFTER, ADD ]------------------------------------------
#

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if (empty($_REQUEST['f'])) {
   $phpbb_seo->get_forum_id($session_forum_id);
   if ($session_forum_id == 0) {
      header('HTTP/1.1 404 Not Found');
   } else {
      $_REQUEST['f'] = (int) $session_forum_id;
   }
}
// www.phpBB-SEO.com SEO TOOLKIT END
tomhank
 
Posts: 9
Joined: Thu Dec 11, 2008 9:23 am


Return to Advanced SEO URL

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 4 guests