board3 Portal Rewrite

Support for the phpBB3 SEO mods released in the phpBB3 SEO Toolikt forum.

Moderator: Moderators

board3 Portal Rewrite

Postby treben » Mon Sep 14, 2009 4:29 am

If anyone is using the board3 portal and phpbb-seo, here is what I did to get the links rewritten. This is for phpbb-seo ultimate v0.6.0 and board3 v1.0.3. Other version of board3 will most likely work but other versions of the seo mod will most likely NOT.

With the latest phpbb-seo, many of the portal links are already rewritten by default, including member names, forum names, forum index etc. but the topics are not. First we will rewrite the news module's topics.

OPEN portal/block/news.php:

FIND (2 Times):
Code: Select all
$forum_id = $fetch_news[$i]['forum_id'];
$topic_id = $fetch_news[$i]['topic_id'];


ADD AFTER:
Code: Select all
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
       if ($fetch_news[$i]['topic_type'] == POST_GLOBAL || !empty($phpbb_seo->seo_url['forum'][$fetch_news[$i]['forum_id']])) {
         $phpbb_seo->prepare_iurl($fetch_news[$i], 'topic', $fetch_news[$i]['topic_type'] == POST_GLOBAL ? $phpbb_seo->seo_static['global_announce'] : $phpbb_seo->seo_url['forum'][$fetch_news[$i]['forum_id']]);
      }
         // www.phpBB-SEO.com SEO TOOLKIT END


To reiterate, you will find the above lines TWICE and must add the code after each occurence.

Now on to the announcements.

OPEN portal/block/announcements.php:

FIND (2 Times):
Code: Select all
$forum_id = $fetch_news[$i]['forum_id'];
             $topic_id = $fetch_news[$i]['topic_id'];


ADD AFTER:
Code: Select all
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
       if ($fetch_news[$i]['topic_type'] == POST_GLOBAL || !empty($phpbb_seo->seo_url['forum'][$fetch_news[$i]['forum_id']])) {
         $phpbb_seo->prepare_iurl($fetch_news[$i], 'topic', $fetch_news[$i]['topic_type'] == POST_GLOBAL ? $phpbb_seo->seo_static['global_announce'] : $phpbb_seo->seo_url['forum'][$fetch_news[$i]['forum_id']]);
      }
         // www.phpBB-SEO.com SEO TOOLKIT END


Now we want to rewrite the urls of the recent topics block.

OPEN portal/block/recent.php:

FIND (3 Times):

Code: Select all
$sql = 'SELECT topic_title, forum_id, topic_id


REPLACE WITH:

Code: Select all
$sql = 'SELECT topic_title, forum_id, topic_id, topic_type


FIND (3 Times):

Code: Select all
if ( ($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0') )
   {


ADD AFTER:

Code: Select all
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
       if ($row['topic_type'] == POST_GLOBAL || !empty($phpbb_seo->seo_url['forum'][$row['forum_id']])) {
         $phpbb_seo->prepare_iurl($row, 'topic', $row['topic_type'] == POST_GLOBAL ? $phpbb_seo->seo_static['global_announce'] : $phpbb_seo->seo_url['forum'][$row['forum_id']]);
      }
         // www.phpBB-SEO.com SEO TOOLKIT END


Now the final thing is that the group links aren't rewritten in the who is online section. To fix that...

OPEN portal/block/whois_online.php:

FIND:

Code: Select all
$colour_text = ($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . '"' : '';


ADD BEFORE:

Code: Select all
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
         $phpbb_seo->prepare_url('group', $row['group_name'], $row['group_id']);
         // www.phpBB-SEO.com SEO TOOLKIT END


That should do it. I hope you guys find this useful. Thanks again to dcz for all the help he's given me with this great mod.

EDIT: Seems I missed a topic where dcz already took care of this. See here for more info.
treben
 
Posts: 30
Joined: Wed Aug 19, 2009 2:56 pm

Advertisement

Re: board3 Portal Rewrite

Postby dcz » Sat Sep 19, 2009 11:52 am

Nice work ;)

Too bad it was mainly done already, but you added group rewriting in viewonline block, please add this on to the board3 thread, I'm sure it will please some ;)

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


Return to phpBB SEO MODS

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 4 guests