Bravo List
Register
Go Back   > Bravo List > Torrents Trackers > TBDev > Mods & Themes
Reply
  #1  
Old 03-12-12, 14:22
rabtb's Avatar
rabtb rabtb is offline
Senior Member
 
Join Date: Aug 2008
Posts: 39
Default req top 10
im after top 10 mod like on bills source here
http://www.bvlist.com/other-downloads/8536-tbdev08.html

i got topten so think it just code for index.php to show top10 and latest like that on there
Reply With Quote
  #2  
Old 31-05-15, 01:13
TheLastKinQ's Avatar
TheLastKinQ TheLastKinQ is offline
Member
 
Join Date: Jun 2008
Posts: 2
Default
Add to index.php


Code:
//== Top ten torrents
       print("<script type='text/javascript' src='{$TBDEV['baseurl']}/scripts/wz_tooltip.js'></script>");
print("<table width=100% cellspacing='0' cellpadding='5'>
       <tr><td align='center'>");
       
$res = mysql_query("SELECT t.id, t.name, t.added,  t.category, t.seeders, t.times_completed, t.leechers, categories.name AS cat_name, categories.image AS cat_pic "."FROM torrents AS t "."LEFT JOIN categories ON categories.id = t.category "."WHERE t.visible='yes' "."ORDER BY t.times_completed DESC LIMIT 5 ") or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) > 0) {
       Print("<table width=100% align='center' class='tableinborder' border='2' cellspacing='0' cellpadding='5'>\n");
       Print("<tr><td class=tdh2>Type</td><td class='tdh2'><b>Name [Top 10 torrents]</b></td>
<td class=tdh2 align=center>Added</td>
<td class=tdh2 align=center>Snatched</td>
<td align=center class='tdh2' width='1%'>Seeders</td>
<td align=center class='tdh2' width='1%'>Leechers</td></tr>\n");
       while ($arr = mysql_fetch_assoc($res)) {
       $torrname = htmlspecialchars($arr['name']);
       if (strlen($torrname) > 150)
       $torrname = substr($torrname, 0,150) . "...";


$catname = htmlspecialchars($arr['cat_name']);
$catpic = htmlspecialchars($arr['cat_pic']);


       Print("<tr><td class=tablea width=42><a href='/browse.php?cat={$arr['category']}'><img border=\"0\"  src='pic/{$catpic}' width=42 height=42 alt=\"{$row['cat_name']}\" /></a></td>
<td class='tablea' align=left><a href=\"{$TBDEV['baseurl']}/details.php?id=".$arr['id']."&amp;hit=1\" onmouseover=\"Tip('$poster');\" onmouseout=\"UnTip();\">".$torrname."</a></td>
<td align=center>".$arr["added"]."</td><td align=center>".$arr['times_completed']."</td><td align=center>".$arr['seeders']."</td><td align=center>".number_format($arr['leechers'])."</td></tr>\n"); 
       }
       Print("</table>\n");
       } else
       Print("no torrents here :(");
       Print("</td>");
       print("</tr></table></div>");
       //== End topten torrents
Reply With Quote
The Following User Says Thank You to TheLastKinQ For This Useful Post:
LACA34 (25-06-15)
Reply

Tags
10 , req , top

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 11:55. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2017, vBulletin Solutions Inc.