Tested on 2.0.4 and added the order to modcp.php

Small mod, that makes locked topics go to the end of the forum view

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

Tested on 2.0.4 and added the order to modcp.php

Postby blanchas on Wed 23. Jul, 2003 08:10

I installed this mod to my forum and noticed that the modcp.php was not included in this mod so I took the liberty to add it ... I have not had any problems with this addition so far
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
blanchas
Poster
Poster
 
Posts: 4
Joined: Mon 07. Jul, 2003 02:58

Postby Niels on Sat 02. Aug, 2003 23:08

nicely done, I have included this in the how-to
it seams also that there is a minor bug in search.php witch I will correct and post a upgrade for

thanks :D I'm shure other users can benefit from your work
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46


Return to Locked at the end [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron