|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Mod Name / Version: Stickies only on page 1 in 6.5 Description: In 6.5 Sticky threads will appear on all pages of postlist. If you have alot of stickies, this leaves very little room for regular posts. This mod will only display stickies on the first page of postlist - old behavior. Working Under: UBB.Threads 6.5 Mod Status: Beta Any pre-requisites: 6.5 Author(s): JoshPet Date: 07/03/04 Credits: Leoville for complaining about it Files Altered: postlist.php New Files: none Database Altered: none Info/Instructions: Easy mod to add. Open postlist.php Find this: <br />// First stop, grab all posts from the announcements table that <br />// we need to display in this forum. <br />$a_inlist = "('$Board_q','ubbt_all_forums')"; <br />$query = " <br /> SELECT A_Topic <br /> FROM {$config['tbprefix']}Announcements <br /> WHERE A_Board IN $a_inlist <br />"; <br />$sth = $dbh->do_query($query,__LINE__,__FILE__); <br />$stickies = ""; <br />$totalstickies = 0; <br />while(list($atopic) = $dbh->fetch_array($sth)) { <br /> $stickies .= "'$atopic',"; <br /> $totalstickies++; <br />} <br /> Change to this: <br />// Only do this on the first page of posts - by JoshPet <br />if ((!$page) || ($page == 0)) { <br />// First stop, grab all posts from the announcements table that <br />// we need to display in this forum. <br />$a_inlist = "('$Board_q','ubbt_all_forums')"; <br />$query = " <br /> SELECT A_Topic <br /> FROM {$config['tbprefix']}Announcements <br /> WHERE A_Board IN $a_inlist <br />"; <br />$sth = $dbh->do_query($query,__LINE__,__FILE__); <br />$stickies = ""; <br />$totalstickies = 0; <br />while(list($atopic) = $dbh->fetch_array($sth)) { <br /> $stickies .= "'$atopic',"; <br /> $totalstickies++; <br />} <br />} // end of mod <br /> Disclaimer: Please backup every file that you intend to modify. If the modification modifies the database, it's a good idea to backup your database before doing so. Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.
Last edited by JoshPet; 07/03/2004 5:28 PM.
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
|
|
|
|
Joined: Jun 2002
Posts: 160
Member
|
Member
Joined: Jun 2002
Posts: 160 |
This seems to be included in the stock 6.5.1 distro.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 417
Joined: November 2001
|
|
Forums63
Topics37,575
Posts293,930
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|