Latest active topics on index MOD with Advanced Mod Rewrite

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

Moderator: Moderators

Latest active topics on index MOD with Advanced Mod Rewrite

Postby arch_stanton » Mon Nov 27, 2006 5:17 pm

I have SEO advanced mod rewrite up and running on my live board, but the latest active topics on index mod needs some minor code changes (it's the box with the scrolling topic titles near the top of the page).

At the moment it's displaying URLs as viewtopic.php?t=xxx instead of topic-title-vtxxx.html

Could dcz or someone else kindly tell me the code changes I will need?

Thanks. :)
Last edited by arch_stanton on Mon Nov 27, 2006 10:34 pm, edited 1 time in total.
arch_stanton
PR1
PR1
 
Posts: 163
Joined: Wed Oct 04, 2006 9:48 am

Advertisement

Postby dcz » Mon Nov 27, 2006 6:39 pm

Lol, I did not remind I already did it.

I really need to clean up the forums and start releasing.
Almost the end of this IRL demanding autumn:D
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: 21238
Joined: Fri Apr 28, 2006 9:03 pm

Postby dcz » Mon Nov 27, 2006 10:32 pm

After some confusion, here we are :D

So for the latest active topic on index mod :

Open :

Code: Select all
index.php


find :

Code: Select all
   $mar_title = $row[$i]["topic_title"];


after add :
Code: Select all
   // www.phpBB-SEO.com SEO TOOLKIT BEGIN
   $seo_topic_name = $row[$i]["topic_title"];
   // www.phpBB-SEO.com SEO TOOLKIT END


Find :

Code: Select all
$template->assign_block_vars('marqueerow', array(
   'FOLD_URL' => $pic,
   'TOPIC_TITLE' => $row[$i]["topic_title"],
   'TOPIC_URL' => append_sid($phpbb_root_path . 'viewtopic.'.$phpEx.'?'.POST_TOPIC_URL.'='.$row[$i]["topic_id"]),
   'USERNAME' => $row[$i]["username"],
   'USER_PROF' => append_sid($phpbb_root_path . 'profile.'.$phpEx.'?mode=viewprofile$amp;u='.$row[$i]["user_id"]),
   'POST_DATE' => create_date($board_config['default_dateformat'], $row[$i]["post_time"], $board_config['board_timezone']))
   );
}


After add :

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


;)

++
Last edited by dcz on Tue Nov 28, 2006 10:45 pm, edited 1 time in total.
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: 21238
Joined: Fri Apr 28, 2006 9:03 pm

Postby arch_stanton » Tue Nov 28, 2006 9:35 pm

Made the changes, but it's still giving the links as viewtopic.php?t=xxx
arch_stanton
PR1
PR1
 
Posts: 163
Joined: Wed Oct 04, 2006 9:48 am

Postby dcz » Tue Nov 28, 2006 10:46 pm

Sorry wrong copy paste :

It's :

Code: Select all
   // www.phpBB-SEO.com SEO TOOLKIT BEGIN
   $seo_topic_name = $row[$i]["topic_title"];
   // www.phpBB-SEO.com SEO TOOLKIT END


instead of :

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


Post edited.

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

Postby zinnerz » Thu Feb 01, 2007 6:59 pm

Hi Dcz,

Please update to v0.2.0, thanks :wink:
zinnerz
PR0
PR0
 
Posts: 76
Joined: Thu Jun 08, 2006 7:25 am

Postby dcz » Thu Feb 01, 2007 11:28 pm

Before the official patch here is what to do :
Code: Select all
#
#-----[ OPEN ]------------------------------------------
#
index.php

#
#-----[ FIND ]------------------------------------------
#
   $mar_title = $row[$i]["topic_title"];

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

   // www.phpBB-SEO.com SEO TOOLKIT BEGIN
   if ( !isset($phpbb_seo->seo_url['topic'][$row[$i]['topic_id']]) ) {
      $phpbb_seo->seo_url['topic'][$row[$i]['topic_id']] = $phpbb_seo->format_url($mar_title);
   }
   // www.phpBB-SEO.com SEO TOOLKIT END

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM



You should get rid of previous modding for the 0.0.2 mod rewrites.

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

Postby zinnerz » Fri Feb 02, 2007 6:06 pm

I've tested it and the url become: topic-tx.html

It seems not for Advanced Mod Rewrite..
zinnerz
PR0
PR0
 
Posts: 76
Joined: Thu Jun 08, 2006 7:25 am

Postby dcz » Fri Feb 02, 2007 6:09 pm

Are you using this one ?
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: 21238
Joined: Fri Apr 28, 2006 9:03 pm

Postby zinnerz » Fri Feb 02, 2007 7:14 pm

Yes it is, I didnt notice your words before: "Before the official patch here is what to do"

I'm using 1.1.9 (Updated 06/12/05) now, sorry not to mention it before :)
zinnerz
PR0
PR0
 
Posts: 76
Joined: Thu Jun 08, 2006 7:25 am

Postby dcz » Fri Feb 02, 2007 8:48 pm

By patch, I meant the code I suggested ;)

Anyway, please double check, because this exact same code work here.

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

Postby zinnerz » Fri Feb 02, 2007 9:22 pm

OMG, I miss this part

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

I was replaced $mar_title = $row[$i]["topic_title"]; with your code, hehehe :oops:

Maybe this because I've seen many code today so I'm kinda not concentrated, really sorry Dcz. Thanks again.. :wink:
zinnerz
PR0
PR0
 
Posts: 76
Joined: Thu Jun 08, 2006 7:25 am

Postby dcz » Fri Feb 02, 2007 10:19 pm

np ;)
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: 21238
Joined: Fri Apr 28, 2006 9:03 pm

Postby funwadi » Wed May 09, 2007 10:47 am

dcz wrote:Are you using this one ?


It's working perfectly for me. Thanks dcz. You are great :)
funwadi
PR0
PR0
 
Posts: 53
Joined: Sun May 06, 2007 10:31 am
Location: UAE


Return to phpBB2 mod Rewrite

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 1 guest