Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Uploader Rank 2.08
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Mods Completed

Unknown User
2012-11-27 19:03:51
This is an 2.08 version of the Uploader Ranks from [url="https://www.torrenttrader.org/topic/12755-uploader-rank/"]https://www.torrentt...-uploader-rank/[/url]

All credit goes to the original creators.

1st sqls



CREATE TABLE `rangclass` (

`id` int(10) unsigned NOT NULL auto_increment,

`name` varchar(50) default NULL,

`rangpic` varchar(50) default NULL,

PRIMARY KEY (`id`)

) ENGINE=MyISAM AUTO_INCREMENT=3;



INSERT INTO `rangclass` VALUES (1, '1 Rank', 'goblet_bronze.gif');

INSERT INTO `rangclass` VALUES (2, '2 Rank', 'goblet_silver.gif');

INSERT INTO `rangclass` VALUES (3, '3 Rank', 'goblet_gold.gif');



ALTER TABLE `users` ADD `rangclass` int( 10 ) unsigned NOT NULL default '0' AFTER class;

Add this to your language file.




// Addons and Mods

$LANG["ADDON_UPLOADER_RANK"] = "Uploader Rank";






find your account-details.php





//Layout

stdhead(sprintf(T_("USER_DETAILS_FOR"), $user["username"]));






add above







///rang klass uploader/////

$rangclass1 = "<option value=0>---". T_("ADDON_UPLOADER_RANK") ."---</option>n";

$res28 = SQL_Query_exec("SELECT * FROM rangclass ORDER BY name");

while ($rank = mysql_fetch_array($res28))

$rangclass1 .= "<option value=$rank[id]" . htmlspecialchars($user['rangclass'] == $rank['id'] ? " selected" : "") . ">$rank[name]</option>n";

$res22 = SQL_Query_exec("SELECT name,rangpic FROM rangclass WHERE id=$user[rangclass] LIMIT 1");

if (mysql_num_rows($res22) == 1) {

$arr22 = mysql_fetch_assoc($res22);

$rangclass = "<img src=/images/$arr22[rangpic] alt="$arr22[name]" title="$arr22[name]" style='margin-left: 5pt' align=top></td>";

} //mysql_num_rows($res22) == 1

//////end rang klass//////




find







if ($CURUSER["class"] > $user["class"]){

print("<tr><td>".T_("CLASS").": </td><td align=left><select name=class>n");

$maxclass = $CURUSER["class"];

for ($i = 1; $i < $maxclass; ++$i)

print("<option value=$i" . ($user["class"] == $i ? " selected" : "") . ">$prefix" . get_user_class_name($i) . "n");

print("</select></td></tr>n");

}




add after





if ($CURUSER["class"] <= $user["class"]) {

if ($user["rangclass" == 0])

print("<tr><td>". T_("ADDON_UPLOADER_RANK") .": </td><td align=left><select name=rangclass>n" .$rangclass1. "n</select></td></tr>n");

else

print("<tr><td>". T_("ADDON_UPLOADER_RANK") .": </td><td align=left><input type=hidden name=rangclass value=".$user["rangclass"]."></td></tr>n");

} else {

print("<tr><td>". T_("ADDON_UPLOADER_RANK") .": </td><td align=left><select name=rangclass>n" .$rangclass1. "n</select></td></tr>n");

}






find



<?php echo T_("USERCLASS");?>: <?php echo get_user_class_name($user["class"]);?><br />



add after





<?php if ($user["rangclass"] > 0)?><?php echo T_("ADDON_UPLOADER_RANK");?>: <?php echo $rangclass;?><br />






save and close





find in admin-modtasks.php





$class = (int) $_POST["class"];



after add





$rangclass = $_POST["rangclass"];






find





invites=$invites,





add after





 rangclass='$rangclass'



save and close

add the images in to images folder

goblet_bronze.gif
goblet_bronze.gif
goblet_silver.gif
goblet_silver.gif
goblet_gold.gif
goblet_gold.gif
Unknown User
2012-11-27 21:20:49
This is working like a charm

wondering if automatized adding of  rank can be done

example:

500 uploaded torrents bronze medal

1000  -------//--------- silver medal

2000 gold

and same with ratio uploaded

1tb uploaded bronze

2tb --//--  silver

3tb --//--  gold

i think that code would be awesome!
Unknown User
2012-11-27 22:54:17
i suppose anything is possible LOL.. maybe I might look into doing it auto..  but again more stuff you have in cleanup the slower the site runs at times..
Unknown User
2012-11-27 23:08:47
This works and Thank you.

