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
activity on account-details
Controls ·  Search New posts · Mark unread

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

Unknown User
2011-01-26 12:28:39
Hi everybody,

I would like, in account-details, that the frame activity appears like the Uploaded Torrents's frame.

I mean i would like that it shows 10 results per page, especially for the seeding torrents.

Because when the uploader has many many posts, it's not cool and useful to scrolling this page too long.

I expect that you understood me.

Thanks in advance for your proposition ;)
Unknown User
2011-01-26 13:11:59
if ($user["privacy"] != "strong" || ($CURUSER["control_panel"] == "yes")) {

begin_frame("Local Activity");



$res = mysql_query("SELECT torrent,uploaded,downloaded FROM peers WHERE userid='$id' AND seeder='yes'ORDER BY id DESC LIMIT 1");

if (mysql_num_rows($res) > 0)

 $seeding = peerstable($res);



$res = mysql_query("SELECT torrent,uploaded,downloaded FROM peers WHERE userid='$id' AND seeder='no'ORDER BY id DESC LIMIT 1");

if (mysql_num_rows($res) > 0)

 $leeching = peerstable($res);



if ($seeding)

print("<B>" . CURRENTLY_SEEDING . ":</B><BR>$seeding<BR><BR>");



if ($leeching)

print("<B>" . CURRENTLY_LEECHING . ":</B><BR>$leeching<BR><BR>");



if (!$leeching && !$seeding)

print("<B>This member currently has no active transfers<BR><BR>");



end_frame();


Try this  ;)

if this was that you want, change ORDER BY id DESC LIMIT 1"  number 1 to that you want
Unknown User
2011-01-26 18:07:24
I've tried your mod and it don't work...

it shows only the torrent numbers that i've changed in DESC LIMIT 1...Any page like the Uploaded Torrents frame

Thanks to propose ;)
Unknown User
2011-01-26 20:02:25
do you mean first 25 , then next /prev at the bottom?
Unknown User
2011-01-27 19:41:32
Quote:
do you mean first 25 , then next /prev at the bottom?

Yes, in fact, i would like that 10 results appear per page, like the uploaded torrent's frame.

You see what I mean ?
Unknown User
2011-01-28 08:25:09
try this:

if ($user["privacy"] != "strong" || ($CURUSER["control_panel"] == "yes")) {

begin_frame("Local Activity");



$total = mysql_query("SELECT COUNT(*) FROM peers WHERE userid='$id' AND seeder='yes'") or die(mysql_error());

$row = mysql_fetch_array($total);

$count = $row[0];

if ($count) {

list($pagertop, $pagerbottom, $limit) = pager(10, $count, "account-details.php?id=$id&" . $addparam);

$res = mysql_query("SELECT torrent,uploaded,downloaded FROM peers WHERE userid='$id' AND seeder='yes'$limit");



$seeding = peerstable($res);

 }

$total = mysql_query("SELECT COUNT(*) FROM peers WHERE userid='$id' AND seeder='no'") or die(mysql_error());

$row = mysql_fetch_array($total);

$count = $row[0];

if ($count) {

list($pagertop, $pagerbottom, $limit) = pager(10, $count, "account-details.php?id=$id&" . $addparam);

$res = mysql_query("SELECT torrent,uploaded,downloaded FROM peers WHERE userid='$id' AND seeder='no'$limit");



 $leeching = peerstable($res);

}

if ($seeding) {



print($pagertop);

print("<B>" . CURRENTLY_SEEDING . ":</B><BR>$seeding<BR><BR>");

print($pagerbottom);

}

if ($leeching) {



print($pagertop);

print("<B>" . CURRENTLY_LEECHING . ":</B><BR>$leeching<BR><BR>");

print($pagerbottom);

}

if (!$leeching && !$seeding)

print("<B>This member currently has no active transfers<BR><BR>");



end_frame();


P.S. the number in pager() must be the same in $perpage in the frame "uploaded torrents"
Unknown User
2011-01-28 09:34:47
thats brilliant thib m8 works 100% , thanks , is there anyway to add the same thing to the snatched mod , so that shows the same?

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

$r = mysql_query("SELECT snatched.torrentid, snatched.uploaded, snatched.downloaded, snatched.complete_date, snatched.last_action, snatched.start_date, torrents.seeders, torrents.leechers, UNIX_TIMESTAMP(snatched.start_date) AS st, UNIX_TIMESTAMP(snatched.last_action) AS lt, UNIX_TIMESTAMP(snatched.complete_date) AS ct, snatched.start_date, snatched.recorded_time 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>Ratio</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>Seed Time</td>\n" ."<td class=table_head align=center>Seeder</td>\n" ."<td class=table_head align=center>Leecher</td>\n" ."<td class=table_head align=center>Seeding?</td>\n" ."<td class=table_head align=center>Ask Reseed</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]\" border=\"0\">";

$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]);

