[Add On] Last msg mxBB module mod Rewrite

Discussion about mxBB PORTAL. How to get the best from this handy portal.

Moderator: Moderators


[Add On] Last msg mxBB module mod Rewrite

Postby dcz » Fri May 26, 2006 11:40 am

hello,

So this was found in the french board, it will allow the last message mxBB module to output mod rewritten URL.

For the phpBB SEO Advanced mod rewrite just apply all of the following code, for the mixed, just aply the code concerning $seo_forum_name and to not copy the line (or the part of the line) with $seo_topic_name, for Simple mod rewrite, well it's already working so ... :

Open:
Code: Select all
modules/mx_last_msg/mx_last_msg.php


Find:

Code: Select all
for($row_count = 0; $row_count < count($postrow); $row_count++)
{
  $row_color = ( !($row_count%2) ) ? $theme['td_color1'] : $theme['td_color2'];
  $row_class = ( !($row_count%2) ) ? $theme['td_class1'] : $theme['td_class2'];


  $message = $postrow[$row_count]['topic_title'];



After add :

Code: Select all
   // phpBB-SEO.com SEO TOOLKIT BEGIN
   $seo_forum_name = $postrow[$row_count]['forum_name'];
   $seo_topic_name = $message;
   // phpBB-SEO.com SEO TOOLKIT END


Find:

Code: Select all
   $url = append_sid( PHPBB_URL . 'viewtopic.php?t='.$postrow[$row_count]['topic_id'].'#'.$postrow[$row_count]['topic_last_post_id']);


Replace with :

Code: Select all
   $url = append_sid( PHPBB_URL . 'viewtopic.php?t='.$postrow[$row_count]['topic_id']);


Find:

Code: Select all
$template->pparse("body_last_msg");


Before add :

Code: Select all
// phpBB-SEO.com SEO TOOLKIT BEGIN
$seo_forum_name = $seo_topic_name = FALSE;
// phpBB-SEO.com SEO TOOLKIT END



And then, if you don't want the link to the last post to be rewritten, in order not to outpu any duplicate, please do the following also in the same file:

Find:
Code: Select all
  $url = append_sid( PHPBB_URL . 'viewtopic.php?t='.$postrow[$row_count]['topic_id'].'#'.$postrow[$row_count]['topic_last_post_id']);


After add :

Code: Select all
   // phpBB-SEO.com SEO TOOLKIT BEGIN
   $seo_topic_name = FALSE;
   // phpBB-SEO.com SEO TOOLKIT END


Enjoy :D
dcz
Administrateur - Site Admin
Administrateur - Site Admin
 
Posts: 17678
Joined: Fri Apr 28, 2006 9:03 pm

Advertisement

Postby Peter77 » Fri May 26, 2006 12:13 pm

Thank you very much for this... I didn't expect a fix for this so soon. seems like my site is now all SEO friendly... the phpbb links anyway. this is great. :D
User avatar
Peter77
phpBB SEO Team
phpBB SEO Team
 
Posts: 520
Joined: Wed May 10, 2006 9:46 am
Location: Michigan

Postby dcz » Fri May 26, 2006 12:17 pm

Peter77 wrote:Thank you very much for this... I didn't expect a fix for this so soon. seems like my site is now all SEO friendly... the phpbb links anyway. this is great. :D


hehe, you are welcome :D

Actually, this is liek the first proof we will take advantage of the two languages set up here at phpBB SEO, this was asked by a French member willing to work a bit on it, so that I was able to have him test several solutions before we found out the final fix.

No big deal then to "backport" it for the English speaking community :D

++
dcz
Administrateur - Site Admin
Administrateur - Site Admin
 
Posts: 17678
Joined: Fri Apr 28, 2006 9:03 pm

Postby Peter77 » Fri May 26, 2006 12:39 pm

dcz wrote:
Peter77 wrote:Thank you very much for this... I didn't expect a fix for this so soon. seems like my site is now all SEO friendly... the phpbb links anyway. this is great. :D


hehe, you are welcome :D

Actually, this is liek the first proof we will take advantage of the two languages set up here at phpBB SEO, this was asked by a French member willing to work a bit on it, so that I was able to have him test several solutions before we found out the final fix.

No big deal then to "backport" it for the English speaking community :D

++


Wow, well thanks to this member also... it is very much appreicated.
:)
User avatar
Peter77
phpBB SEO Team
phpBB SEO Team
 
Posts: 520
Joined: Wed May 10, 2006 9:46 am
Location: Michigan

Postby Peter77 » Tue Jan 30, 2007 5:39 am

Hi there. an update to this patch?
User avatar
Peter77
phpBB SEO Team
phpBB SEO Team
 
Posts: 520
Joined: Wed May 10, 2006 9:46 am
Location: Michigan

Postby dcz » Tue Jan 30, 2007 8:57 am

will do ;)
dcz
Administrateur - Site Admin
Administrateur - Site Admin
 
Posts: 17678
Joined: Fri Apr 28, 2006 9:03 pm


Return to mxBB2 Portal




  • Similar topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 4 guests