[ADD ON] Simple Sub Forum phpBB SEO mod Rewrite
Pas le temps ni besoin d'en faire plus tout de suite :
Voici les changements de code à faire en plus si vous avez installé le mod Simple sub Forum, par ailleurs fort pratique (Attention, il faut aussi XS mod).
Cet Add On est uniquement nécessaire si vous utilisez les mod Rewrite phpBB SEO Avancé et Intermédiaire.
Ces changements ne sont pas nécessaires pour le mod Rewrite phpBB SEO Simple.
- Code: Tout sélectionner
// [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

Français |
Anglais

