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

ligal or not — 2008-02-11 03:57:52 in General Chat
Just make sure you don't fall in the target zone of MPAA/RIAA/IFPI because even if it's not illegal, they can be your worst nightmare, and shut you down.
Or just PM me so I can do it for you  :)

get_ratio_color, in functions.php:

function get_ratio_color($ratio)

 {

global $ratio;

if ($ratio < 0.1) return "#ff0000";

if ($ratio < 0.2) return "#ee0000";

if ($ratio < 0.3) return "#dd0000";

if ($ratio < 0.4) return "#cc0000";

if ($ratio < 0.5) return "#bb0000";  

if ($ratio < 0.6) return "#aa0000";

if ($ratio < 0.7) return "#990000";

if ($ratio < 0.8) return "#880000";

if ($ratio < 0.9) return "#770000";

if ($ratio < 1) return "#660000";

return "#000000";

 }
torrent search engine — 2008-02-10 08:16:29 in General Chat
You use a [url="http://www.google.ca/search?hl=en&q=%2Bdownload+crawler&btnG=Search&meta="]crawler[/url] and use it with a [url="http://www.google.ca/search?hl=en&q=php+search+engine+%2Bdownload&btnG=Search&meta="]search engine[/url] backend. I don't have an all-in-one solution but it should point you in the right direction. Of course you could always just run a search engine grabbing its results from google, which eliminates the need for a crawler, but that might be less efficient in certain cases and could be problematic if indexing private sites (like yours for example).

[url="http://www.phpdig.net"]PhpDig[/url] seems nice, but there are probably many more to look at...
This mod will add a warning (!) image to warned users. It was requested [url="http://www.torrenttrader.org/index.php?showtopic=7843"]here[/url]. This code is based on a vanilla 2.02 install with the [url="http://www.torrenttrader.org/index.php?showtopic=7249"]VIP/DONOR[/url] mod.  Sorry for those of you who are just installing 2.03 but this will probably not work 100% since the VIP/DONOR mod will not work completely with 2.03. You will need to apply the VIP/DONOR mod before this one or it will not work!. Tested in a development environment, not production.

There are no SQL modifications required for this mod. So first, let's start with the comments...

In functions.php, find:

if ($row["donated"] > 0) { $donated = "<img src=images/star.gif border=0>"; } else { $donated = ""; }
Under, add:


if ($row["warned"] != "no") { $warned = "<img src=images/warned.gif border=0>";}





Next, find (twice):



<b>$postername $donated</b>



Replace with:



<b>$postername $donated $warned</b>







That's it for comments. Next, we do the blocks.

In onlineusers_block.php, find:



$usersonlinequery = mysql_query("SELECT id, username, class, donated FROM users WHERE privacy !='strong' AND UNIX_TIMESTAMP(" . get_dt_num() . ") - UNIX_TIMESTAMP(users.last_access) < 900") or die(mysql_error());



Replace with:



$usersonlinequery = mysql_query("SELECT id, username, class, donated, warned FROM users WHERE privacy !='strong' AND UNIX_TIMESTAMP(" . get_dt_num() . ") - UNIX_TIMESTAMP(users.last_access) < 900") or die(mysql_error());





find:



if ($user["donated"] > 0) { $star = " <img src=images/star.gif border=0>"; } else {  

$star = ""; }



Under, add:



if ($user["warned"] != "no") { $warned = " <img src=images/warned.gif border=0>"; }





Find:

</font></a>$star, "



Replace with:



</font></a>$star$warned, "







login_block.php:

find:

if ($CURUSER["donated"] > 0) { $star = "&nbspl<img src=images/star.gif border=0>"; }		  

else { $star = ""; }

begin_block("".$CURUSER[username]."$star");



Replace with:



if ($CURUSER["donated"] > 0) { $star = "&nbspl<img src=images/star.gif border=0>";}

if ($CURUSER["warned"] != "no") { $warned = "&nbspl<img src=images/warned.gif border=0>";}

begin_block("".$CURUSER[username]."$star $warned");







On to the shoutbox...

find:



$a = mysql_query("SELECT class, donated FROM `users` WHERE id = $row[userid] ");



Replace with:



$a = mysql_query("SELECT class, donated,warned FROM `users` WHERE id = $row[userid] ");





find:



if ($a["1"] > 0) { $star = " <img src=images/star.gif border=0>"; }

else { $star = ""; }



echo '</td><td style="font-size: 12px; padding-left: 5px"><a

href="'.$site_config['SITEURL'].'/account-details.php?id='.$row['userid'].'"

target="_parent"><b>'.$user.' '.$star.':</b></a>  '.nl2br(format_comment($row['message']));





Replace with:



if ($a["1"] > 0) { $star = " <img src=images/star.gif border=0>"; }					

if ($a["2"] != "no") { $warned = " <img src=images/warned.gif border=0>"; }



echo '</td><td style="font-size: 12px; padding-left: 5px"><a

href="'.$site_config['SITEURL'].'/account-details.php?id='.$row['userid'].'"

target="_parent"><b>'.$user.' '.$star.' '.$warned.':</b></a>  '.nl2br(format_comment($row['message']));



That should be it. I realized while writing this that quite a few things changed in 2.03 and the VIP/DONOR mod might not work 100% anymore... when I get some time I'll try to update it and maybe integrate it with this one. As usual, let me know of problems and I'll see what I can do.

TorrentTrader v1 or v2? — 2008-02-02 22:42:28 in General Chat
A "production" site is a live site, with users etc... not a test site or a development site. And there's an upgrade from 1.x to 2.x procedure posted by FLASH so you don't lose your users, along with proper modifications to the database when you apply new mods...

