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
[ADDON]complex snatchlist mod
Controls ·  Search New posts · Mark unread

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

Unknown User
2009-03-29 06:15:44
I have a TTv2 updagraded from a v1.08 and there are a snatched table in my SQL .

There are incompatible sentences for this case in User's details codes .

snatched.start_date is snatched.startdat in my SQL's table .

Nice job man , and thank you for this great MOD ( i loved it !  :rolleyes:  )

Here goes my altered codes :

//////////////////////////////////////SNATCHED/////////////////////////////////

$r = mysql_query("SELECT snatched.torrentid, snatched.uploaded, snatched.downloaded, snatched.completedat, snatched.last_action, snatched.startdat, torrents.seeders, torrents.leechers, UNIX_TIMESTAMP(snatched.startdat) AS st, UNIX_TIMESTAMP(snatched.last_action) AS lt, UNIX_TIMESTAMP(snatched.completedat) AS ct, snatched.startdat FROM snatched JOIN torrents ON torrents.id = snatched.torrentid WHERE snatched.finished='yes' AND userid=$id ORDER BY last_action") or sqlerr();

$completed = "<table class=main border=1 cellspacing=0 cellpadding=3>\n" ."<tr>\n" ."<td class=table_head align=center>Cat</td>\n" ."<td class=table_head align=center>Torrent</td>\n" ."<td class=table_head align=center>Upl.</td>\n" ."<td class=table_head align=center>Downl.</td>\n" ."<td class=table_head align=center>Startdate</td>\n" ."<td class=table_head align=center>Enddate</td>\n" ."<td class=table_head align=center>Last action</td>\n" ."<td class=table_head align=center>Leechtime</td>\n" ."<td class=table_head align=center>Seeder</td>\n" ."<td class=table_head align=center>Leecher</td>\n" ."</tr>\n";

while ($a = mysql_fetch_assoc($r)) {

$r1 = mysql_query("SELECT * FROM torrents WHERE id = ". $a[torrentid] ."") or sqlerr(__FILE__, __LINE__);

$a1 = mysql_fetch_assoc($r1);

$r2 = mysql_query("SELECT name, image FROM categories WHERE id = ". $a1[category] ."") or sqlerr(__FILE__, __LINE__);

$a2 = mysql_fetch_assoc($r2);

if ($a["downloaded"] > 0) {

$ratio = number_format($a["uploaded"] / $a["downloaded"], 3);

$ratio = "<font color=" . get_ratio_color($ratio) . ">$ratio</font>";

}elseif ($a["uploaded"] > 0)

$ratio = "Inf.";

else

$ratio = "---";

$uploaded =mksize($a["uploaded"]);

$downloaded = mksize($a["downloaded"]);

$cat = "<img src=\"/images/categories/$a2[image]\" alt=\"$a2[name]\">";

$starttime = $a['start_date'];

$endtime = $a['complete_date'];

$last_action = $a['last_action'];

$leechtime = mkprettytime($a[ct] - $a[st]);

$seedtime = mkprettytime($a[lt] - $a[ct]);

$td = mysql_query("SELECT * FROM torrents WHERE id = ". $a[torrentid] ."");

while ($tdl = mysql_fetch_assoc($td)) {

$timesdownloaded = $a["downloaded"] / $tdl["size"];

}

$smallname3 =substr(htmlspecialchars($a1["name"]) , 0, 20);

if ($smallname3 != htmlspecialchars($a1["name"])) {

$smallname3 .= '...';

}

$completed .= "<tr>\n" ."<td class=table_col1 align=center><a href=torrents.php?cat=". $a1[category] .">$cat</a></td>\n" ."<td class=table_col2><a href=torrents-details.php?id=". $a[torrentid] ."><b>$smallname3</b></a></td>\n" ."<td class=table_col1 align=center>$uploaded</td>\n" ."<td class=table_col2 align=center>$downloaded</td>\n" ."<td class=table_col1 align=center>$starttime</td>\n" ."<td class=table_col2 align=center>$endtime</td>\n" ."<td class=table_col1 align=center>$last_action</td>\n" ."<td class=table_col2 align=center>$leechtime</td>\n" ."<td class=table_col1 align=center>". $a[seeders] ."</td>\n" ."<td class=table_col1 align=center>". $a[leechers] ."</td>\n" ."</tr>\n";

}

