I'm not sure if anyone else has already come up with this. I've searched all over the 'net for it, and I can't seem to find it anywhere else, so I'm posting it here first.
This mod is based on the same principle that A2K uses to link to the last post on index.php. This mod will do the same thing for Simple Subforums 1.0.2 (by pentapenguin) on viewforum.php.
If this is not an original mod, someone please tell me.
- Code: Select all
##############################################################
## MOD Title: Link to posts by date on Simple Subforums
## MOD Author: FoxyLoxy http://www.foxymods-phpbb.com
## MOD Description: Fixes the last post display on Simple Subforums to link to
## the last post instead of the last post author's profile.
## MOD Version: 1.0.0
##
## Installation Level: (Easy)
## Installation Time: 1 Minute
## Files To Edit: viewforum.php
## Included Files: n/a
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
#
#----[ OPEN ]---------------------------------
#
viewforum.php
#
#----[ FIND ]---------------------------------
#
$last_post_time = create_date($board_config
['default_dateformat'], $subforum_data[$j]['post_time'], $board_config['board_timezone']);
#
#----[ REPLACE WITH ]-------------------------
#
// $last_post_time = create_date($board_config
['default_dateformat'], $subforum_data[$j]['post_time'], $board_config['board_timezone']);
$last_post_time = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' .
$subforum_data[$j]['forum_last_post_id']) . '#' . $subforum_data[$j]['forum_last_post_id'] . '"
title="' . $lang['View_latest_post'] . '">' . create_date($board_config['default_dateformat'],
$subforum_data[$j]['post_time'], $board_config['board_timezone']) . '</a>';
#
#----[ FIND ]---------------------------------
#
$last_post .= '<a href="' . append_sid("viewtopic.$phpEx?" .
POST_POST_URL . '=' . $subforum_data[$j]['forum_last_post_id']) . '#' . $subforum_data[$j]
['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' .
$lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';
#
#----[ REPLACE WITH ]-------------------------
#
/*
$last_post .= '<a href="' . append_sid("viewtopic.$phpEx?" .
POST_POST_URL . '=' . $subforum_data[$j]['forum_last_post_id']) . '#' . $subforum_data[$j]
['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' .
$lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';
*/
#
#----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
DEMO
Comments? Suggestions?

English |
French

