Forumlar & Moderatörler

Forum Kenar Çubugu

Yeni blok ekle

Özel HTML/PHP

Başlık : Son 10 Konu

İçerik Türü : PHP


ob_start(); 
global $vbulletin, $db; 
//Begin Thread Counts  
$toutput='';  
$recent_threads = $vbulletin->db->query_read("  
SELECT thread.threadid, thread.title, thread.dateline, thread.lastpost,  thread.lastposter, thread.lastposterid, thread.visible, thread.open,  thread.postusername, thread.postuserid, thread.replycount, thread.views,  forum.forumid, forum.title as forumtitle
FROM  " . TABLE_PREFIX . "thread AS thread  
LEFT JOIN  " . TABLE_PREFIX . "forum AS  Forum  ON ( forum.forumid = thread.forumid ) 
WHERE NOT ISNULL(threadid) AND visible = '1' AND open!='10'  
ORDER BY lastpost DESC  
LIMIT 0, 10  
");  
$i = 0;  
while ($recent_thread = $db->fetch_array($recent_threads))  
{  
$i++; 
if (!in_array($recent_thread[forumid], array(105,83,121,110,82,112,109,101,102,72))) { 
if ($i & 1) {$class='alt1';} else {$class='alt2';}  
$recent_thread[title] = unhtmlspecialchars($recent_thread[title]);  
$recent_thread[lastpostdate] = vbdate('%d %B %Y, %H:%M:%S', $recent_thread[lastpost], 1);  
$toutput .='<tr><td class="'.$class.'"  align="left"><b><font color="#98B5E2" size="1"  face="verdana,arial"><a href="showthread.php?t='.     $recent_thread[threadid].'">'.     $recent_thread[title].'</a></font></b><br/>';  
$toutput .='<b><span style="color: #333333"><font  size="1" face="verdana,arial">Son Mesaj : <a  href="member.php?u='.$recent_thread[lastposterid].'">'.$recent_thread[lastposter].'</a></font><br/></span></b>';   
$toutput .='<font size="1" face="verdana,arial">Forum: <a  href="forumdisplay.php?f='.$recent_thread[forumid].'">'.$recent_thread[forumtitle].'</a>  | Cevaplar : '.$recent_thread[replycount].'</font><br/>';  
$toutput .='<font size="1" face="verdana,arial">Tarih :  <strong>'.$recent_thread[lastpostdate].'</strong>  </strong></font><hr/></td></tr>';  
}  
} 
//End Thread Counts  

//Sidebar - Begin Forum Threads 
$sb_threads = ' 
<table class="tborder" cellpadding="'.$stylevar[cellpadding].'"  cellspacing="'.$stylevar[cellspacing].'" border="0" width="100%"  align="center"> <thead> <tr> <td  class="tcat"></td> </tr> </thead> <tbody>  <div class="smallfont"> <tr> <td> 
'.$toutput.' 
</td> </tr> </div> </tbody> </table> 
'; 
//Sidebar - End Forum Threads 
echo $sb_threads; 
$db->free_result($recent_threads); 
$output=ob_get_contents(); 
ob_end_clean();
vbulletin-turko.com alıntıdır kullandım paylaşmak istedim