KieuTuan
10-15-2005, 04:23 AM
This hack allow you to post mark a thread is show or not in the news module:
In the new module find:
$deljoin
WHERE thread.threadid IN(" . implode(',', $newstids) . ")
$mods[exforums]
and replace with:
$deljoin " .
. ") " .
"WHERE (thread.sticky = 1) AND (thread.forumid = xxxx) " .
"$mods[exforums]
Add on 17-Oct-05.
I just forgotten:
Find:
$getnewsids = $DB_site->query("
SELECT threadid, firstpostid FROM " . TABLE_PREFIX . "thread AS thread
$deljoin
WHERE visible = 1 AND open != 10 AND thread.iconid IN(" . implode(',', $mods['inforums']) . ") $notdeleted
Repalce with
$getnewsids = $DB_site->query("
SELECT threadid, firstpostid FROM " . TABLE_PREFIX . "thread AS thread
$deljoin " .
"WHERE (thread.sticky = 1) AND (thread.forumid = xxxx) " .
Where xxxx is the id of the forum you intent to keep news article.
Now everytime you post a thread in the news forum and check sticky checkbox your thread will be displace in news module. To turn off just uncheck the sticky.
Hope it will be usefull for all.
In the new module find:
$deljoin
WHERE thread.threadid IN(" . implode(',', $newstids) . ")
$mods[exforums]
and replace with:
$deljoin " .
. ") " .
"WHERE (thread.sticky = 1) AND (thread.forumid = xxxx) " .
"$mods[exforums]
Add on 17-Oct-05.
I just forgotten:
Find:
$getnewsids = $DB_site->query("
SELECT threadid, firstpostid FROM " . TABLE_PREFIX . "thread AS thread
$deljoin
WHERE visible = 1 AND open != 10 AND thread.iconid IN(" . implode(',', $mods['inforums']) . ") $notdeleted
Repalce with
$getnewsids = $DB_site->query("
SELECT threadid, firstpostid FROM " . TABLE_PREFIX . "thread AS thread
$deljoin " .
"WHERE (thread.sticky = 1) AND (thread.forumid = xxxx) " .
Where xxxx is the id of the forum you intent to keep news article.
Now everytime you post a thread in the news forum and check sticky checkbox your thread will be displace in news module. To turn off just uncheck the sticky.
Hope it will be usefull for all.