Wicher Site Admin
Joined: 16 Dec 2005 Posts: 1144 User's local time: 2024 Sep 11 - 12:19 AM Country IP : Country of choice:
Was This Post Helpful?
Users postingpoints:
Posts points:
Post gradiation:
|
Posted: Thu Jul 26, 2007 12:28 pm Post subject: |
Wicher
*Delete this user
Items with prefix * are permanent. | Close |
|
|
Code: |
-
- ##############################################################
- ## MOD Title: Newest Posts First With First Post on Top
- ## MOD Author: Wicher <N> (N/A) http://www.wichersmods.nl
- ## MOD Description: This mod places standard the newest posts first in viewtopic
- ## with the first post on top.
- ##
- ## MOD Version: 1.0.2
- ##
- ## Installation Level: Easy
- ## Installation Time: 15 Minutes
- ##
- ## Files To Edit: viewtopic.php
- ## admin/admin_board.php
- ## includes/functions_post.php
- ## language/lang_english/lang_admin.php
- ## templates/subSilver/viewtopic_body.tpl
- ## templates/subSilver/admin/board_config_body.tpl
- ##
- ## Included Files: <n>
- ##
- ## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
- ##
- ##############################################################
- ## For security purposes, please check: http://www.phpbb.com/mods/
- ## for the latest version of this MOD. Although MODs are checked
- ## before being allowed in the MODs Database there is no guarantee
- ## that there are no security problems within the MOD. No support
- ## will be given for MODs not found within the MODs Database which
- ## can be found at http://www.phpbb.com/mods/
- ##############################################################
- ## Author Notes:
- ## This mod has been tested on phpbb 2.0.22
- ##
- ##############################################################
- ## MOD History:
- ##
- ## 2007-09-09 - Version 1.0.2
- ## - Added user choice wether to display the newest posts first or the oldest.
- ## 2007-07-29 - Version 1.0.1
- ## - Added newtopic and reply buttons above the replies.
- ## 2007-07-26 - Version 1.0.0
- ## - Started this mod
- ##
- ##############################################################
- ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
- ##############################################################
|
Newest_Posts_First_With_First_Post_on_Top_1.0.2.zip
Demo:
When you have installed Keep unread flags MOD then do the following after installing this mod:
Code: |
-
- #
- # OPEN
- #
- viewtopic.php
- #
- # FIND
- #
- if ($topic_last_post_id == $postrow[$lastpost]['post_id'])
- {
- //Read up to time of retrieval of this topic
- $board_config['tracking_unreads'][$topic_id] = time();
- }
- //Reading a page, but not the last one, in a topic with new posts
- elseif (isset($board_config['tracking_unreads'][$topic_id]))
- {
- //Set the highest of current topic_last_read and time of last post on page
- $board_config['tracking_unreads'][$topic_id] = max($topic_last_read, $postrow[$lastpost]['post_time']);
- }
- #
- # REPLACE WITH
- #
- if ($board_config['newest_posts_first'] && $userdata['user_post_order'])
- {
- if ($topic_last_post_id == $postrow[1]['post_id'])
- {
- //Read up to time of retrieval of this topic
- $board_config['tracking_unreads'][$topic_id] = time();
- }
- //Reading a page, but not the last one, in a topic with new posts
- elseif (isset($board_config['tracking_unreads'][$topic_id]))
- {
- //Set the highest of current topic_last_read and time of last post on page
- $board_config['tracking_unreads'][$topic_id] = max($topic_last_read, $postrow[$lastpost]['post_time']);
- }
- }
- else
- {
- if ($topic_last_post_id == $postrow[$lastpost]['post_id'])
- {
- //Read up to time of retrieval of this topic
- $board_config['tracking_unreads'][$topic_id] = time();
- }
- //Reading a page, but not the last one, in a topic with new posts
- elseif (isset($board_config['tracking_unreads'][$topic_id]))
- {
- //Set the highest of current topic_last_read and time of last post on page
- $board_config['tracking_unreads'][$topic_id] = max($topic_last_read, $postrow[$lastpost]['post_time']);
- }
- }
- #
- # EoF
- #
|
_________________
Wicher's phpBB2 Mods | Wicher's phpBB3 Mods | Statistics Mod 4.x.x
Last edited by Wicher on Sun Sep 09, 2007 9:18 pm; edited 7 times in total |
|