phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
mod rewrite 0.2.2 and Extended Similar topics

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB mod Rewrite  » Advanced mod Rewrite
::  
Author Message
SF



Joined: 21 Jan 2007
Posts: 6

mod rewrite 0.2.2 and Extended Similar topicsPosted: Mon Feb 19, 2007 6:06 am    Post subject: mod rewrite 0.2.2 and Extended Similar topics

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/viewtopic.php?p=2029135

Thanks/Merci!
Back to top
HB
phpBB SEO Team
phpBB SEO Team


Joined: 16 Oct 2006
Posts: 809

mod rewrite 0.2.2 and Extended Similar topicsPosted: Mon Feb 19, 2007 1:27 pm    Post subject: Re: mod rewrite 0.2.2 and Extended Similar topics

Perhaps you think of the patch to related topics?

_________________
Dan Kehn
Back to top
Visit poster's website
SF



Joined: 21 Jan 2007
Posts: 6

mod rewrite 0.2.2 and Extended Similar topicsPosted: Tue Feb 20, 2007 1:25 am    Post subject: Re: mod rewrite 0.2.2 and Extended Similar topics

No, this is Extended Similar topics.
Back to top
HB
phpBB SEO Team
phpBB SEO Team


Joined: 16 Oct 2006
Posts: 809

mod rewrite 0.2.2 and Extended Similar topicsPosted: Tue Feb 20, 2007 2:32 am    Post subject: Re: mod rewrite 0.2.2 and Extended Similar topics

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:
if ( !defined('IN_PHPBB') )
{
   die("Hacking attempt");
}


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


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


Add after:

Code:
      // 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
Back to top
Visit poster's website
SF



Joined: 21 Jan 2007
Posts: 6

mod rewrite 0.2.2 and Extended Similar topicsPosted: Tue Feb 20, 2007 3:37 am    Post subject: Re: mod rewrite 0.2.2 and Extended Similar topics

HB
Thanks! All works perfect!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB mod Rewrite  » Advanced mod Rewrite
Page 1 of 1

Navigation Similar Topics

Jump to: