mod rewrite 0.2.2 and Extended Similar topics

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

mod rewrite 0.2.2 and Extended Similar topics

Postby SF » Mon Feb 19, 2007 6:06 am

Hello

I used adv. mod rewrite 0.0.2, and somwere here, i found installation mod rewrite for "Extended Similar topics".

Now, i have updrade to adv. rew 0.2.2, and i cannot find installation for "Extended Similar topics", nowhere in this board.

Can someone help me? Extended Similar topics very good mod, which need only 1 sql queries (original Similar Topics need 5 queries for 5 topics)...

http://www.phpbb.com/styles/forum/viewt ... ?p=2029135

Thanks/Merci!
SF
 
Posts: 7
Joined: Sun Jan 21, 2007 11:53 pm

Advertisement

Postby HB » Mon Feb 19, 2007 1:27 pm

Perhaps you think of the patch to related topics?
Dan Kehn
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1211
Joined: Mon Oct 16, 2006 2:25 am

Postby SF » Tue Feb 20, 2007 1:25 am

No, this is Extended Similar topics.
SF
 
Posts: 7
Joined: Sun Jan 21, 2007 11:53 pm

Postby HB » Tue Feb 20, 2007 2:32 am

Yes, I understand, but the patch is essentially the same except for the code placement.

Recall that the append_sid method refers to phpbb_seo, a global class instance that does the remapping. It maintains a table that maps topic ids to topic titles; your code additions cache these topic / topic id entries in the global so they'll be properly mapped.

I've not tested the changes below, but I believe they're correct. Open similar_topics.php and find:

Code: Select all
if ( !defined('IN_PHPBB') )
{
   die("Hacking attempt");
}


Add after:
Code: Select all
   // www.phpBB-SEO.com SEO TOOLKIT BEGIN
   global $phpbb_seo;
   // www.phpBB-SEO.com SEO TOOLKIT END


Find:
Code: Select all
      //
      // Censor topic title
      //
      if ( count($orig_word) )
      {
         $similar['topic_title'] = @preg_replace($orig_word, $replacement_word, $similar['topic_title']);
      }


Add after:

Code: Select all
      // www.phpBB-SEO.com SEO TOOLKIT BEGIN
      $phpbb_seo->seo_url['topic'][$similar['topic_id']] = $phpbb_seo->format_url($similar['topic_title']);
      // www.phpBB-SEO.com SEO TOOLKIT END
Dan Kehn
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1211
Joined: Mon Oct 16, 2006 2:25 am

Postby SF » Tue Feb 20, 2007 3:37 am

HB
Thanks! All works perfect!
SF
 
Posts: 7
Joined: Sun Jan 21, 2007 11:53 pm


Return to phpBB2 Advanced mod Rewrite

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 3 guests