Forums Logo
 
Reply to this topicStart new topic
> Total files tracked size - Tracker Statistics
gollum
post Jul 21 2006, 10:49 PM
Post #1


Advanced Member
***

Group: Members
Posts: 63
Joined: 29-April 06
Member No.: 33



Hello,
I was wodering if there is a way to add the total size of all the torrents that are beeing tracked on the server?
so maybe it could say:
Torrents: We are tracking xx gb with xx torrents totaling xx files
or something like that.
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post
Jaggi
post Jul 22 2006, 02:22 AM
Post #2


Administrator
***

Group: Project Developer
Posts: 350
Joined: 31-March 06
Member No.: 1



in Board Index > trackerstats

Find:

CODE
[b]
[/b]            <BR /><b>Torrents:</b> We are tracking {$data['torrents']} torrents totaling {$data['files']} files


Replace With:

CODE

<BR /><b>Total:</b> We are tracking a total of {$data['totalsize']} in {$data['torrents']} torrents totaling {$data['files']} files


We are tracking xx gb with xx torrents totaling xx files

Open sources/lib/func_boardstats.php

Find:

CODE

            $this->ipsclass->DB->query("SELECT count( fid ) AS torrents, SUM( leechers ) AS leechers , SUM( seeders ) AS seeders, SUM( numfiles ) AS files


Replace With:

CODE

            $this->ipsclass->DB->query("SELECT count( fid ) AS torrents, SUM( leechers ) AS leechers , SUM( seeders ) AS seeders, SUM(size) AS totalsize, SUM( numfiles ) AS files


Find:

CODE

            $data['files'] = $rsql['files'];


Add Below:

CODE

            $data['totalsize'] = $this->ipsclass->size_format($rsql['totalsize']);
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post
gollum
post Jul 22 2006, 06:32 AM
Post #3


Advanced Member
***

Group: Members
Posts: 63
Joined: 29-April 06
Member No.: 33



Nice! biggrin.gif
Works great! Thanks Jaggi!
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post
Eddie
post Aug 19 2006, 06:40 PM
Post #4


Advanced Member
***

Group: Xtra Member
Posts: 53
Joined: 13-May 06
Member No.: 73



heh thanks
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post
nightwisher
post Oct 3 2006, 03:50 PM
Post #5


Advanced Member
***

Group: Beta Tester
Posts: 66
Joined: 25-April 06
From: Bosnia
Member No.: 17



Nice work !

but need to be carfull i made code till FORUM and all things show me that mysql error and i look and made some free space

Open sources/lib/func_boardstats.php

Find:

CODE
$this->ipsclass->DB->query("SELECT count( fid ) AS torrents, SUM( leechers ) AS leechers , SUM( seeders ) AS seeders, SUM( numfiles ) AS files



Replace With:

CODE
$this->ipsclass->DB->query("SELECT count( fid ) AS torrents, SUM( leechers ) AS leechers , SUM( seeders ) AS seeders, SUM(size) AS totalsize, SUM( numfiles ) AS files


becouse in same line you have FROM torrents"); and need to be carfull when you add code to dont split files example my mistake .....AS filesFROM torrents");

Need to be like this:
CODE
$this->ipsclass->DB->query("SELECT count( fid ) AS torrents, SUM( leechers ) AS leechers , SUM( seeders ) AS seeders, SUM(size) AS totalsize, SUM( numfiles ) AS files FROM torrents");


I write this becouse i made it mistake to warn you and made easy way to edit code !

Thank you for this code ! Working Great

Friendly
Nightwisher

This post has been edited by nightwisher: Oct 3 2006, 03:51 PM
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post

Fast ReplyReply to this topicStart new topic
1 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
1 Members: OPPZeroCool

 

Lo-Fi Version 0.1415 sec    0.23    10 queries    GZIP Enabled
Time is now: 9th October 2006 - 11:36 PM