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
User Posts

Go to Profile

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();

}

//////////////////////////////////////////////////////////////////////////////
Works fine in 2.05  THX
Works nice . THX
Sorry , i'm a noobie and i made the changes and not still working for me .

Trouble : when the message is sent to shout i see only my name . The message doesn't goes to the shout .

My codes :

Index.php

if ($site_config['SHOUTBOX']){
begin_frame("Mural");

echo '<IFRAME name="shout_frame" src="'.$site_config["SITEURL"].'/shoutbox.php" frameborder="0" marginheight="0" marginwidth="0" width="99%" height="210" width=350 scrolling="no" align="middle"></IFRAME>';

echo "(O mural
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: 3
  • Members: 0
  • Guests online: 3
  • Comments: 3
  • Messages: 1,728