$seedtime = seedtime($a[recorded_time]);

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

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

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

}

$res3 = mysql_query("SELECT * FROM peers WHERE torrent=". $a[torrentid] ." AND userid=$id");  

$arr3 = mysql_fetch_assoc($res3);

$seedeur = $arr3["seeder"];

if ($seedeur == "yes") {

$reseed = "<font color=green>Seeding</font>";

} else {

$reseed = "<b><a href=torressed.php?id=".$a[torrentid]."&mecid=$id>Reseed</a></b>";

}

$seeder = $a["seeders"];

$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_col2 align=center>$ratio</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_col2 align=center>".(is_null($seedtime)?"0":$seedtime)."</td>\n" ."<td class=table_col1 align=center>". $a[seeders] ."</td>\n" ."<td class=table_col1 align=center>". $a[leechers] ."</td>\n" ."<td class=table_col1 align=center>" . ($arr3["seeder"] == "yes" ? "<b><font color=green>Yes</font>" : "<font color=red>No</font></b>") . "</td>\n" ."<td class=table_col2 align=center>$reseed</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("User's Snatched Torrents");

echo "<B>Completed torrents:</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
2011-01-28 10:21:11
try this but  i didn't test it

find :

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

replace by :

$total = mysql_query("SELECT COUNT(*) FROM snatched WHERE userid = ". $user[id] ." AND finished='yes'") or die(mysql_error());

$row = mysql_fetch_array($total);

$count = $row[0];

list($pagertop, $pagerbottom, $limit) = pager(10, $count, "account-details.php?id=$id&" . $addparam);



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





find :



<div id='k1' style='display: none;'>$completed</div>



replace by :



<div id='k1' style='display: none;'>$pagertop<br/>$completed<br/>$pagerbottom</div>



and same thing for number in pager()
Unknown User
2011-01-28 10:36:45
just about right m8 , shows but if i click next , the java klappe snatched box collapses , but goes to next 25 , but also the local activity block goes to next 25 also  , and if they don't have 25 in local activity block , just shows blank , so both boxes are affected by the next, any idea , as i say , almost there and looks so much cleaner:)
Unknown User
2011-01-28 15:14:38
"thib, post: 70124":
try this:

if ($user["privacy"] != "strong" || ($CURUSER["control_panel"] == "yes")) {

begin_frame("Local Activity");



$total = mysql_query("SELECT COUNT(*) FROM peers WHERE userid='$id' AND seeder='yes'") or die(mysql_error());

$row = mysql_fetch_array($total);

$count = $row[0];

if ($count) {

list($pagertop, $pagerbottom, $limit) = pager(10, $count, "account-details.php?id=$id&" . $addparam);

$res = mysql_query("SELECT torrent,uploaded,downloaded FROM peers WHERE userid='$id' AND seeder='yes'$limit");



$seeding = peerstable($res);

 }

$total = mysql_query("SELECT COUNT(*) FROM peers WHERE userid='$id' AND seeder='no'") or die(mysql_error());

$row = mysql_fetch_array($total);

$count = $row[0];

if ($count) {

list($pagertop, $pagerbottom, $limit) = pager(10, $count, "account-details.php?id=$id&" . $addparam);

$res = mysql_query("SELECT torrent,uploaded,downloaded FROM peers WHERE userid='$id' AND seeder='no'$limit");



 $leeching = peerstable($res);

}

if ($seeding) {



print($pagertop);

print("<B>" . CURRENTLY_SEEDING . ":</B><BR>$seeding<BR><BR>");

print($pagerbottom);

}

if ($leeching) {



print($pagertop);

print("<B>" . CURRENTLY_LEECHING . ":</B><BR>$leeching<BR><BR>");

print($pagerbottom);

}

if (!$leeching && !$seeding)

print("<B>This member currently has no active transfers<BR><BR>");



end_frame();


P.S. the number in pager() must be the same in $perpage in the frame "uploaded torrents"

Hi Guys,

Thanx. That worked like a charm. Okay... for all the newbs like me that are asking themselves where to copy this code.  Well follow this.

Edit and find in account-detail the code below:

if ($user["privacy"] != "strong" || ($CURUSER["control_panel"] == "yes")) {

begin_frame("Local Activity");

$res = mysql_query("SELECT torrent,uploaded,downloaded FROM peers WHERE userid='$id' AND seeder='yes'");

if (mysql_num_rows($res) > 0)

$seeding = peerstable($res);

$res = mysql_query("SELECT torrent,uploaded,downloaded FROM peers WHERE userid='$id' AND seeder='no'");

if (mysql_num_rows($res) > 0)

$leeching = peerstable($res);

if ($seeding)

print("<B>" . CURRENTLY_SEEDING . ":</B><BR>$seeding<BR><BR>");

if ($leeching)

print("<B>" . CURRENTLY_LEECHING . ":</B><BR>$leeching<BR><BR>");

if (!$leeching && !$seeding)

print("<B>This member currently has no active transfers<BR><BR>");

end_frame();

Replace EVERYTHING with the post of THIB!

Thanx. Regards.
Unknown User
2011-01-28 19:31:05
Thank you all !!

It works like a charm thib...

Really many thanks to the communauty ! ;)
Unknown User
2011-01-28 19:47:20
Yep... Thanx to all who takes the time to repost.

Cheers.
Unknown User
2011-01-29 16:24:37
"SJC2TK, post: 70069":
do you mean first 25 , then next /prev at the bottom?

Hi Guys,

I was wondering if it's possible to adapt the the MOD from THIB ( wich is BTW excellent ) to show the same way under the account.php?action=mytorrents. The problem is that under MY TORRENT, it shows the UPLOAD and DOWNLOAD in burden way.  Would it be possible to distinguised the UPLOAD, DOWNLOAD and the CURRENTLY SEEDING?  In other words, the same way we see it in the TORRENT-DETAILS with adding the CURRENTLY SEEDING!

Thanx. Regards.



Uploaded_Torrents.jpg
Uploaded_Torrents.jpg
Currently_Seeding.jpg
Currently_Seeding.jpg
Unknown User
2011-01-30 00:21:42
is that after you click next in one of the uploaded , seeding categorys m8 , as i said , it changes both , and if not the same amount in the other block , it shows a blank page , not quite right but a lot tidier just needs a little work on it
Unknown User
2011-02-01 07:25:06
Quote:
Hi Guys,
I was wondering if it's possible to adapt the the MOD from THIB ( wich is BTW excellent ) to show the same way under the account.php?action=mytorrents. The problem is that under MY TORRENT, it shows the UPLOAD and DOWNLOAD in burden way. Would it be possible to distinguised the UPLOAD, DOWNLOAD and the CURRENTLY SEEDING? In other words, the same way we see it in the TORRENT-DETAILS with adding the CURRENTLY SEEDING!

Thanx. Regards.

in account-details.php find:

function peerstable($res){

$ret = "<table align=center cellpadding=\"3\" cellspacing=\"0\" class=\"table_table\" width=\"95%\" border=\"1\"><tr><td class=table_head>" . NAME . "</td><td class=table_head align=center>" . SIZE . "</td><td class=table_head align=center>" . UPLOADED . "</td>\n<td class=table_head align=center>" . DOWNLOADED . "</td><td class=table_head align=center>" . RATIO . "</td></tr>\n";



while ($arr = mysql_fetch_assoc($res)){

$res2 = mysql_query("SELECT name,size FROM torrents WHERE id=$arr[torrent] ORDER BY name");

$arr2 = mysql_fetch_assoc($res2);

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

$ratio = number_format($arr["uploaded"] / $arr["downloaded"], 2);

}else{

$ratio = "---";

}

$ret .= "<tr><td class=table_col1><a href=torrents-details.php?id=$arr[torrent]&amp;hit=1><b>" . htmlspecialchars($arr2[name]) . "</b></a></td><td align=center class=table_col2>" . mksize($arr2["size"]) . "</td><td align=center class=table_col1>" . mksize($arr["uploaded"]) . "</td><td align=center class=table_col2>" . mksize($arr["downloaded"]) . "</td><td align=center class=table_col1>$ratio</td></tr>\n";

 }

 $ret .= "</table>\n";

 return $ret;

}





