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

print("<tr><td align=left><b>" . TOTAL_SIZE . ":</b></td><td>" . mksize($row["size"]) . " </td></tr>\n");

print("<tr><td align=left><b>" . INFO_HASH . ":</b></td><td>" . $row["info_hash"] . "</td></tr>\n");

print("<tr><td align=left><b>" . ADDED_BY . ":</b></td><td>");



if ($row["owner"]) {

print("<a href=account-details.php?id=" . $row["owner"] . ">" . $row["username"] . "</a></td></tr>\n");
I made a mistake with the sender... Updated the first post with TS' code from SVN.
"alamandra, post: 37801":
wooo another step on TT v 2.xx ! great !
I didnt find exactly :

  if ($row["username"])


On version previous to 2.03, it's
I think

if ($row["owner"])
Cool, thanks :)
Just updated the first post, get the new adminbookmark.php file  :)

And if a moderator feels like it, this can be moved to completed mods...
Taken from [url="http://www.torrenttrader.org/index.php?showtopic=6015"]here[/url], requested [url="http://www.torrenttrader.org/index.php?showtopic=7661"]here[/url].

ALTER TABLE users ADD(addbookmark enum ('yes','no') NOT NULL default 'no');
ALTER TABLE `users` ADD `bookmcomment` TEXT NOT NULL;

in account-details.php

find:

<?php
require "backend/functions.php";

dbconn(true);

loggedinonly();

stdhead("Staff bookmark");

$id = 0 + $_GET["id"];

if (isset($_GET["delete"]) && ($_GET["delete"] != "yes")) {

show_error_msg("Delete user $id from staff bookmarks?", "Click <a href=adminbookmark.php?delete=yes&id=$id>here</a> to confirm",1);

}

if ($_GET["delete"] == "yes") {

mysql_query("UPDATE users SET addbookmark = 'no', bookmcomment = '' WHERE id = $id") or die (mysql_error());

show_error_msg("User removed", "User has been removed from staff bookmarks. <a href=adminbookmark.php>Go back</a>.",1);

}

$addbookmark = number_format(get_row_count("users", "WHERE addbookmark='yes'"));

begin_frame("<font color=2fdceb>($addbookmark) total bookmarked users</font>", true);

begin_table();

?>

<table cellpadding="4" cellspacing="1" border="0" style="width:800px" class="tableinborder" ><tr><td

class="tabletitle">ID</td><td class="tabletitle" align="left">Username</td><td class="tabletitle"

align="left">Comment</td><td class="tabletitle" align="left">Uploaded</td><td class="tabletitle"

align="left">Downloaded</td><td class="tabletitle" align="left">Ratio</td><td class="tabletitle"

align="center">Delete</td></tr>

<?

$res=mysql_query("SELECT id,username,bookmcomment,uploaded,downloaded FROM users WHERE addbookmark='yes' ORDER BY id") or

print(mysql_error());

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

if($arr["downloaded"] != 0){

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

} else {

$ratio="---";

}

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

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

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

$uploaded = str_replace(" ", "<br>", mksize($arr["uploaded"]));

$downloaded = str_replace(" ", "<br>", mksize($arr["downloaded"]));

echo "<tr><td class=tablea >" . $arr[id] . "</td><td class=tablea align=\"left\"><b><a href=account-details.php?id=" .

$arr[id] . ">". $arr[username] . "</b></td><td class=tablea align=\"left\">" . $arr[bookmcomment] . "</a></td><td

class=tablea align=\"left\">" . $uploaded . "</td></a></td><td class=tablea align=\"left\">" .$downloaded. "</td><td

class=tablea align=\"left\">$ratio</td>

<td class=tablea align=\"center\"><a href=adminbookmark.php?delete=no&id=".$arr[id]."><img src=images/del.png border=0></a>

</td>

</tr>";

}

end_table();

end_frame();

stdfoot();

?>

In admincp.php, find:

<td align="center"><a href=admincp.php?action=style><img src="images/admin/themes.gif" border=0 width=32 

height=32><BR>Theme Management</a><BR></td>
below, add:
<td align="center"><a href=adminbookmark.php><img src="images/admin/staff_book.png" border=0 width=32

height=32><br>Bookmarked Users</a><BR></td>





rename the image staff_book.png and put it in the images/admin directory.

Enjoy!

PS: If anyone can confirm this works on 2.03, mods can move it to completed mods. I know it works on 2.00 and 2.01 just haven't tested it on a more recent release... though I don't see why it wouldn't work :)
Requested [url="http://www.torrenttrader.org/index.php?showtopic=7704"]here[/url].