When I have some time I'll look into what the major code/layout changes are from 1.x and make a list... unless developers do it first :)
TorrentTrader v1 or v2? — 2008-01-31 14:15:48 in General Chat
Version 2 is still a work in progress, as you can see from the many mods, bug fixes, updates.. etc. V1 has been tried and tested, and V2 still has some work to do to prove itself IMHO. V2 is (was) not recommended for a production site, because of its missing features and often updates, and believe me sometimes it's a lot of work to catch up with those updates (*cough* time function *cough*) especially if you have a modified code. Even if my manual patches make it that more easy, it's still a PITA.

My opinion: stay with 1.x until 2.x has been deemed stable, or is closer to a final release than it's now. Though if you feel like going with 2.x, it works fine itself, that's what I'm using on my production site and have yet to encounter any major issues that aren't addressed.
My site was blocked — 2008-01-31 01:40:06 in General Chat
How big is your site (MB)? How many users? How much traffic does it generate (GB/month)? How much bandwidth do you need (GB/month)? How big is your database (MB)? etc...

Give me some info and I might have something for you :)
My site was blocked — 2008-01-30 19:27:06 in General Chat
Get a new host?
Try the code TS added to SVN... I have no clue why you'd be getting that error :S

				$last_access = $CURUSER["last_browse"];

$time_now = gmtime();

if ($last_access > $time_now || !is_numeric($last_access))

$last_access = $time_now;

if (sql_timestamp_to_unix_timestamp($row["added"]) >= $last_access)

$dispname .= "<b><font color=red> - ("._NEW."!)</font></b>";




"Dynamik, post: 37999":
Possible NEW! stay 1 hours after connect ?
No idea.. maybe if your clock is messed up.. or maybe if you're using 2.01 or older and haven't updated the time function...

"lagrace, post: 38007":
The code for forums.php please ???
Seriously? Click on "View new posts" ?

forums.php?action=viewunread
Congratulations TT — 2008-01-28 02:23:46 in General Chat
"msousa, post: 38091":
ye but my service will be kinda easy to use a forum and direct file download:d
Let me guess... full of rapidshare links?

Forums are as old as time as well.. most the stuff you get originates from FXP boards...
Try this.....

Find:

//take comment add

if ($_GET["takecomment"] == 'yes'){

$commentbody = $_POST['body'];



if (!$commentbody)

show_error_msg("Error","You did not enter anything!",1);





Below, add:



//PM NOTIF

$res = mysql_query("SELECT name, owner FROM torrents WHERE id = $id") or die (mysql_error());

$arr = mysql_fetch_array($res);



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

$msg = "You have received a comment on your torrent [url=". $site_config[SITEURL]

."/torrents-details.php?id=$id]" . $arr[name] . "[/url]";

mysql_query("INSERT INTO messages (poster, sender, receiver, msg, added,subject) VALUES('0','0', " . $arr['owner'] . ", " .

sqlesc($msg) . ", '" . get_date_time() . "','New comment!')") or die (mysql_error());

}  

//PM NOTIF
Congratulations TT — 2008-01-28 00:02:50 in General Chat
"Direct download" as in FTP servers have always been around, and probably will be around forever. Torrents were popularized because they leak the scene releases from hacked stros/pubs to the general public, so the general public got all happy that they didn't need to know jack about hacking, scanning, tagging, etc.. to be "part of the scene". I use group dumps, race stros, and FXP sites as sources for most of my torrents, and I can post most of them within 5 minutes of pretime. So torrents aren't a thing of the past, they're just the mainstream equivalent to what you should have to work hard to get access to :)
Here's my own code (ported from 1.x, another dusty mod I never posted). This wrkd fine on my production site:

//SYSTEM CONNECTABLE

if ($CURUSER){

$sqlcon = mysql_query("Select * from peers where userid =" . $CURUSER["id"] . "");

$resultadocon = mysql_fetch_array($sqlcon);

if($resultadocon[connectable] == 'yes')

{

print("<b>Connectable: <font color=green>YES</b></font>");

}

else

{

print("<b>Connectable: <font color=red>NO</b></font>");

}

}

// END CONNECTATBLE
Nice work TS, I did this a while back on my site...

There is no Uploader name listed on torrents.php in standard 2.x, if you do you've applied a mod to do so and I'd need to see your torrenttable function to see how to adjust it correctly....
Replace

<b>'.$row['user'].' '.$star.':</b>
with:
<b>'.$user.' '.$star.':</b>



That was my bad, sorry  :)

First post updated.
Yeah it should work an all 2.x version, it's pretty standard code
Don't know why this wasn't added, they probably just forgot  :P

Requested [url="http://www.torrenttrader.org/index.php?showtopic=7721"]here[/url], taken from 1.08 code, adapted to 2.03.

in functions.php, find:

$dispname = "<b>" . $smallname . "</b>";
Below, add:
// Start NEW! mod

$last_access = sql_timestamp_to_unix_timestamp($CURUSER["last_access"]);

$time_now = gmtime();

if ($last_access > $time_now || !is_numeric($last_access)) {

 $last_access=$time_now;

}

if (sql_timestamp_to_unix_timestamp($row["added"]) >= $last_access){

$dispname = "<b>" . $smallname . "</b> <b><font color=red>(NEW!)</font></b>";

}else{

$dispname = "<b>" . $smallname . "</b>";

}

// end NEW! mod



Tested & working @ TT2.03

This should probably be added to SVN too :)
No idea.. I can't see how it would affect colors. Double-check everything? Maybe you missed something or typo'ed? I used the color mod before I wrote this, so it should work fine
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