- Code: Select all
########################################################
## Mod Title: Locked in button Mod
## Mod Version: 1.2.2
## Author: Niels Chr. Rød Denmark < ncr@db9.dk <mailto:ncr@db9.dk> >
## Improved by: mitsubitsu
## 1.2.2 - blanchas78@hotmail.com
##
## Makes locked topic shows last in the topic's page list
## that way, making them "out of sigt, out of mind"
##
## This mod is only for phpBB2!!
##
##
## Installation Level: Easy
## Installation Time: 1 Minute
## Files To Edit: 2
## viewforum.php
## search.php
##
## HISTORY:
## 0.9.0 - initial release RC-4
## 1.0.2 - release for phpBB2 ver 2.0.0 History started
## 1.2.0 - now re-write for phpBB2 ver 2.0.2
## 1.2.1 - included order in search result
## 1.2.2 - included order to the modcp.php (phpBB2 ver 2.0.4) - blanchas78@hotmail.com
##
##
##############################################################
## This MOD is released under the GPL License.
## Intellectual Property is retained by the MOD Author(s) listed above
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/
##############################################################
## Authors Notes:
## None
########################################################
#
#-----[ OPEN ]------------------------------------------
#
viewforum.php
#
#-----[FIND]------------------------------------------
#
ORDER BY t.topic_type DESC, t.topic_last_post_id DESC
LIMIT $start, ".$board_config['topics_per_page'];
#
#-----[REPLACE WITH] ------------------------------------------
#
ORDER BY t.topic_type DESC, t.topic_status ASC, t.topic_last_post_id DESC
LIMIT $start, ".$board_config['topics_per_page'];
#
#-----[ OPEN ]------------------------------------------
#
search.php
#
#-----[FIND]------------------------------------------
#
$sql .= " ORDER BY ";
#
#-----[AFTER, ADD]------------------------------------------
#
// added mod, makes locked go to button in search
$sql .= ' t.topic_status ASC, t.topic_type DESC,';
#
#-----[ OPEN ]------------------------------------------
#
modcp.php
#
#-----[FIND]------------------------------------------
#
ORDER BY t.topic_type DESC, p.post_time DESC
LIMIT $start, " . $board_config['topics_per_page'];
#
#-----[REPLACE WITH] ------------------------------------------
#
ORDER BY t.topic_type DESC, t.topic_status ASC, p.post_time DESC
LIMIT $start, " . $board_config['topics_per_page'];
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM


