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

TorrentTrader 3.0 — 2019-03-14 20:31:52 in v3 Download
Can be downloaded from github https://github.com/MicrosoulV3/TorrentTrader-v3
All issues after this post have been addressed and the github version is correct as of AUG 9 2024
Always check github for any file fixes. Check the last commit date and compare your files to the commit
ArcticWolf did this originally, I have never tried it. Dev-coder just replaced the url with https, basically overriding any settings and just using https directly, which works just fine I guess, but then there is no reason to have the rest of those settings in the code, but like I said, I never tried this
I may be crazy, but some of that code posted above doesn't make much sense. It should be as simple as this, but I have never tested it. I would like to know where the "TSITEURL" comes from
if($_SERVER['SERVER_PORT'] != '443')             //settings for SSL if you have a certificate
   $site_config['SITEURL'] = 'http://site.com';  //Main Site URL without HTTPS
   else
   $site_config['SITEURL'] = 'https://site.com'; //Main Site URL for HTTPS
 
$site_config['announce_list'] = "$site_config[SITEURL]/announce.php"; //seperate via comma
$site_config['PASSKEYURL'] =  "$site_config[SITEURL]/announce.php?passkey=%s"; // Announce URL to use for passkey
hey, I recognize this function haha
case 'magnet':
$shit = @mysql_fetch_array(@SQL_Query_exec("SELECT info_hash FROM torrents WHERE id=$id"));
print ("<td class='ttable_col$x' align='center'><a href=\"magnet:?xt=urn:btih:" . $shit["info_hash"] . "&dn=" . rawurlencode($row['name']) . "&tr=" . $row['announce'] . "?passkey=". $CURUSER ['passkey']. "\"><img src='" . $site_config['SITEURL'] . "/images/magnetique.png' border='0' width='50' height='50'title='Download via Magnet' /></a></td>");
        break;
Thats fine. Do what you need to. I was asked to do that code a while back for tt 2.08. It works perfectly fine under php 7 unless you rewrote the language code, otherwise, there is really nothing to alter. I just wanted to post this for all to enjoy and edit as they see fit :)
freeleech and/or sticky torrent during upload. In torrents-upload.php before
    //Uploaded ok message (update later)
   if ($external=='no')
       $message = sprintf( T_("TORRENT_UPLOAD_LOCAL"), $name, $id, $id );

add
        if ($CURUSER["edit_torrents"] == "yes")
           if(get_user_class($CURUSER) > 4){
               if ($_POST["sticky"] == "yes"){
               $updateset[] = "sticky = 'yes'";
                }else{
               $updateset[] = "sticky = 'no'";
       }
}
       $updateset[] = "freeleech = '".intval($_POST["freeleech"])."'";
       SQL_Query_exec("UPDATE torrents SET " . join(",", $updateset) . " WHERE id = $id");


after
print ("<tr><td colspan='2' align='center'>".T_("MAX_FILE_SIZE").": ".mksize($site_config['image_max_filesize'])."<br />".T_("ACCEPTED_FORMATS").": ".implode(", ", array_unique($site_config["allowed_image_types"]))."<br /></td></tr><tr><td align='right'>".T_("IMAGE")." 1:&nbsp;&nbsp;</td><td><input type='file' name='image0' size='50' /></td></tr><tr><td align='right'>".T_("IMAGE")." 2:&nbsp;&nbsp;</td><td><input type='file' name='image1' size='50' /></td></tr>");

