Results 1 to 10 of 11
-
28th Feb 2012, 10:34 AM #1OPMember
how to display torrent tracker ratio in the navbar or header
hi i want to know how can i display torrent tracker ratio in the navbar or header like this
maverick79 Reviewed by maverick79 on . how to display torrent tracker ratio in the navbar or header hi i want to know how can i display torrent tracker ratio in the navbar or header like this http://desmond.imageshack.us/Himg259/scaled.php?server=259&filename=ratiok.jpg&res=medium Rating: 5
-
28th Feb 2012, 10:44 AM #2Banned
do you own the tracker or not?
if yes,do you want to make it appear in the navbar of all users right?make your question clear
-
28th Feb 2012, 10:45 AM #3OPMember
@sceneguy yes i own a tracker and i want the ratio to appear in the navbar of all users
-
28th Feb 2012, 12:26 PM #4Banned
i dont know how the script works,basically,you have to do this
i`m assuming the navbar is not present atm ..if its already present,skip this part
Code:$result=mysql_query(SELECT * FROM users WHERE id='id'); $r=$result['u']/$result['d'] echo 'upload:'.$result['u'].'download:'.$ratio['d'] echo 'ratio:'.$r;
Thats just the pseudo code.match it for your system.if you need help,pm and we`ll see how to go forward
-
28th Feb 2012, 12:28 PM #5Member
What front-end are you using for your site?
This is the staff, you have been banned
-
28th Feb 2012, 04:49 PM #6
-
1st Mar 2012, 01:45 PM #7OPMember
any more views?
-
1st Mar 2012, 01:50 PM #8Member
Are you using vBitty?
What version of vBulletin? 3/4?This is the staff, you have been banned
-
1st Mar 2012, 01:51 PM #9OPMember
yes iam using vbitty with vbulletin 3.8.5
-
1st Mar 2012, 02:01 PM #10Member
I don't use vB so not too sure, but are you allowed to add php code to the template files?
If you can, try adding this where you want it displayed:
PHP Code:<?php
/**
* vBitty (VBTT) 3 XBT v1.2 SVN
* Coded by Toolmanwill
**/
// get user ratio & display it in various colors
if ($userinfo["downloaded"])
{
$ratio = $userinfo["uploaded"] / $userinfo["downloaded"];
if ($ratio < 0.1)
$s = "<font color=#ff0000>" . number_format($ratio, 2) . "</font>";
else if ($ratio < 0.2)
$s = "<font color=#ee0000>" . number_format($ratio, 2) . "</font>";
else if ($ratio < 0.3)
$s = "<font color=#dd0000>" . number_format($ratio, 2) . "</font>";
else if ($ratio < 0.4)
$s = "<font color=#cc0000>" . number_format($ratio, 2) . "</font>";
else if ($ratio < 0.5)
$s = "<font color=#bb0000>" . number_format($ratio, 2) . "</font>";
else if ($ratio < 0.6)
$s = "<font color=#aa0000>" . number_format($ratio, 2) . "</font>";
else if ($ratio < 0.7)
$s = "<font color=#990000>" . number_format($ratio, 2) . "</font>";
else if ($ratio < 0.8)
$s = "<font color=#880000>" . number_format($ratio, 2) . "</font>";
else if ($ratio < 0.9)
$s = "<font color=#770000>" . number_format($ratio, 2) . "</font>";
else if ($ratio < 1)
$s = "<font color=#660000>" . number_format($ratio, 2) . "</font>";
else
$s = number_format($ratio, 2) ;
}
else
{
if ($userinfo["uploaded"])
$s = "Inf.";
else
$s = "---";
}
$agents = $db->query("SELECT useragent FROM ". TABLE_PREFIX ."peers WHERE uid = '".$userinfo['userid']."'");
$agent = $db->fetch_array($agents);
if ($vbulletin->options['vbtt_show_speeds'])
{
$uspeeds = $db->query("SELECT SUM(upspeed) as ulspeedtot ,SUM(downspeed) as dlspeedtot FROM ". TABLE_PREFIX ."peers WHERE uid = '".$userinfo['userid']."'");
$uspeed = $db->fetch_array($uspeeds);
$ulspeedtot = $uspeed['ulspeedtot'];
$dlspeedtot = $uspeed['dlspeedtot'];
if ($ulspeedtot =="0")
$ulspeed = "<font color=red>".mksize($ulspeedtot, 1, true)."/s"."</font>";
else $ulspeed = "<font color=green>".mksize($ulspeedtot, 1, true)."/s"."</font>";
if ($dlspeedtot =="0")
$dlspeed = "<font color=red>".mksize($dlspeedtot, 1, true)."/s"."</font>";
else $dlspeed = "<font color=#4169e1>".mksize($dlspeedtot , 1, true)."/s"."</font>";
}
$userinfo['downloaded'] = "<font color='#4169e1'> ".mksize($userinfo["downloaded"], 1, true)."</font>";
$userinfo['uploaded']= "<font color='green'>".mksize($userinfo["uploaded"], 1, true)."</font>";
$userinfo['dlspeed'] = $dlspeed;
$userinfo['ulspeed'] = $ulspeed;
$userinfo['ratio']= $s ;
$userinfo['btclient'] = $agent[useragent];
?>This is the staff, you have been banned
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Need a vps for a torrent tracker
By iq2011 in forum Hosting DiscussionReplies: 19Last Post: 7th Feb 2012, 08:03 PM -
Best XXX torrent tracker
By viruz99 in forum General DiscussionReplies: 4Last Post: 22nd Oct 2011, 02:37 PM -
Torrent & Ratio Question
By StyXoN in forum General DiscussionReplies: 10Last Post: 3rd Oct 2011, 04:09 PM -
Whats the best torrent site without ratio issues
By Shagrath in forum General DiscussionReplies: 11Last Post: 2nd May 2011, 05:02 PM -
Header does't display correctly on difference resolutions. Vb4
By Nicol in forum Technical Help Desk SupportReplies: 3Last Post: 20th Sep 2010, 05:50 PM
themaCreator - create posts from...
Version 3.24 released. Open older version (or...