SELECT IF(visible = 2, 1, 0) AS isdeleted,
SELECT IF(thread.visible = 2, 1, 0) AS isdeleted,
thread.*
" . iif($vbulletin->options['threadpreview'] > 0 AND THIS_SCRIPT == 'showthread', 'post.pagetext AS preview, ') . "
$tachyjoin
" . iif($vbulletin->options['threadpreview'] > 0 AND THIS_SCRIPT == 'showthread', "LEFT JOIN " . TABLE_PREFIX . "post AS post ON(post.postid = thread.firstpostid)") . "
WHERE thread.threadid = $threadid ");
if($vbulletin->options['threadpreview'] > 0 AND THIS_SCRIPT == 'showthread') { $threadcache["$threadid"]['preview'] = strip_quotes($threadcache["$threadid"]['preview']); $threadcache["$threadid"]['preview'] = preg_replace ('/\n(\s*)/', " ", $threadcache["$threadid"]['preview']); $threadcache["$threadid"]['preview'] = preg_replace ('/\r(\s*)/', " ", $threadcache["$threadid"]['preview']); $threadcache["$threadid"]['preview'] = str_replace(" ", " ", $threadcache["$threadid"]['preview']); $threadcache["$threadid"]['preview'] = preg_replace('/http:\/\/(.*)/', '', $threadcache["$threadid"]['preview']); $threadcache["$threadid"]['preview'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($threadcache["$threadid"]['preview'], false, true), $vbulletin->options['threadpreview']))); }