add
if ($row["external"] != "yes" && $CURUSER["edit_torrents"] == "yes"){
   echo "<tr><td align='right'><b>".T_("FREE_LEECH").": </b></td><td><input type=\"checkbox\" name=\"freeleech\"" . (($row["freeleech"] == "1") ? " checked=\"checked\"" : "" ) . " value=\"1\" />".T_("FREE_LEECH_MSG")."<br /></td></tr>";
   echo "<tr><td align=right><B>Sticky?</td><td><input type='checkbox' name='sticky'" .
(($row["sticky"] == "yes") ? " checked='checked'" : "" ) . " value='yes' />";
}
Multiplayer poker — 2019-02-04 23:51:27 in v2.08 Mod Requests
I edited this file to use the headers and footers of TT, closed all open PHP tags. Thats as far as I made it with this. Some of the code needs restructured since its just a mess, but it functions, you just cant read it very well. Would be a fun game for members of a site to play. Maybe there is potential with this. I just dont have the time for it currently, so I present it to the community. Here is a screenshot of what it looks like. I have it working on TT 2.08 but it is not integrated into the users database or any other part of the DB. It is stand-alone. I made sure to change file names and database entries to not conflict with TT tables
[ATTACH=full]2543._xfImport[/ATTACH]
[ATTACH=full]2544._xfImport[/ATTACH]
[ATTACH=full]2545._xfImport[/ATTACH]
can use this one too

<?php
begin_block(T_("DVD_DATES"));
?>
<form method=get action=http://videoeta.com/search/? target=blank>
<center><img src="/images/eta_logo.png"width="60" height="60"></center>
<center><input type=text name="s" value='' maxlength=30 size=20></center>
<center><img src="/images/blank.gif" width="140" height="5"></center>
<center><input type=submit value=Search></center>
</form>
<?php
end_block();
?>



[ATTACH]2495._xfImport[/ATTACH]
I tossed this together real quick. Adds a search block to find movie release dates from movieinsider.com. If anyone makes a better one, please share

create dvddates_block.php

<?php
begin_block(T_("DVD_DATES"));
?>
<form method=get action=https://www.movieinsider.com/search.php? target=blank>
<center><img src="/images/tmi_logo.png"width="60" height="60"></center>
<center><input type=text name="q" value='' maxlength=30 size=20></center>
<center><img src="/images/blank.gif" width="140" height="5"></center>
<center><input type=submit value=Search></center>
</form>
<?php
end_block();
?>


   add to english.php

$LANG["DVD_DATES"] = "DVD Release Dates";


   upload image to images/ folder

[ATTACH]2494._xfImport[/ATTACH]
copied from TT.org. This will work on TTv3 also

If you display torrents on your index page like this, a fun and neat thing to do is have your trailers and NFO pop up in a lightbox rather than opening a new page or tab when you click the nfo link on the index
[ATTACH]2478[/ATTACH]

I will post the code to make the NFO pop up, its really simple. The same thing works with videos, like youtube. I will briefly go over the video pop-up below, since my site is heavily modified, but first, the NFO.....

In each theme header.php, put jquery (if you already have jquery skip this step). Also upload jquery to the js folder. I included jquery at the bottom of this post.


<script src="/js/jquery-2.2.3.min.js"></script>

at the bottom of each theme header.php, put


<link rel="stylesheet" href="/js/prettyphoto/css/prettyPhoto.css" type="text/css" media="screen" charset="utf-8" />
<script src="/js/prettyphoto/js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
 $(document).ready(function(){
   $("a[rel^='prettyPhoto']").prettyPhoto({
       animation_speed: 'normal', /* fast/slow/normal */
       theme: 'facebook', /* pp_default / light_rounded / dark_rounded / light_square / dark_square / facebook */
       autoplay: true, /* Automatically start videos: True/False */
       default_width: 854,
       default_height: 480,
       deeplinking: false,
       });
 });
</script>

in functions.php, find


           case 'nfo':
               if ($row["nfo"] == "yes")
                   print("<td class='ttable_col$x' align='center'><a href='nfo-view.php?id=$row[id]'><img src='" . $site_config['SITEURL'] . "/images/icon_nfo.gif' border='0' alt='View NFO' /></a></td>");

replace with


           case 'nfo':
               if ($row["nfo"] == "yes")
                   print("<td class='ttable_col$x' align='center'><a href='nfo-view.php?id=$row[id]'rel=\"prettyPhoto\"><img src='" . $site_config['SITEURL'] . "/images/icon_nfo.gif' border='0' alt='View NFO' /></a></td>");

unpack and upload prettyphoto.zip to js folder.  https://www.mediafire.com/file/xld9135c065hzi6/prettyphoto.zip/file

