vBarab
09-24-2007, 10:00 PM
open forumdisplay.php
find
---
$stickies = $db->query_read_slave("
SELECT thread.threadid, lastpost, open
FROM " . TABLE_PREFIX . "thread AS thread
WHERE forumid = $foruminfo[forumid]
AND sticky = 1
$visiblethreads
$limitothers
$globalignore
");
---
replace
---
$getparent_id = '';
$getparentid = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "forum WHERE parentid='" . $foruminfo[forumid] . "'");
if (mysql_num_rows($getparentid) 0) {
while ($getparentids = $db->fetch_array($getparentid)) {
$getparent_id .= ',' . $getparentids[forumid];
}
}
$stickies = $db->query_read_slave("
SELECT thread.threadid, lastpost, open
FROM " . TABLE_PREFIX . "thread AS thread
WHERE forumid IN (" . $foruminfo[forumid] . $getparent_id . ")
AND sticky = 1
$visiblethreads
$limitothers
$globalignore
");
// End SubThread
---
find
---
$getthreadids = $db->query_read_slave("
SELECT " . iif($sortfield == 'voteavg', $votequery) . " thread.threadid
$lastpost_info1
$hook_query_fields
FROM " . TABLE_PREFIX . "thread AS thread
$tachyjoin
$hook_query_joins
WHERE forumid = $foruminfo[forumid]
AND sticky = 0
$visiblethreads
$globalignore
$limitothers
$datecut
$hook_query_where
ORDER BY sticky DESC, $sqlsortfield $sqlsortorder
LIMIT $limitlower, $perpage
");
---
replace
---
$getparent_id = '';
$getparentid = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "forum WHERE parentid='" . $foruminfo[forumid] . "'");
if (mysql_num_rows($getparentid) 0) {
while ($getparentids = $db->fetch_array($getparentid)) {
$getparent_id .= ',' . $getparentids[forumid];
}
}
$getthreadids = $db->query_read_slave("
SELECT " . iif($sortfield == 'voteavg', $votequery) . " thread.threadid
$lastpost_info1
$hook_query_fields
FROM " . TABLE_PREFIX . "thread AS thread
$tachyjoin
$hook_query_joins
WHERE forumid IN (" . $foruminfo[forumid] . $getparent_id . ")
AND sticky = 0
$visiblethreads
$globalignore
$limitothers
$datecut
$hook_query_where
ORDER BY sticky DESC, $sqlsortfield $sqlsortorder
LIMIT $limitlower, $perpage
");
// End SubThread
---
open
threadbit
find :
---
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]"<if condition="$show['gotonewpost']"> style="font-weight:bold"</if>>$thread[threadtitle]</a>
---
add after :
---
<span style="float:left"><a href="forumdisplay.php?f=$thread[forumid]">[$thread[forumtitle]]</a></span>
---
hack4: Fnan4arab
find
---
$stickies = $db->query_read_slave("
SELECT thread.threadid, lastpost, open
FROM " . TABLE_PREFIX . "thread AS thread
WHERE forumid = $foruminfo[forumid]
AND sticky = 1
$visiblethreads
$limitothers
$globalignore
");
---
replace
---
$getparent_id = '';
$getparentid = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "forum WHERE parentid='" . $foruminfo[forumid] . "'");
if (mysql_num_rows($getparentid) 0) {
while ($getparentids = $db->fetch_array($getparentid)) {
$getparent_id .= ',' . $getparentids[forumid];
}
}
$stickies = $db->query_read_slave("
SELECT thread.threadid, lastpost, open
FROM " . TABLE_PREFIX . "thread AS thread
WHERE forumid IN (" . $foruminfo[forumid] . $getparent_id . ")
AND sticky = 1
$visiblethreads
$limitothers
$globalignore
");
// End SubThread
---
find
---
$getthreadids = $db->query_read_slave("
SELECT " . iif($sortfield == 'voteavg', $votequery) . " thread.threadid
$lastpost_info1
$hook_query_fields
FROM " . TABLE_PREFIX . "thread AS thread
$tachyjoin
$hook_query_joins
WHERE forumid = $foruminfo[forumid]
AND sticky = 0
$visiblethreads
$globalignore
$limitothers
$datecut
$hook_query_where
ORDER BY sticky DESC, $sqlsortfield $sqlsortorder
LIMIT $limitlower, $perpage
");
---
replace
---
$getparent_id = '';
$getparentid = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "forum WHERE parentid='" . $foruminfo[forumid] . "'");
if (mysql_num_rows($getparentid) 0) {
while ($getparentids = $db->fetch_array($getparentid)) {
$getparent_id .= ',' . $getparentids[forumid];
}
}
$getthreadids = $db->query_read_slave("
SELECT " . iif($sortfield == 'voteavg', $votequery) . " thread.threadid
$lastpost_info1
$hook_query_fields
FROM " . TABLE_PREFIX . "thread AS thread
$tachyjoin
$hook_query_joins
WHERE forumid IN (" . $foruminfo[forumid] . $getparent_id . ")
AND sticky = 0
$visiblethreads
$globalignore
$limitothers
$datecut
$hook_query_where
ORDER BY sticky DESC, $sqlsortfield $sqlsortorder
LIMIT $limitlower, $perpage
");
// End SubThread
---
open
threadbit
find :
---
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]"<if condition="$show['gotonewpost']"> style="font-weight:bold"</if>>$thread[threadtitle]</a>
---
add after :
---
<span style="float:left"><a href="forumdisplay.php?f=$thread[forumid]">[$thread[forumtitle]]</a></span>
---
hack4: Fnan4arab