2005-04-20, 08:03 PM
This one courtesy of MakPaolo...
You ever find it confusing whenever you have multiple announcements in one forum and you click one of the announcements and the rest of them are displayed one after another? Well, here this modification can help you have only just one announcement displayed on it's own thread.
-- [ OPEN ] --
announcements.php
-- [ FIND ] --
forumdisplay_announcements (found at the admin cp on the templates section)
-- [ FIND ] --
You ever find it confusing whenever you have multiple announcements in one forum and you click one of the announcements and the rest of them are displayed one after another? Well, here this modification can help you have only just one announcement displayed on it's own thread.
-- [ OPEN ] --
announcements.php
-- [ FIND ] --
Quote:$query = $db->query("SELECT u.*, u.username, a.*, f.*, g.title AS grouptitle, g.usertitle AS groupusertitle, g.stars AS groupstars, g.starimage AS groupstarimage, g.image AS groupimage, g.namestyle, g.usereputationsystem FROM ".TABLE_PREFIX."announcements a LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=a.uid) LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid) LEFT JOIN ".TABLE_PREFIX."usergroups g ON (g.gid=u.usergroup) WHERE a.startdate<='$time' AND a.enddate>='$time' AND ($sql OR fid='-1') ORDER BY a.startdate DESC");-- [ REPLACE WITH ] --
Quote:$query = $db->query("SELECT u.*, u.username, a.*, f.*, g.title AS grouptitle, g.usertitle AS groupusertitle, g.stars AS groupstars, g.starimage AS groupstarimage, g.image AS groupimage, g.namestyle, g.usereputationsystem FROM ".TABLE_PREFIX."announcements a LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=a.uid) LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid) LEFT JOIN ".TABLE_PREFIX."usergroups g ON (g.gid=u.usergroup) WHERE a.startdate<='$time' AND a.enddate>='$time' AND ($sql OR fid='-1') AND aid='$aid' ORDER BY a.startdate DESC");-- [ EDIT ] --
forumdisplay_announcements (found at the admin cp on the templates section)
-- [ FIND ] --
Quote: <a href="announcements.php?fid=$fid">-- [ REPLACE WITH ] --
Quote: <a href="announcements.php?fid=$fid&aid=$announcement[aid]">