One thing, I'am having a problem with the images not showing up and, I did put the images in the images folder on the server. I have changed the images to gif and png still the same.

[url="http://www.huntersarma.com/download/pic_other/help2.jpg"]http://www.huntersarma.com/download/pic_other/help2.jpg[/url]
Unknown User
2012-11-27 23:30:20
my guess you installed the tracker to an sub dir or something .. try changing this

$rangclass = "<img src=/images
to

$rangclass = "<img src=images
Unknown User
2012-11-27 23:53:08
Yes Its on sub dir and thanks again.
Unknown User
2012-11-28 10:15:01
"darknova, post: 87004":
This is working like a charm

wondering if automatized adding of  rank can be done

example:

500 uploaded torrents bronze medal

1000  -------//--------- silver medal

2000 gold

and same with ratio uploaded

1tb uploaded bronze

2tb --//--  silver

3tb --//--  gold

i think that code would be awesome!

agree want that too
Unknown User
2012-11-28 12:24:20
I tried to implement it in cooly's mod class colors so the rank would show after nicknames...

here is the link to class color mod: https://www.torrenttrader.org/topic/12259-class-colors-function/

found this code but can't seam to make it work...

Quote:
function class_user($name)

{

global $site_config;

$a ="SELECT class, donated, warned FROM `users` WHERE username ='".$name."'";

$res = SQL_Query_exec($a);

$classy = @mysql_fetch_row($res);

switch ($classy[0]) {

case 10: // SYS:

$col = "#1c3b5f";

break;

case 7: // ADMINISTRATORSYS:

$col = "#d8830e";

break;

case 6: // Super Moderator

$col = "teal";

break;

case 5: // Moderator

$col = "#3300CC";

break;

case 4: // Uploader

$col = "#006600";

break;

case 3: // VIP

$col = "#ff0000";

break;

case 2: // Power User

$col = "#33FF33";

break;

default: // User

$name = $name;

}

if ($classy[1]>0){

$star="<img src='".$site_config[sITEURL]."/images/star.png' alt='donated' border='0'>";

}else{

$star="";

}

if($classy[2]=="yes"){

$warn="<img src='".$site_config[sITEURL]."/images/warn.png' alt='warned' border=0>";

}else{

$warn="";

}

if($classy[3]>0){

$rang="<img src='".$site_config[sITEURL]."/images/".$classy[5]."' alt='".$classy[4]."' border='0'>";

}else{

$rang="";

}

return unesc("<font color='".$col."'>".$name."".$star."".$warn."</font>");

}
I have no ranks after names in shoutbox and/or forum...

Help?
Unknown User
2012-12-09 15:20:33
What could be wrong? everything is placed right.

but I get (Database Error. Please report this to an administrator.)on Uploader Rank 2.08

please help me

Sincerely

Balle
Unknown User
2012-12-09 18:09:14
[size=12px]If posting about "database error" or something along that lines,[/size]

[size=12px]does no good if you dont also add the info from your_siteurl/admincp.php?action=sqlerr[/size]
Unknown User
2012-12-09 19:47:08
excuse me my mistake  :)  was one (,) too much in php file hehe

works fine in TT v2.08   good work  :P

Sincerely

Balle
Unknown User
2012-12-18 05:51:44
thanks  :)

in below code



<?php echo T_("USERCLASS");?>: <?php echo get_user_class_name($user["class"]);?><br />

i have




<?php echo T_("USERCLASS"); ?>: <?php echo get_user_class_name($user["class"])?><br />




is it ok?
Unknown User
2012-12-18 07:29:42
either way "should" work for what I noticed, but to be true specs it should be the 1st one, you only missing an ;
Unknown User
2013-01-13 22:13:23
artic i have an error : "Database Error in admin-modtasks.php on line 93: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE id=3' at line 1. Query was: UPDATE users SET email='b873517@rmqkr.net', title='', downloaded='0', uploaded='2147483648', signature='', av....."

my admin-modtasks.php:



SQL_Query_exec("UPDATE users SET email='$email', title=$title, downloaded='$downloaded', uploaded='$uploaded', signature=$signature, avatar=$avatar, ip=$ip, donated=$donated, forumbanned=$forumbanned, warned=$warned, modcomment=$modcomment, enabled=$enabled, invites=$invites, rangclass='$rangclass', WHERE id=$userid");



maybe i understand bad the last instrotuion?
Unknown User
2013-01-13 23:30:02
delete , after

rangclass='$rangclass'
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728