[ADD ON] Simple Sub Forum phpBB SEO mod Rewrite

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

Moderator: Moderators

[ADD ON] Simple Sub Forum phpBB SEO mod Rewrite

Postby SeO » Sun Jun 04, 2006 9:03 pm

Please note : this version is for 0.0.x phpBB SEO mod rewrites, the updated one (0.2.x) is released here.

[ADD ON] Simple Sub Forum phpBB SEO mod Rewrite

No time nor need to tell more right now :

Here are the additional code changes to apply if you have installed the Simple sub Forum mod, which also require the use of XS mod.

This Add On is only required only if you installed the Advanced or Mixed phpBB SEO mod Rewrites.
No additional changes needed with the phpBB SEO Simple mod Rewrite.

Code: Select all
// [ADD ON] Simple Sub Forum 1.0.1 phpBB SEO mod Rewrite - dcz - www.phpBB-SEO.com
// License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
#
#-----[ OPEN ]------------------------------------------
#


index.php

#
#-----[ FIND ]------------------------------------------
#

      // Append new entry
      $data[] = array(
#
#-----[ BEFORE, ADD ]------------------------------------------
#

         // www.phpBB-SEO.com SEO TOOLKIT BEGIN
         $seo_forum_name = $forum_data['forum_name'];
         // www.phpBB-SEO.com SEO TOOLKIT END

#
#-----[ OPEN ]------------------------------------------
#
#

viewforum.php

#
#-----[ FIND ]------------------------------------------
#

if( $forum_row['forum_parent'] )
{

#
#-----[ BEFORE, ADD ]------------------------------------------
#

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$seo_forum_name_save = $seo_forum_name;
// www.phpBB-SEO.com SEO TOOLKIT END

#
#-----[ FIND ]------------------------------------------
#

$template->assign_vars(array(
   'NUM_TOPICS' => $forum_row['forum_topics'],
   'CAN_POST' => $is_auth['auth_post'] ? 1 : 0,
   'L_FORUM' => $lang['Forum'],
   ));

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

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$seo_forum_name = $seo_forum_name_save;
// www.phpBB-SEO.com SEO TOOLKIT END

#
#-----[ FIND ]------------------------------------------
#

      if( $all_forums[$i]['forum_id'] == $parent_id )
      {

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

               // www.phpBB-SEO.com SEO TOOLKIT BEGIN
               $seo_forum_name = $all_forums[$i]['forum_name'];
               // www.phpBB-SEO.com SEO TOOLKIT END

#
#-----[ FIND ]------------------------------------------
#

if( $total_forums )
{

#
#-----[ AFTER, ADD ]------------------------------------------
#
   // www.phpBB-SEO.com SEO TOOLKIT BEGIN
   $seo_forum_name = $seo_forum_name_save;
   // www.phpBB-SEO.com SEO TOOLKIT END


#
#-----[ FIND ]------------------------------------------
#
         $template->assign_block_vars('catrow.forumrow',   array(
            'ROW_COLOR' => '#' . $row_color,
            'ROW_CLASS' => $row_class,

#
#-----[ BEFORE, ADD ]------------------------------------------
#

         // www.phpBB-SEO.com SEO TOOLKIT BEGIN
         $seo_forum_name = $subforum_data[$j]['forum_name'];
         // www.phpBB-SEO.com SEO TOOLKIT END

#
#-----[ OPEN ]------------------------------------------
#
#

viewtopic.php

#
#-----[ FIND ]------------------------------------------
#

      if( $all_forums[$i]['forum_id'] == $parent_id )
      {

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

               // www.phpBB-SEO.com SEO TOOLKIT BEGIN
               $seo_forum_name = $all_forums[$i]['forum_name'];
               // www.phpBB-SEO.com SEO TOOLKIT END

#
#-----[ OPEN ]------------------------------------------
#
includes/functions.php

#
#-----[ FIND ]------------------------------------------
#
                        //
                        // Add an array to $nav_links for the Mozilla navigation bar.
                        // 'chapter' and 'forum' can create multiple items, therefore we are using a nested array.
                        //
                        $nav_links['chapter forum'][$forum_rows[$k]['forum_id']] = array (
                           'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$k]['forum_id']),
                           'title' => $forum_rows[$k]['forum_name']
                        );

#
#-----[ REPLACE WITH ]------------------------------------------
#

                        //
                        // Add an array to $nav_links for the Mozilla navigation bar.
                        // 'chapter' and 'forum' can create multiple items, therefore we are using a nested array.
                        //
                        // www.phpBB-SEO.com SEO TOOLKIT BEGIN
                        $nav_links['chapter forum'][$forum_rows[$k]['forum_id']] = array (
                           //'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$k]['forum_id']),
                           'url' => append_sid(format_url($forum_rows[$j]['forum_name']) . "-vf" . $forum_rows[$k]['forum_id'] . ".html")
                           'title' => $forum_rows[$k]['forum_name']
                        );
                        // www.phpBB-SEO.com SEO TOOLKIT END
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Advertisement

Postby dcz » Wed Aug 16, 2006 4:14 pm

Oups, small bug, post edited.

To update, you just need to redo the changes for viewforum.php.

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

Postby dcz » Fri Nov 03, 2006 10:21 am

Added nav link support :
Code: Select all
#
#-----[ OPEN ]------------------------------------------
#
includes/functions.php

#
#-----[ FIND ]------------------------------------------
#
                        //
                        // Add an array to $nav_links for the Mozilla navigation bar.
                        // 'chapter' and 'forum' can create multiple items, therefore we are using a nested array.
                        //
                        $nav_links['chapter forum'][$forum_rows[$k]['forum_id']] = array (
                           'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$k]['forum_id']),
                           'title' => $forum_rows[$k]['forum_name']
                        );

#
#-----[ REPLACE WITH ]------------------------------------------
#

                        //
                        // Add an array to $nav_links for the Mozilla navigation bar.
                        // 'chapter' and 'forum' can create multiple items, therefore we are using a nested array.
                        //
                        // www.phpBB-SEO.com SEO TOOLKIT BEGIN
                        $nav_links['chapter forum'][$forum_rows[$k]['forum_id']] = array (
                           //'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$k]['forum_id']),
                           'url' => append_sid(format_url($forum_rows[$j]['forum_name']) . "-vf" . $forum_rows[$k]['forum_id'] . ".html"),
                           'title' => $forum_rows[$k]['forum_name']
                        );
                        // www.phpBB-SEO.com SEO TOOLKIT END

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

Postby mattj » Tue Dec 26, 2006 1:57 am

Ive got 3 mods installed

PHPBB SEO Advanced
Simple Sub Forums
Forum Titles as Web Links

Ive got the seo and sub forums to cooperate now, but unforunately the last mod is no longer functional. The fields still exist in the admin cp, i can still assign a direct url like -http://www.phpbbseo.com/games.php

But instead of going to the app, it goes to the relevant subforum...say

-http://www.phpbbseo.com/games-vf23.html

Thats the last piece in the puzzle for me...any help appreciated.
mattj
 
Posts: 1
Joined: Mon Dec 25, 2006 11:27 pm

Postby dcz » Tue Dec 26, 2006 10:14 am

And welcome :D

Unfortunately, I am not really sure about which mod you're talking about, what is the "last mod" ?

A link would help out to help you out ;)

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


Return to phpBB2 SEO MODS

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 1 guest