It is strongly suggested you apply the [url="http://www.torrenttrader.org/index.php?showtopic=7713"]anonymous uploads fix[/url] before using this. If you don't, you might get unexpected results.

In torrents-edit.php, find:

write_log($CURUSER['username']." has deleted torrent: ID:$torrentid - $torrentname - Reason: $delreason");





Below, add:



if ($CURUSER['id'] != $row['owner']) {

$delreason = $_POST["delreason"];

mysql_query("INSERT INTO messages (sender, receiver, added, subject, msg, unread, location) VALUES(0, ".$row['owner'].", '".get_date_time()."', 'Your torrent \'$torrentname\' has been deleted by ".$CURUSER['username']."', ".sqlesc("'$torrentname' was deleted by ".$CURUSER['username']."\n\nReason: $delreason").", 'yes', 'in')");

}
Ok due to growing amount of requests relating to, or limited by, anonymous uploads, I wrote a quick fix for it. The idea is to always insert an owner, but check for an anonymity flag for the torrent. That way mods will be easier to write, and stats and such would be easier to gather.

I'm hoping TS will add this into 2.04 if enough people want mods requiring this fix.

ALTER TABLE `torrents` ADD `anon` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no' AFTER `owner`;


torrents-upload.php

find:

		//anonymous upload

$anonyupload = unesc($_POST["anonycheck"]);

if ($anonyupload == "yes") {

$uploaderid = "0";

}else{

$uploaderid = $CURUSER["id"];

}
replace with:


		//anonymous upload

$anonyupload = unesc($_POST["anonycheck"]);

$uploaderid = $CURUSER["id"];



if ($anonyupload == "yes")  {

$anon = "yes";  

} else {

$anon = "no";

}





find:



		$ret = mysql_query("INSERT INTO torrents (filename, owner, name, descr, image1, image2, category, added, info_hash,		 

size, numfiles, save_as, announce, external, nfo, torrentlang) VALUES (".sqlesc($fname).", '".$uploaderid."',

".sqlesc($name).", ".sqlesc($descr).", '".$inames[0]."', '".$inames[1]."', '".$type."', '" . get_date_time() . "',

'".$infohash."', '".$torrentsize."', '".$filecount."', ".sqlesc($fname).", '".$announce."', '".$external."', '".$nfo."',

'".$langid."')");





replace with:



$ret = mysql_query("INSERT INTO torrents (filename, owner, anon, name, descr, image1, image2, category, added, info_hash,		 

size, numfiles, save_as, announce, external, nfo, torrentlang) VALUES (".sqlesc($fname).", '".$uploaderid."', '".$anon."',

".sqlesc($name).", ".sqlesc($descr).", '".$inames[0]."', '".$inames[1]."', '".$type."', '" . get_date_time() . "',

'".$infohash."', '".$torrentsize."', '".$filecount."', ".sqlesc($fname).", '".$announce."', '".$external."', '".$nfo."',

'".$langid."')");



(Or just add anon and '".$anon."' to the query if you're using a modified one...)





torrents-details.php



find:



//GET ALL MYSQL VALUES FOR THIS TORRENT

$res = mysql_query("SELECT torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, torrents.nfo, torrents.last_action, torrents.numratings, torrents.name, torrents.owner, torrents.save_as, torrents.descr, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.hits, torrents.times_completed, torrents.id, torrents.type, torrents.external, torrents.image1, torrents.image2, torrents.announce, torrents.numfiles, torrents.freeleech, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.numratings, categories.name AS cat_name, torrentlang.name AS lang_name, torrentlang.image AS lang_image, categories.parent_cat as cat_parent, users.username, users.privacy FROM torrents LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN torrentlang ON torrents.torrentlang = torrentlang.id LEFT JOIN users ON torrents.owner = users.id WHERE torrents.id = $id") or die(mysql_error());





replace with:



//GET ALL MYSQL VALUES FOR THIS TORRENT

$res = mysql_query("SELECT torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, torrents.nfo, torrents.last_action, torrents.numratings, torrents.name, torrents.owner, torrents.anon,torrents.save_as, torrents.descr, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.hits, torrents.times_completed, torrents.id, torrents.type, torrents.external, torrents.image1, torrents.image2, torrents.announce, torrents.numfiles, torrents.freeleech, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.numratings, categories.name AS cat_name, torrentlang.name AS lang_name, torrentlang.image AS lang_image, categories.parent_cat as cat_parent, users.username, users.privacy FROM torrents LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN torrentlang ON torrents.torrentlang = torrentlang.id LEFT JOIN users ON torrents.owner = users.id WHERE torrents.id = $id") or die(mysql_error());



(or add torrents.anon to the query if you're using a modified one)





find:



if ($row["username"])





replace with:



if ($row["anon"] == "no")







torrents-edit.php

find:



$updateset[] = "freeleech = '".$_POST["freeleech"]."'";





below, add:



$updateset[] = "anon = '" . ($_POST["anon"] ? "yes" : "no") . "'";







find:



if ($row["external"] != "yes"){

echo "<tr><td align=right><B>Free Leech: </b></TD><TD><input type=\"checkbox\" name=\"freeleech\"" . (($row["freeleech"] == "1") ? " checked=\"checked\"" : "" ) . " value=\"1\" />Leeching is free? (Only Uploading Counts)<br>";  

}





below, add:



if (($site_config['ANONYMOUSUPLOAD']) && ($row['owner'])) {

echo "<tr><td align=right><B>Upload anonymous: </b></TD><TD><input type=\"checkbox\" name=\"anon\"" . (($row["anon"] == "yes") ? " checked=\"checked\"" : "" ) . " value=\"1\" />(Your userid will not be associated to this upload)<br>";

}




That should be it. Tested on my test site, working fine. Now we can get to work on those mods requiring an owner :)
Nicely done! I had something similar to that in 1.x.. didn't get around to porting it to 2.x
This will prevent people from registering "bad" usernames...

Credits to TBDev.

In account-signup.php, find:

  if (!validusername($wantusername))

$message = "Invalid username.";
Below, add:


// Check for disallowed usernames

$badname = array(

'test',

'infamous',

'tracker',

'fuck'

);

$string = strtolower($wantusername);

$disallow = $badname;

if (in_array($string,$disallow,true))

$message = "Sorry, that username is not allowed, please try another one.";



Simply replace the bad words or add more....

I know, a better method could be implemented using the admincp and mysql, but this does the job.
ftp accounts — 2008-01-06 22:49:38 in General Chat
How else can anyone answer you? Every single FTP daemon operates differently. Everything will be documented with the software (if it's not, I advise you chose another).

You expect us to spoonfeed you information about every single possible FTPd out there? Just chose a server and read its doc before you install it, make sure you like its features, etc... and then, since you'll have read its documentation, you'll know how to set it up.

Plus, we don't even know what OS you're using, so we can't even suggest decent daemons.

I didn't mean it in a bad way.. dont take offense, but reading the .... manual is *always* the answer. Having to point that out well... yeah :(
ftp accounts — 2008-01-06 18:42:59 in General Chat
Completely unrelated to TT.. and google is definitely your best bet...

Just install your favorite FTP server (and RTFM), then create accounts with that home directory... couldn't be simpler.
Moxie hosting sucks — 2007-12-31 21:50:43 in General Chat
lol dont buy your domains at godaddy... If you actually read their policies, you would know they can pull the domain just for you badmouthing them. They have complete control over your domains and usually suspend them after the first complaint... use namecheap instead, you even get a 1 year free whoisguard on your domains, and their policies are "let the courts decide" so your domains are safe there  :(

As for hosting.. vectoral are ok if you have loads of money to spend for cheap hardware, and their bandwidth is incredibly pricey. Even leaseweb isn't what it used to be.. they're kicking out torrent sites now, though seedboxes might still be safe for a while...
"ugmosru, post: 36734":
this addon won't work... TT v 2.02
This addon was made on TT v 2.02
Apply both mods separately, using another image for the one you want...
Sorry, you need to apply [url="http://www.torrenttrader.org/index.php?showtopic=7090"]this[/url] mod to shoutbox before applying the VIP mod. I'll fix the code a little later tonight.
What should be blocked when you add someone to the blocklist? PM only? Comments/forum posts too? Access to the user's detail page?
"teamfsx, post: 36268":
Hi, it's work, yes but if you want redownload your torrent , you can't take this.  :(
You need to compare the username in the thanks field against the userid and permit download that way...

The 'quick download' button should only be removed if the user hasn't thanked the topic, so another check should be required there/ It also probably should grey out the download button from torrent-details.php (or remove it completely) until you thank the topic instead of using the show_error_msg function.  I'll look at it once I get some sleep :S
I'll check it out
Edit: As TS said, just remove the line hit_end();
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