$completed .= "</table>";



$res_tor_c = mysql_query("SELECT id FROM snatched WHERE userid = ". $user[id] ." AND finished='yes'");

$tor_c = mysql_num_rows($res_tor_c);

if ($user["id"] == $CURUSER["id"] || $CURUSER["edit_torrents"]=="yes") {

if ($completed)

begin_frame("Snatched user's list");

echo "<B>Completed:</B>&nbsp;<img src='images/plus.gif' id='pic1' onclick='klappe_torrent(1)'>&nbsp;&nbsp;&nbsp;&nbsp;<b>$tor_c Completed Torrent(s)</b><div id='k1' style='display: none;'>$completed</div>";

end_frame();

}

//////////////////////////////////////////////////////////////////////////////
Unknown User
2009-04-05 15:22:51
my error

CODE

Warning: Cannot modify header information - headers already sent by (output started at /home/......../domains/......../public_html/viewsnatches.php:2) in /home/........./domains/.............../public_html/backend/functions.php on line 33
Unknown User
2009-04-19 19:09:22
Great mod.

I'm using TTver04, heavily modded.

It all works well except for an error I'm getting on viewsnatches.php.

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 '' at line 1

I'm sure its either something on this line:

$res3 = mysql_query("select count(snatched.id) from snatched inner join users on snatched.userid = users.id inner join torrents on snatched.torrentid = torrents.id where snatched.torrentid =" . $_GET[id]) or die(mysql_error());

..or a problem with the timestamp, as the database shows all zero's for the complete_date, start_date, last_action and seed_end.

I've looked at it so much i dont know my arse from my elbow now, can anybody offer me any ideas,

Thanks.
Unknown User
2009-06-04 12:03:09
need one more sql : seed_end   :)

ALTER TABLE `snatched` ADD `seed_end` datetime NOT NULL default '0000-00-00 00:00:00'

so can calculate seedtime  ;)

but seedtime is not good calculate cause it take from complete date to seed end.

in that case, if user stop few hours and resseed it, when he will stop it again, it will calculate from complete date to new seed end,

so, the few hours he had stop the torrent are included in the seedtime   :)

in Blaze Storm one, it calculate seedtime from complete date to last action,

so there same probleme if user stop and reseed torrent  ;)

I think it needs another event in announce : startseed. and alter the snatchedlist to add it

need to :

insert startseed = completedate when torrent is completed

insert startseed = startdate for the uploader

update startseed when user reseed

so, to calculate seedtime :

seedtime = seedtime + ( seedend - startseed)

update seedtime when user stop the torrent

in that case the seedtime will be good cause it only take the real seedtime

I try to do something like that for a few days without any good result

every time I have probleme with the announce  :P

may be good coder can take a look at that, it will be nice to have this :)
Unknown User
2009-06-13 00:00:25
works fine

Thanks and great work
Unknown User
2009-06-27 22:56:49
When I do the changes I get the same error as some others before, tracker sending null and torrents red etc

I use 2.03 and I only did the modifications in the first post.

Is the first post updated to contain all the mysql changes and all the correct changes in the code?

I would like to use this mod but I am not sure what part of the code isnt correct.

Happy for help!
Unknown User
2009-06-28 04:10:20
works great! many thanks nightmare and azuris
Unknown User
2009-06-28 23:05:59
"avi-torrents, post: 56673":
Great mod.I'm using TTver04, heavily modded.

It all works well except for an error I'm getting on viewsnatches.php.

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 '' at line 1

i have this same error, can anyone help. ?
Unknown User
2009-06-28 23:37:43
try this :

change

$res3 = mysql_query("select count(snatched.id) from snatched inner join users on snatched.userid = users.id inner join torrents on snatched.torrentid = torrents.id where snatched.torrentid =" . $_GET[id]) or die(mysql_error());



for

