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
[MOD] Colored ratio
You don't have permission for this action!
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2008-12-03 11:59:17
Hi!

find in login_block.php:

		$userratio = "---";

print ("<center><img width=80 height=80 src=$avatar></center><br>" . DOWNLOADED . ": $userdownloaded<br>" . UPLOADED . ": $useruploaded<BR>".WORD_CLASS.": $CURUSER[level]<BR>" . ACCOUNT_PRIVACY_LV . ": $privacylevel<BR>". RATIO .": $userratio");

replace:

$userratio = "---";

if ($userratio < $site_config["ratiowarn_minratio"]) {

$ratiocolor = "red";

}else{

$ratiocolor = "green";}

print ("<center><img width=80 height=80 src=$avatar></center><br><font color=\"black\">" . DOWNLOADED . ":<font color=\"red\"> $userdownloaded<br><font color=\"black\">" . UPLOADED . ":<font color=\"green\"> $useruploaded<font color=\"black\"><BR>" . ACCOUNT_PRIVACY_LV . ": $privacylevel<BR>". RATIO .": <font color=\"$ratiocolor\">$userratio</font>");

find in account_details.php:

//$ratio
if ($user["downloaded"] > 0) {

$ratio = $user["uploaded"] / $user["downloaded"];

}else{

$ratio = "---";

}

add below:

if ($ratio < $site_config["ratiowarn_minratio"]) {
$ratiocolor = "red";

}else{

$ratiocolor = "green";}

find:

		Ratio: <?=$ratio?></font><BR>


replace:

		Ratio: <font color=<?=$ratiocolor?>><?=$ratio?></font><BR>


Heav fun!
Unknown User
2008-12-03 14:39:13
double post   :D

[url="http://www.torrenttrader.org/index.php?showtopic=9531"]http://www.torrenttrader.org/index.php?showtopic=9531[/url]
Unknown User
2008-12-03 16:22:50
Why double?

My mod is colored RATIO, and gandalf76 mod is colored UPLOAD & DOWNLOAD STAT! The two not though it... :D
Unknown User
2008-12-03 18:05:08
ok, sorry I read too quickly

there's another way to colorize ratio with function get_ratio_color :D
Unknown User
2008-12-13 16:45:37
Thanks.Works fine.
Unknown User
2009-02-16 08:28:59
There is an error in this coding which displays the incorrect color in the account details:

Above it is listed as:

In account_details.php add:

if ($userratio < $site_config["ratiowarn_minratio"]) {
$ratiocolor = "red";

}else{

$ratiocolor = "green";}

it should be:

if ($ratio < $site_config["ratiowarn_minratio"]) {
$ratiocolor = "red";

}else{

$ratiocolor = "green";}

This will prevent the ratio in the account details from always showing red no matter what their ratio is.
Unknown User
2009-02-16 13:06:42
Thank you, changed the first post.
Unknown User
2009-02-16 16:03:58
ty, works fine ;)
Unknown User
2009-02-16 22:39:41
"rajen, post: 53886":
Thank you, changed the first post.
No problem at all. We are all here to help eachother right?  ;)
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: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728