- Titre : Zero Profile Link
Auteur : vee / phpbb-SEO Team.
Description : Ce mod a pour fonction de rendre innactifs pour les invités (utilisateurs non-enregistrés) les liens vers les profils "modérateurs", "auteurs des derniers messages", "auteur des sujets", "dernier utilisteur enregistré", "utilisateurs en ligne" et "utilisateurs parcourant ce forum" sur l'index et les forums.
En partant du principe que nous n'autorisons pas l'exploration des profils aux Robots d'indexation (disallow dans robots.txt) et/ou que l'exploration des profiles membres nécéssite un login de l'utilisateur, il n'est pas nécéssaire de laisser ces liens sur vos pages.
Le but est d'optimiser la lecture de l'index et des forums pour les Bots qui les explorent.
Version : 0.0.1
Niveau d'installation : Facile.
Temps d'installation : 5 min.
phpBB : 2.0.22
Demo : www.histoires2femmes.com
- Code: Tout sélectionner
##############################################################
## MOD Title: Zero Profile Link
## MOD Author: vee / phpbb-SEO Team
## MOD Description: Optimise les liens de l'index et des forums.
##
## MOD Version: 0.0.1
##
## Installation Level: (EASY)
## Installation Time: 5 Minutes
## Files To Edit: (3)
## index.php,
## includes/page_header.php,
## viewforum.php
## Included Files: n/a
##############################################################
## Author Notes:
##
## Ce mod a pour fonction de rendre innactifs pour les invités (utilisateurs non-enregistrés) les liens vers les profils:
## "modérateurs", "auteurs des derniers messages", "auteur des sujets", "dernier utilisteur enregistré", "utilisateurs en ligne" et "utilisateurs parcourant ce forum" sur l'index et les forums.
## En partant du principe que nous n'autorisons pas l'exploration des profils aux Robots d'indexation (disallow dans robots.txt)
## et/ou que l'exploration des profiles membres nécéssite un login de l'utilisateur,
## il n'est pas nécéssaire de laisser ces liens sur vos pages.
## Le but est d'optimiser la lecture de l'index et des forums pour les Bots qui les explorent.
##############################################################
## MOD History:
##
## 2007-03-07 - 0.0.1
## - First released version
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
index.php
#
#-----[ FIND ]------------------------------------------
#
$forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '">' . $row['username'] . '</a>';
#
#-----[ REPLACE WITH ]------------------------------------------
#
$forum_moderators[$row['forum_id']][] = ($userdata['session_logged_in']) ? ('<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '">' . $row['username'] . '</a>') : ($row['username']);
#
#-----[ FIND ]------------------------------------------
#
$forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=" . $row['group_id']) . '">' . $row['group_name'] . '</a>';
#
#-----[ REPLACE WITH ]------------------------------------------
#
$forum_moderators[$row['forum_id']][] = ($userdata['session_logged_in']) ? ('<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=" . $row['group_id']) . '">' . $row['group_name'] . '</a>') : ($row['group_name']);
#
#-----[ FIND ]------------------------------------------
#
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';
#
#-----[ REPLACE WITH ]------------------------------------------
#
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : ($userdata['session_logged_in']) ? ('<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ') : ($forum_data[$j]['username'] . ' ');
#
#-----[ FIND ]------------------------------------------
#
'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'),
#
#-----[ REPLACE WITH ]------------------------------------------
#
'NEWEST_USER' => ($userdata['session_logged_in']) ? (sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>')) : (sprintf($lang['Newest_user'], '' , $newest_user, '')),
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
if ( $row['user_allow_viewonline'] )
{
$user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
$logged_visible_online++;
}
#
#-----[ REPLACE WITH ]------------------------------------------
#
if ( $row['user_allow_viewonline'] )
{
$user_online_link = ($userdata['session_logged_in']) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>' : '<span ' . $style_color . '>' . $row['username'] . '</span>';
$logged_visible_online++;
}
#
#-----[ OPEN ]------------------------------------------
#
viewforum.php
#
#-----[ FIND ]------------------------------------------
#
$moderators[] = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '">' . $row['username'] . '</a>';
#
#-----[ REPLACE WITH ]------------------------------------------
#
$moderators[] = ($userdata['session_logged_in']) ? ('<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '">' . $row['username'] . '</a>') : ($row['username']);
#
#-----[ FIND ]------------------------------------------
#
$moderators[] = '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=" . $row['group_id']) . '">' . $row['group_name'] . '</a>';
#
#-----[ REPLACE WITH ]------------------------------------------
#
$moderators[] = ($userdata['session_logged_in']) ? ('<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=" . $row['group_id']) . '">' . $row['group_name'] . '</a>') : ($row['group_name']);
#
#-----[ FIND ]------------------------------------------
#
$topic_author = ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $topic_rowset[$i]['user_id']) . '">' : '';
$topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? $topic_rowset[$i]['username'] : ( ( $topic_rowset[$i]['post_username'] != '' ) ? $topic_rowset[$i]['post_username'] : $lang['Guest'] );
$topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : '';
#
#-----[ REPLACE WITH ]------------------------------------------
#
if ( $userdata['session_logged_in'] )
{
$topic_author = ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $topic_rowset[$i]['user_id']) . '">' : '';
$topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? $topic_rowset[$i]['username'] : ( ( $topic_rowset[$i]['post_username'] != '' ) ? $topic_rowset[$i]['post_username'] : $lang['Guest'] );
$topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : '';
}
else
{
$topic_author = ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? $topic_rowset[$i]['username'] : ( ( $topic_rowset[$i]['post_username'] != '' ) ? $topic_rowset[$i]['post_username'] : $lang['Guest'] );
}
#
#-----[ FIND ]------------------------------------------
#
$last_post_author = ( $topic_rowset[$i]['id2'] == ANONYMOUS ) ? ( ($topic_rowset[$i]['post_username2'] != '' ) ? $topic_rowset[$i]['post_username2'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $topic_rowset[$i]['id2']) . '">' . $topic_rowset[$i]['user2'] . '</a>';
#
#-----[ REPLACE WITH ]------------------------------------------
#
$last_post_author = ( $topic_rowset[$i]['id2'] == ANONYMOUS ) ? ( ($topic_rowset[$i]['post_username2'] != '' ) ? $topic_rowset[$i]['post_username2'] . ' ' : $lang['Guest'] . ' ' ) : ($userdata['session_logged_in']) ? ('<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $topic_rowset[$i]['id2']) . '">' . $topic_rowset[$i]['user2'] . '</a>') : ($topic_rowset[$i]['user2']);
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

Français |
Anglais
News





