ZiNgA BuRgA Wrote:To do this, open up portal.php
Find:
PHP Code:
1 2 3 4 5 6 7 8
$query=$db->query("
SELECT p.pid, p.message, p.tid
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
WHERE t.fid IN (".$mybb->settings['portal_announcementsfid'].") AND t.visible='1' AND t.closed NOT LIKE 'moved|%' AND t.firstpost=p.pid
ORDER BY t.dateline DESC
LIMIT 0, ".$mybb->settings['portal_numannouncements']);
Replace with:
PHP Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
$page= intval($mybb->input['page']);if($page<1)$page=1;$numann=$db->fetch_field($db->simple_select(TABLE_PREFIX.'threads','COUNT(*) AS numann',"fid IN (".$mybb->settings['portal_announcementsfid'].") AND visible='1' AND closed NOT LIKE 'moved|%'"),'numann');$perpage= intval($mybb->settings['portal_numannouncements']);$multipage= multipage($numann,$perpage,$page,$_SERVER['PHP_SELF'].'?paged=1');$query=$db->query("
SELECT p.pid, p.message, p.tid
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
WHERE t.fid IN (".$mybb->settings['portal_announcementsfid'].") AND t.visible='1' AND t.closed NOT LIKE 'moved|%' AND t.firstpost=p.pid
ORDER BY t.dateline DESC
LIMIT ".(($page-1)*$perpage).", ".$perpage);
$page= intval($mybb->input['page']);if($page<1)$page=1;$numann=$db->fetch_field($db->simple_select(TABLE_PREFIX.'threads','COUNT(*) AS numann',"fid IN (".$mybb->settings['portal_announcementsfid'].") AND visible='1' AND closed NOT LIKE 'moved|%'"),'numann');$perpage= intval($mybb->settings['portal_numannouncements']);$multipage= multipage($numann,$perpage,$page,$_SERVER['PHP_SELF'].'?paged=1');$query=$db->query("
SELECT p.pid, p.message, p.tid, pp.parsedmessage
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
LEFT JOIN ".TABLE_PREFIX."parsed_posts pp ON (p.pid=pp.pid)
WHERE t.fid IN (".$mybb->settings['portal_announcementsfid'].") AND t.visible='1' AND t.closed NOT LIKE 'moved|%' AND t.firstpost=p.pid
ORDER BY t.dateline DESC
LIMIT ".(($page-1)*$perpage).", ".$perpage);
Right !?
It's about this 2 lines:
PHP Code:
SELECT p.pid, p.message, p.tid, pp.parsedmessage
and
PHP Code:
LEFT JOIN ".TABLE_PREFIX."parsed_posts pp ON (p.pid=pp.pid)