and replace by this:



function peerstable($res){

$ret = "<table align=center cellpadding=\"3\" cellspacing=\"0\" class=\"table_table\" width=\"95%\" border=\"1\">

<tr>

<td class=table_head>" .CATEGORY . "</td>

<td class=table_head>" . NAME . "</td>

<td class=table_head>" . UPLOADER . "</td>

<td class=table_head align=center>" . SIZE . "</td>

<td class=table_head align=center>S</td>

<td class=table_head align=center>L</td>

<td class=table_head align=center>C</td>

<td class=table_head align=center>" . UPLOADED . "</td>\n

<td class=table_head align=center>" . DOWNLOADED . "</td>

<td class=table_head align=center>" . RATIO . "</td>

</tr>\n";



while ($arr = mysql_fetch_assoc($res)){

$res2 = mysql_query("SELECT name, size, category, seeders, leechers, times_completed,owner FROM torrents  WHERE id=$arr[torrent] ORDER BY name");

$arr2 = mysql_fetch_assoc($res2);

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

$ratio = number_format($arr["uploaded"] / $arr["downloaded"], 2);

}else{

$ratio = "---";

}

$image = mysql_query("SELECT name,image FROM categories WHERE id = ".$arr2["category"]." ");

$image_cat = mysql_fetch_assoc($image);

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



$uploader = mysql_query("SELECT username FROM users WHERE id = ".$arr2["owner"]." ");

$name_uploader = mysql_fetch_assoc($uploader);

$uploadeur = "<a href='account-details.php?id=$arr2[owner]'target=_blank>$name_uploader[username]</a>";



$ret .= "<tr>

<td align=center class=table_col1>$image_categorie</td>

<td class=table_col2><a href=torrents-details.php?id=$arr[torrent]&amp;hit=1><b>" . htmlspecialchars($arr2[name]) . "</b></a></td>

<td align=center class=table_col2>" . mksize($arr2["size"]) . "</td>

<td align=center class=table_col1>$uploadeur</td>

<td align=center class=table_col2><font color=green>" . $arr2["seeders"] . "</font></td>

<td align=center class=table_col2><font color=red>" . $arr2["leechers"] . "</font></td>

<td align=center class=table_col2><font color=orange>" . $arr2["times_completed"] . "</font></td>

<td align=center class=table_col1>" . mksize($arr["uploaded"]) . "</td>

<td align=center class=table_col2>" . mksize($arr["downloaded"]) . "</td>

<td align=center class=table_col1>$ratio</td>

</tr>\n";

 }

 $ret .= "</table>\n";

 return $ret;

}
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: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728