Moderator: Moderators


## Files To Edit: (5)
## .htaccess,
## index.php,
## includes/function.php,
## includes/session.php,
## viewtopic.php



dcz wrote:I am currently working on enhancing phpBB links and to organise the phpBB SEO Toolkit. I thought the next and previous topic links should not be shown to guest any more as they are duplicates, and that this change was to be added in this mod, as it requires very few changes.
Here is the code change that will be added to the next version, you can implement it now as it's final
- Code: Select all
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
$view_prev_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=previous");
$view_next_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=next");
//
// Mozilla navigation bar
//
$nav_links['prev'] = array(
'url' => $view_prev_topic_url,
'title' => $lang['View_previous_topic']
);
$nav_links['next'] = array(
'url' => $view_next_topic_url,
'title' => $lang['View_next_topic']
);
#
#-----[ REPLACE WITH ]------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if ($userdata['session_logged_in']) {
$view_prev_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=previous");
$view_next_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=next");
//
// Mozilla navigation bar
//
$nav_links['prev'] = array(
'url' => $view_prev_topic_url,
'title' => $lang['View_previous_topic']
);
$nav_links['next'] = array(
'url' => $view_next_topic_url,
'title' => $lang['View_next_topic']
);
}
// www.phpBB-SEO.com SEO TOOLKIT END
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

<!-- BEGIN switch_user_logged_in --><!-- END switch_user_logged_in -->
OPEN
viewtopic_boy.tpl
FIND
<td class="catHead" colspan="2" height="28"><span class="nav"><a href="{U_VIEW_OLDER_TOPIC}" class="nav">{L_VIEW_PREVIOUS_TOPIC}</a> :: <a href="{U_VIEW_NEWER_TOPIC}" class="nav">{L_VIEW_NEXT_TOPIC}</a> </span></td>
REPLACE WITH
<td class="catHead" colspan="2" height="28">
<!-- BEGIN switch_user_logged_in -->
<span class="nav"><a href="{U_VIEW_OLDER_TOPIC}" class="nav">{L_VIEW_PREVIOUS_TOPIC}</a> :: <a href="{U_VIEW_NEWER_TOPIC}" class="nav">{L_VIEW_NEXT_TOPIC}</a> </span>
<!-- END switch_user_logged_in -->
</td>
SAVE/UPLOAD
Options +FollowSymlinks
Options +FollowSymlinks


Return to phpBB2 Simple mod rewrite
Users browsing this forum: No registered users and 1 guest