TBDev Forum
Programming board
Main Page Forum Rules Privacy Policy Members Contact Us
Welcome Guest (Login | Register)
TBDev Forum TBDev.net - Mods & hacks Mods Complete & working Browse/torrent/Details Mods [Recreate] - Complex Snatchlist mod
Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

[Recreate] - Complex Snatchlist mod

2008-10-06 04:19:00
Group: Member
Posts: 26
Topics participated: 13
Topics started: 3
First post: 2007-06-22 07:06:00
Last post: 2008-12-19 20:59:00
Is it possible to edit viewsnatches.php to display all snatched torrents and display them by user, for example
User Torrentname Uploaded downloaded Startdat Completedat Seeding
Me a-cam 0.00 KB 0.00 KB 2008-03-08 20:53:22 Not completed NO


much like this one but that one wont work with this mod it seems, I get
We have 46 snatched torrents

<< Prev Next >>
1 - 25 | 26 - 46

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/html/snatched_torrents2.php on line 24
Nothing here sad.gif

1 - 25 | 26 - 46
<< Prev Next >>
 
2008-10-09 05:11:00
Group: Member
Posts: 26
Topics participated: 13
Topics started: 3
First post: 2007-06-22 07:06:00
Last post: 2008-12-19 20:59:00
ok, so I didnt get a reply :D so used bits and pieces I found and added some of my own and made one, but have one small issue I wouldnt mind help with. when it displays it shows the torrent name (i have it set to 20 characters) what I would like to do is be able to display the whole title in a set space I provide.
as it is now I have to limit the number of characters so I dont need to scroll the page way ove because of a long torrent name, what I need is some sort of word wrap
turn this
this is the name of the torrent xvid R5 proper by some group
to this
this is the name of
the torrent xvid R5
proper by some group

this is what I have and will work for those with this mod installed.
php

include("include/bittorrent.php");

dbconn(false);
loggedinorreturn();
maxsysop ();
if (get_user_class() < UC_MODERATOR)
stderr("Error", "Permission denied.");
stdhead("All snatched torrents");

$count1 = number_format(get_row_count("snatched"));
print("

All snatched torrents

");
print("
We have $count1 snatched torrents
");
print("
\n");
$res1 = mysql_query("SELECT COUNT(*) FROM snatched $limit") or sqlerr();
$row1 = mysql_fetch_array($res1);
$count = $row1[0];
$snatchedperpage = 25;
list($pagertop, $pagerbottom, $limit) = pager($snatchedperpage, $count, "sn.php?");
print("$pagertop");
$sql = "SELECT * FROM snatched ORDER BY start_date DESC $limit";
$result = mysql_query($sql);
if( mysql_num_rows($result) != 0 ) {
print'';
print'';
print'';
print'';
print'';
print'';
print'';
print'';
print'';
print'';
while( $row = mysql_fetch_array($result) ) {
print'';
$sql1 = "SELECT * FROM users WHERE id = $row[userid]";
$result1 = mysql_query($sql1);
while ($row1 = mysql_fetch_array($result1)) {
print'';

// this is where I am having problems

$sql2 = "SELECT * FROM torrents WHERE id = $row[torrentid]";
$result2 = mysql_query($sql2);
while ($row2 = mysql_fetch_array($result2))
$smallname =substr(htmlspecialchars($row2["name"]) , 0, 20);
if ($smallname != htmlspecialchars($row2["name"])) {
$smallname .= '...';
}

#$smallname = htmlspecialchars($row["torrentid"]);
print'';

// to here

print'';
print'';
print'';
if ($row[complete_date] > 0)
print'';
else
print'';
if ($row[seed_end] == 0)
print'';
else
print'';
print'';
}
}
print '
UserTorrentIDUploadeddownloadedStartdateCompletedateSeeding
' . $row1['username'] . '' . $smallname . '' . mksize($row['uploaded']) . '' . mksize($row['downloaded']) . '' . $row['start_date'] . '' . $row['complete_date'] . 'Not completedYES' . $row['seed_end'] . '
';
}
else {
print 'Nothing here sad.gif';
}
print("$pagerbottom");
print("
\n");

stdfoot();
?>


by the way I named this sn.php for testing purposes, call it what you want but be sure to reflect this change in line 20
 
2008-11-01 18:59:00
Group: Member
Posts: 91
Topics participated: 54
Topics started: 24
First post: 2008-09-15 15:36:00
Last post: 2009-01-03 16:56:00
thx cue nice mod i haved the simple snatchlist :)
 
2008-11-19 23:13:00
Group: Member
Posts: 2
Topics participated: 2
Topics started: 0
First post: 2008-02-11 15:57:00
Last post: 2008-11-19 23:13:00
For the members with complete events on each announce i,ve just tried this worked so far but as it late and i,m just about to go to bed i haven't checked if it has affected anything else yet but it solved the problem for me.

else
{
 
2008-12-07 16:24:00
Group: Member
Posts: 137
Topics participated: 74
Topics started: 24
First post: 2006-10-12 20:44:00
Last post: 2009-01-01 16:14:00
i will only ask if i do this right:) i dont ned some stuff in this so i have try to just delete it in announce, but what i can see it don't work proper after that, maybe it does but i havent wating to see if it does..

this code
mysql_query("INSERT INTO snatched (torrentid, userid, port, start_date, agent,ip,peer_id) VALUES ($torrentid, $userid, $port, $dt, " . sqlesc($agent) . "," . sqlesc($ip) . "," . sqlesc($peer_id) . ")");


if i delete to this, will it work?
mysql_query("INSERT INTO snatched (torrentid, userid, start_date) VALUES ($torrentid, $userid, $dt)");


It seems to work know:) i don't need ip/port/agent/peer_id in snatched..
 

Similar threads

Topic Posts Last post
Hit And Run System for [Recreate] - Complex Snatchlist 12 2008-07-07 15:23:00
Addon for complex snatchlist 20 2008-09-11 19:38:00
Snatchlist mod 13 2007-07-17 22:20:00
complex mod for forum name in titlebar 21 2008-10-10 06:04:00
[New and Improved] Snatchlist 7 2008-06-11 00:19:00