$res3 = mysql_query("select count(snatched.id) from snatched inner join users on snatched.userid = users.id inner join torrents on snatched.torrentid = torrents.id where snatched.torrentid =" . $_GET[id] . "") or die(mysql_error());
Unknown User
2009-07-03 23:34:16
Just installed this cool mod but when useing viewsnatches.php im getting this error

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 '' at line 1

i saw that some other had the same problem, so i wonder if anyone found where to fix it so it works?

TT2.05 clean

and yeah i did try the above but it still shows the same error.
2009-09-05 00:29:36
I have tried to get to grips what this addon to the tracker does, and please correct me if I am wrong.

I managed to add the code succesfully, but the full working is still a bit unclear to me. I tried to write something down for the admins/mods to the website I am developing, and that is the following:

- [url="http://www.torrenttrader.org/index.php?showtopic=10420"]http://www.torrenttrader.org/index.php?showtopic=10420[/url] [ADDON]complex snatchlist mod

- [url="http://www.torrenttrader.org/index.php?showtopic=10430"]http://www.torrenttrader.org/index.php?showtopic=10430[/url] [HACK]HIT & RUN Full Auto , Addon to Complex Snatched List

What is the complex snatchlist?

The complex snatchlist records, in all details,

- per torrent what has been downloaded/upload and by whom.

- per torrent how long it has been seeded, and specifically by whom...this means you can easily spot hit and runs...(see the addon to this mod!!)

- per user what he/she has been downloaded/uploaded, and for how long...

- if the download has been completed yes or no

- for how long the torrent has been seeded

- when the last seed action has been done

- more to follow in this list...

These stats are kept in memory and can be used to 'observe' members or torrents in question.

Some of these observing actions have been automated by the 'Hit and Run Full Auto' modification.

What is the Hit and Run function?

The Hit and Run addon to this modification does the following with the snatchlist data:

- Auto Sends Re-seed Requests via a PM from the system to users if they stop seeding a torrent before reaching 1:1 ratio status for the specific torrent(No active downloader check ? but can be added so only sends PM if downloaders are/where still active on the torrent after they stopped)

- Adds a Hit and Run warning to a users account if they fail to re-seed and if their ratio is less then 1:1 and there are downloaders still active on the torrent(If no downloaders present no warning given).

- If the number of Hit and Run warnings are 10 or higher then downloads are disabled untill such time the Hit and Run warnings are less then 10. (the number of 10 is set in the cleanup.php script)

- If you have downloaded more than 1GB and if a torrent has been uploaded more then 3 hours ago you will not be recorded as hit and runner.

(No active downloader check ? but can be added so only sends PM if downloaders are/where still active on the torrent after they stopped)

Other topics about this:

[url="http://www.tbdev.net/index.php?showtopic=17656&hl="]http://www.tbdev.net/index.php?showtopic=17656&hl=[/url]

[url="http://www.tbdev.net/index.php?showtopic=17340"]http://www.tbdev.net/index.php?showtopic=17340[/url]

[url="http://www.torrenttrader.org/index.php?showtopic=10430"]http://www.torrenttrader.org/index.php?showtopic=10430[/url]

[url="http://www.torrenttrader.org/index.php?showtopic=8715"]http://www.torrenttrader.org/index.php?showtopic=8715[/url]

Is there more to add? Have I made mistakes? Please let me know, because not all is clear to me from looking at the code.

Thanks in advance...

Frank
If It Ain't Dutch, It Ain't Much!!
Unknown User
2010-01-20 11:12:51
fantastic mod nightmare , all working

whoops spoke too soon , in account details for mrmbers i now get

Fatal error: Call to undefined function datediff() in /home/mush/domains/ragingtorrents.net/public_html/account-details.php on line 138





my line 138 being

Avg Daily DL: <?=mksize($user["downloaded"] / (DateDiff($user["added"], time()) / 86400))?><BR>
Unknown User
2010-01-20 16:25:48
What "complex snatchlist mod" does ?
Unknown User
2010-01-21 01:48:53
all sorted now nightmare , it was adding bbcodes that did it , removed re-modded bbcodes and all fine now , great mod .... thanks

Quote:
What "complex snatchlist mod" does ?

this

Unknown User
2010-01-31 17:15:08
working great thanks all
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