I also attached jquery-2.2.3.min if you dont have it. You can use any version of jquery, so if you already have one, just use that
 

then when you click on the NFO on the index, it will pop up in a lightbox


same thing for trailers or videos on your index page, in this case, its a youtube trailer

in functions.php (if you have the youtube mod http://www.torrenttrader.org/viewtopic.php?f=14&t=712 )


     if ($row["tube"])
           print("<td class='ttable_col$x' align='center'><a rel=\"prettyPhoto\"  href=".$row['tube']." ><".htmlspecialchars($row['tube'])."><img src='" . $site_config['SITEURL'] . "/images/youtube1.png'  border='0' width='50' height='50' title='Click to watch the YouTube Trailer' /></a></td>");



looks like this


If you are trying to pop-up an IMDb trailer, the code in my backend/functions.php looks like this. You have to use IFRAME to pop the IMDB trailers. This line of code includes the code for the youtube videos. This code is part of the IMDB mod and IMDB trailers (http://www.torrenttrader.org/viewtopic.php?f=14&t=122). Im only posting it for you to use as a reference since My site is so modified It would be hard for me to explain it exactly


           case 'imdb':
     if ($row["imdb"])
           print("<td class='ttable_col$x' align='center'><a href=".$row['imdb']." target='_blank'><".htmlspecialchars($row['imdb'])."><img src='" . $site_config['SITEURL'] . "/images/imdb.png'  border='0' width='50' height='50' alt=\"\" /></a></td>");
        else
        print("<td class='ttable_colx' align='center'>-</td>");
        break;
   
        case 'tube':
            $video=$row["trailers"];
           $video=substr($video,44);
           $video2=$video;
           $video2=substr($video2, 0, -52);
     if ($row["tube"])
           print("<td class='ttable_col$x' align='center'><a rel=\"prettyPhoto\"  href=".$row['tube']." ><".htmlspecialchars($row['tube'])."><img src='" . $site_config['SITEURL'] . "/images/youtube1.png'  border='0' width='50' height='50' title='Click to watch the YouTube Trailer' /></a></td>");
     elseif ($row["trailers"])
           print("<td class='ttable_col$x' align='center'><a rel=\"prettyPhoto[iframes]\"  href=\"http://www.imdb.com/videoembed/". $video2."?ref_=embed&?iframe=true\"><img src='" . $site_config['SITEURL'] . "/images/movietrailers.png'  border='0' width='50' height='50' title='Click to watch the IMDb Trailer' /></a></td>");
           else
        print("<td class='ttable_colx' align='center'>-</td>");
        break;




[ATTACH]2478[/ATTACH]

[ATTACH]2479[/ATTACH]
well . Thats odd lol. I will try that then. Now im completely confused
I corrected all of the array that I saw was wrong. If I missed one, let me know, but the tzs code I posted above should be completely correct

for example,

America/Lima


should be

America/New_York


for it to be proper with PHP
one thing I did to fix most of my issues was chown the whole site to www-data by executing the following on ubuntu.

sudo chown -R www-data:www-data /var/www/site folder


the only downside to this is I am not able to FTP files without changing the owner to my FTP user
I had some trouble with this also, and it was user permissions. www-data has the apache2 permissions while a user not in that group would not be able to write to the file. Its a mess lol. Im still having troubles on my end with group permissions on my ubuntu server
hmm. Make sure avatars directory is chmod 777. Here is my entire upavatar.php


<?php
////////////////////////////////////////
//  TorrentTrader v2.x
//  http://www.torrenttrader.org
//
//  Upload Avatar
//  Author: Skayver
//
//  Date: 13/11/2007
///////////////////////////////////////

require_once ("backend/functions.php");
dbconn();
loggedinonly();
$action = $_REQUEST["action"];
if ($site_config['AVATARUPLOAD']){

if (!($_FILES[avatar]['name'] == "")) {
   $max_avatar_size = $site_config['avatar_max_filesize'];

   if ($_FILES[avatar]['size'] > $max_avatar_size)
       show_error_msg("Invalid file size!", "Image must be less than " . mksize($site_config['avatar_max_filesize']),1);


   if (preg_match('/^(.+)\.(jpg|gif|png)$/si', $_FILES[avatar]['name'])){
       define("MAX_WIDTH", 80);   // Define width sizes what you want.
       define("MAX_HEIGHT", 80);  // Define height sizes what you want.
       $avatar_dir = "".str_replace("\\","/",getcwd())."".$site_config['avatar_dir']."";
       $avatar_url = "".$site_config['SITEURL']."".$site_config['avatar_dir']."";
       $shit = explode('.', $_FILES[avatar]['name']);
       $type = strtolower(end($shit));

       if (extension_loaded('gd')){
           $gdinfo = gd_info();
           list($width, $height) = getimagesize($_FILES[avatar]['tmp_name']);
           $scale = min(MAX_WIDTH/$width, MAX_HEIGHT/$height);

       if ($scale < 1) {
           $n_w = floor($scale*$width);
           $n_h = floor($scale*$height);
       }
       else{
           $n_w = $width;
           $n_h = $height;
       }

       $tmp_image = imagecreatetruecolor($n_w, $n_h);

       if ($type == 'png' OR $type == 'gif' OR $type == 'jpg'){
           $avatar = $CURUSER[id] . "." . $type;
           if (($type == 'jpg' OR $type == 'jpeg') AND ($gdinfo['JPG Support'] OR $gdinfo['JPEG Support']) ){
               $nimage = imagecreatefromjpeg($_FILES[avatar]['tmp_name']);
               imagecopyresampled($tmp_image, $nimage, 0, 0, 0, 0, $n_w, $n_h, $width, $height);
               if (!imagejpeg($tmp_image, $avatar_dir . "/" . $avatar))
                   show_error_msg("Error", "Error, uploading JPG files type. <br>Maybe your GD library not support JPG",1);
       }

       if ($type == 'gif' and $gdinfo['GIF Create Support']){
           if ($scale < 1) {
               $nimage = imagecreatefromgif($_FILES[avatar]['tmp_name']);
               imagecopyresampled($tmp_image, $nimage, 0, 0, 0, 0, $n_w, $n_h, $width, $height);
               if (!imagegif($tmp_image, $avatar_dir . "/" . $avatar))
                   show_error_msg("Error", "Error, uploading GIF files type. <br>Maybe your GD library not support GIF Create",1);
               }
               else{
                   if (!move_uploaded_file($_FILES[avatar]['tmp_name'], $avatar_dir . "/" . $avatar))
                       show_error_msg("Error", "Error, moving uploaded GIF file.",1);
                   }
       }

       if ($type == 'png' and $gdinfo['PNG Support'] == 1 ){
           $nimage = imagecreatefrompng($_FILES[avatar]['tmp_name']);
           imagecopyresampled($tmp_image, $nimage, 0, 0, 0, 0, $n_w, $n_h, $width, $height);
           if (!imagepng($tmp_image, $avatar_dir . "/" . $avatar))
               show_error_msg("Error", "Error, uploading PNG files type. <br>Maybe your GD library not support PNG",1);
       }
       SQL_Query_exec("UPDATE users SET avatar = '$avatar_url/$avatar' WHERE username = '$CURUSER[username]'");
       }
   }
   else { show_error_msg("PHP - Error", "PHP on your server, not support GD library. <br>Reinstall your PHP with support GD",1); }
   }
   else {
   write_log("<b>HACKING ATTEMPT !!! </b>- User <B>" . $CURUSER["username"] . "</B> try to upload avatar file: <B>" . $_FILES[avatar]["name"] . "</B>");
   show_error_msg("Invalid type", "Is not allowed type file: (" . $_FILES[avatar]["name"] .")",1);
   }
}

stdhead("Upload Avatar");
begin_frame("" . T_("UP_AVATAR") . "");

if ($action == "post") {
   if (empty($_FILES[avatar]['tmp_name'])){
   print ("<br><p><center>" . T_("NO_AVATAR") . "<a href=upavatar.php?action=upload><b>" . T_("UP_AVATAR") . "</b></a></center></p>");
   }
   else{
  print ("<br><p><center>" . T_("AVATAR_OK") . "<a href=account.php?action=edit_settings&do=edit><b>" . T_("ACCOUNT") . "</b></a></center></p>");
  autolink("account.php?action=edit_settings&do=edit", "" . T_("AVATAR_OK") . "");
}
}



if ($action == "upload") {
   print ("<form method=post action=?action=post enctype=multipart/form-data><table align=center width=550 border=1 cellpadding=5><tr><td align=right>". T_("AVATAR_FILE") ." :</td><td><input type=file name=avatar size=60></td></tr><tr><td align=right>". T_("DISCLAIMER") ." :</td><td>". T_("AVATAR_TXT") ."".mksize($site_config['avatar_max_filesize'])."</td></tr><tr><td colspan=2 align=center><input type=submit name=Submit value='".T_("UP_AVATAR")."' class=btn></td></td></tr></table></form>");
//print ("<form method=post action=?action=post enctype=multipart/form-data><table align=center width=550 border=1 cellpadding=5><tr><td class=table_col1 align=right>". T_("AVATAR_FILE") ." :</td><td class=table_col1><input type=file name=avatar size=60></td></tr><tr><td class=table_col1 align=right>". T_("DISCLAIMER") ." :</td><td class=table_col1>". T_("AVATAR_TXT") ."</td></tr><tr><td class=table_col2 colspan=2 align=center><input type=submit name=Submit value='".T_("UP_AVATAR")."' class=btn></td></td></tr></table></form>");
}

if (!$action == "post" OR !$action == "upload") {
   write_log("<b>HACKING ATTEMPT !!! </b>- User <b>" . $CURUSER["username"] . "</b> tries to direct access to upavatar.php");
   print ("<br><p><center><b>Direct access not allowed !!!</b></p><p>Go to: <a href=account.php?action=edit_settings&do=edit><b>" . T_("ACCOUNT") . "</b></a></center></p><br>");
}
}
else{
   stdhead("ERROR !");
   write_log("<b>HACKING ATTEMPT !!! </b>- User <b>" . $CURUSER["username"] . "</b> tries to upload avatar !");
   show_error_msg ("Error", "<p><font color=red>Avatar uploading, disabled bay site admin !</font></p>");
}

end_frame();
stdfoot();
?>
try this. replace your lines 28 to 34


   if (preg_match('/^(.+)\.(jpg|gif|png)$/si', $_FILES[avatar]['name'])){
       define("MAX_WIDTH", 100);   // Define width sizes what you want.
       define("MAX_HEIGHT", 100);  // Define height sizes what you want.
       $avatar_dir = "".str_replace("\\","/",getcwd())."".$site_config['avatar_dir']."";
       $avatar_url = "".$site_config['SITEURL']."".$site_config['avatar_dir']."";
       $tmp = explode('.', $_FILES[avatar]['name']);
       $type = strtolower(end($tmp));
this line is definitely wrong tiloup, and will not work when DST is in effect. Some of the timezones are labeled wrong, and while they will be correct for some of the year, when DST is in effect, they will not adjust themselves like they should


$tzs["-300"] = array("(GMT - 5:00 hours) Eastern Time (US &amp; Canada), Bogota, Lima, Quito", "America/Lima");
The one you have is wrong most likely. Do you have any users complaining once a year that their time stamps are wrong? Well, this is why. The array was wrong from the beginning in 2 or 3 places (I dont remember anymore where the screw up was, I just know I fixed it some time ago). Replace your tzs.php code with this


<?php
$tzs = array();
$tzs["-720"] = array("(GMT - 12:00 hours) Enitwetok, Kwajalien", "Pacific/Kwajalein");
$tzs["-660"] = array("(GMT - 11:00 hours) Midway Island, Samoa", "Pacific/Samoa");
$tzs["-600"] = array("(GMT - 10:00 hours) Hawaii", "Etc/GMT+10");
$tzs["-540"] = array("(GMT - 9:00 hours) Alaska", "America/Anchorage");
$tzs["-480"] = array("(GMT - 8:00 hours) Pacific Time (US &amp; Canada)", "America/Los_Angeles");
$tzs["-420"] = array("(GMT - 7:00 hours) Mountain Time (US &amp; Canada)", "America/Denver");
$tzs["-360"] = array("(GMT - 6:00 hours) Central Time (US &amp; Canada), Mexico City", "America/Chicago");
$tzs["-300"] = array("(GMT - 5:00 hours) Eastern Time (US &amp; Canada), Bogota, Lima, Quito", "America/New_York");
$tzs["-240"] = array("(GMT - 4:00 hours) Atlantic Time (Canada), Caracas, La Paz", "America/Guadeloupe");
$tzs["-210"] = array("(GMT - 3:30 hours) Newfoundland", "America/St_Johns");
$tzs["-180"] = array("(GMT - 3:00 hours) Brazil, Buenos Aires, Georgetown, Falkland Isl.", "Etc/GMT+3");
$tzs["-120"] = array("(GMT - 2:00 hours) Mid-Atlantic, Ascention Isl., St Helena", "Atlantic/St_Helena");
$tzs["-60"]  = array("(GMT - 1:00 hour) Azores, Cape Verde Islands", "Atlantic/Azores");
$tzs["0"]    = array("(GMT) Casablanca, Dublin, Edinburgh, London, Lisbon, Monrovia", "Europe/London");
$tzs["60"]   = array("(GMT + 1:00 hour) Amsterdam, Berlin, Copenhagen, Madrid, Paris, Rome", "Europe/Rome");
$tzs["120"]  = array("(GMT + 2:00 hours) Kaliningrad, South Africa, Warsaw", "Europe/Kaliningrad");
$tzs["180"]  = array("(GMT + 3:00 hours) Baghdad, Riyadh, Moscow, Nairobi", "Africa/Nairobi");
$tzs["210"]  = array("(GMT + 3:30 hours) Tehran", "Asia/Tehran");
$tzs["240"]  = array("(GMT + 4:00 hours) Adu Dhabi, Baku, Muscat, Tbilisi", "Asia/Tbilisi");
$tzs["270"]  = array("(GMT + 4:30 hours) Kabul", "Asia/Kabul");
$tzs["300"]  = array("(GMT + 5:00 hours) Ekaterinburg, Islamabad, Karachi, Tashkent", "Asia/Tashkent");
$tzs["330"]  = array("(GMT + 5:30 hours) Bombay, Calcutta, Madras, New Delhi", "Asia/Calcutta");
$tzs["360"]  = array("(GMT + 6:00 hours) Almaty, Dhaka, Khulna", "Asia/Dhaka");
$tzs["420"]  = array("(GMT + 7:00 hours) Bangkok, Hanoi, Jakarta", "Asia/Bangkok");
$tzs["480"]  = array("(GMT + 8:00 hours) Beijing, Hong Kong, Perth, Singapore, Taipei", "Asia/Taipei");
$tzs["540"]  = array("(GMT + 9:00 hours) Osaka, Sapporo, Seoul, Tokyo, Yakutsk", "Asia/Tokyo");
$tzs["570"]  = array("(GMT + 9:30 hours) Adelaide, Darwin", "Australia/Adelaide");
$tzs["600"]  = array("(GMT + 10:00 hours) Melbourne, Papua New Guinea, Sydney, Vladivostok", "Australia/Sydney");
$tzs["660"]  = array("(GMT + 11:00 hours) Magadan, New Caledonia, Solomon Islands", "Asia/Magadan");
$tzs["720"]  = array("(GMT + 12:00 hours) Auckland, Wellington, Fiji, Marshall Island", "Pacific/Auckland");
?>
did that fix your problem?
Check line 30 and 31 (or whatever number it is, but it looks like this) in upavatar.php. I didnt test this, but I will later, but it seems logical to me. The VAR $type had multiple references, and that dont work in flash, so I assume it wouldnt work here. I used shit in case tmp was used somewhere else. I didnt feel like looking for it lol


       $shit = explode('.', $_FILES[avatar]['name']);
       $type = strtolower(end($shit));
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