Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev > Mods & Themes
Reply
  #1  
Old 13th October 2010, 12:19
Fynnon's Avatar
Fynnon Fynnon is offline
xxx
 
Join Date: Nov 2007
P2P
Posts: 984
Default Uploaders Rank
This is for TBDev 2009

Example:

Uploader1 - uploads: 22
Uploader2 - uploads: 12
Uplooder3 - uploads: 9

1. Add in table users:
PHP Code:
ALTER TABLE users ADD `numero_uploadsint(10unsigned NOT NULL default '0'
2. In takeupload.php find:
PHP Code:
mysql_query("INSERT INTO files (torrent, filename, size) VALUES ".file_list($filelist,$id)); 
Add below:
PHP Code:
$user123 $CURUSER["id"]; mysql_query("UPDATE users SET numero_uploads = numero_uploads + 1 WHERE id='$user123'") or sqlerr(__FILE____LINE__); 
3. In delete.php find:
PHP Code:
mysql_query("DELETE FROM torrents WHERE id = $id");     foreach(explode(".","peers.files.comments.ratings") as $x
Add above:
PHP Code:
$res mysql_query("SELECT owner FROM torrents WHERE id = $id"); $row mysql_fetch_assoc($res); $rr $row["owner"]; mysql_query("UPDATE users SET numero_uploads = numero_uploads - 1 WHERE id='$rr'") or sqlerr(__FILE____LINE__); 
4. in index.php add this:
PHP Code:
$HTMLOUT .= "<table border=1 width=50% align=center><tr><td>";   $n_up mysql_query("SELECT * FROM users ORDER BY `numero_uploads` DESC LIMIT 4") or sqlerr(); while($rank mysql_fetch_array($n_up)){    static $contar=0$contar++;  $avatar $rank["avatar"]; if (!$avatar)  $avatar "pic/default_avatar.png";   $HTMLOUT .= "<div>  $contar - <a href=userdetails.php?id=".$rank["id"]."><img src=$avatar width=30 height=30 border=0 class=vsmall_thumb></a></div>  &nbsp;&nbsp;<a href=userdetails.php?id=".$rank["id"]."><b>".$rank["username"]."</b></a>&nbsp;&nbsp;Uploads : <b>".$rank["numero_uploads"]."</b> &nbsp;&nbsp; Reputation : ".$rank["reputation"]."  </div>";  } $HTMLOUT .= "</td></tr></table>"
NOTE: In query the value 4 you change for you want, if you want show 10 uploaders change for 10.
Name:  2ajxow7.jpg
Views: 746
Size:  16.7 KB

HID@tbdev.net/index.php?showtopic=22792
Reply With Quote
  #2  
Old 16th May 2011, 23:05
shempsall2009 shempsall2009 is offline
Member
 
Join Date: Apr 2011
United Kingdom
Posts: 8
Default Modification
Hi there,

How would I modify this to place it on NZBStrike?

Thanks
Reply With Quote
  #3  
Old 19th October 2013, 01:16
Marco Marco is offline
Senior Member
 
Join Date: Jun 2009
Seychelles
Posts: 327
Default
hello i am interested for TS 5.6 NC version :)



thank you
Reply With Quote
Reply

Tags
rank , uploaders

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 18:05. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.