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

is your imdb mod similar to the one I have been using?
Glad it is working for you. This fall I may get into testing on newer mysql to see what the differences are. but I dont have any time for that now. Stay away from php 7.4 for now. It does work, but may be a bug or 2 that I havent seen. I know magic_quotes is gone, but thats all I know at this point. That should be easy to get rid of, but you will be happy with what you have for a while I believe. My live machine is running on ubuntu 14 lol. Still works great, but my test machine is running a modded 3.0 on 18, which I will release to anyone who wants to play with it once im ready
I edited the readme installation on github to reflect the strict mode and mysql requirement.  Even tho you didnt do anything, thanks for doing it because I didnt realize these things since I have had my machines running for so long and those minor steps are required and I forgot all about them lol
strict mode needs turned off in mysql. mysqli is a function of php 7, theres nothing to install
"STorrents2020, post: 69203, member: 20382":

nice work. is SQL_Query_exec mysqli enabled for you guys? I've never used the mysqli edition so its mysterious to me still. Thats a ton of code ?

Yes, it works fine. The function is below
function &SQL_Query_exec ($query) {
   $sql = new SQL_Query ($query);
   return $sql->execute();
}

class SQL_Query {
   private $query = "";
   private $params = array();

   function &__construct ($query) {
       $this->query = $query;
       return $this;
   }
Slam this wherever you like. try it out. I tested this on a test machine with no users, so I may have missed something. Its most of the catalog code with some bits stripped out. pretty generic and could be cleaned up further. Lots of stuff that dont need to be there, but im limited right now on time, so I just copied this code and started stripping it apart.  if this dont work, I can try testing it against a live server this weekend and see what I can come up with.
begin_frame("TOP SEEDERS");
$ret = SQL_Query_exec("SELECT seeder, ip, port, uploaded, downloaded, to_go, UNIX_TIMESTAMP(started) AS st, UNIX_TIMESTAMP(last_action) AS la, userid FROM peers WHERE torrent = $id AND seeder ='yes' ORDER BY to_go ASC LIMIT 5");
     $nul = mysqli_num_rows($ret);
if (!$nul)
     {
     $owner1 = "<b><i>".T_("TORRENT_NOT_ACTIVE")."</i></b>";
     $s = "<br /><table class=table_test width=100% border=1 cellpadding=3>";
     $s .= "<tr><td colspan=7 class=table_head align=center><b>".T_("SEED_INFO")."</b></td></tr>";
     $s .= "<tr><td class=table_col2><b>".T_("USERNAME")."</b></td><td class=table_col2 align=right><b>".T_("UPLOADED")."</b></td><td class=table_col2 align=right><b>".T_("SPEED")."</b></td><td class=table_col2 align=right><b>".T_("DOWNLOADED")."</b></td><td class=table_col2 align=right><b>".T_("SPEED")."</b></td>";
     $s .= "<td class=table_col2 align=right><b>".T_("RATIO")."</b></td></tr>";
     $s .= "<tr><td class=table_col1 class=outer>$owner1</td><td colspan=6 class=ttable_col1 align=center><b>".T_("NO_INFO")."</b></td></tr>";
     $s .= "</table><br /></fieldset><br /><br />";

     } else {
     $s = "<br /><table class=table_test width=100% border=1 cellpadding=3>";
     $s .= "<tr><td colspan=7 class=table_head align=center><b>".T_("SEED_INFO")."</b></td></tr>";
     $s .= "<tr><td class=table_col2><b>".T_("USERNAME")."</b></td><td class=table_col2 align=right><b>".T_("UPLOADED")."</b></td><td class=table_col2 align=right><b>".T_("SPEED")."</b></td><td class=table_col2 align=right><b>".T_("DOWNLOADED")."</b></td><td class=table_col2 align=right><b>".T_("SPEED")."</b></td>";
     $s .= "<td class=table_col2 align=right><b>".T_("RATIO")."</b></td></tr>";

     for ($m = 0; $m < $nul; ++$m)
     {
     $arrs = mysqli_fetch_assoc($ret);
     {
     $cres = SQL_Query_exec("SELECT id, username, privacy, donated, warned FROM users WHERE id='$arrs[userid]'");
     $cros = mysqli_fetch_assoc($cres);
     $privacylevel = $cros["privacy"];
    $donated = $cros["donated"];
    $warned = $cros["warned"];
    $now = time();
     $secs = max(1, ($now - $arrs["st"]) - ($now - $arrs["la"]));
     $revived = (isset($arrs["revived"])) == "yes";

if ($privacylevel == "strong"){
if (get_user_class() <= 5){
   $owner1 = "<i>".T_("ANONYMOUS")."</i>";
    }else{
if ($site_config["CLASS_USER"]) {
   $owner1 = "<a href='account-details.php?id=$cros[id]'>" . class_user($cros["username"]) . "</a>";
   }else{
   $owner1 = "<a href='account-details.php?id=$cros[id]'>" . $cros["username"] . "</a> " . ($donated > 0 ? "<img src='".$site_config['SITEURL']."/images/star.png' alt='".T_("DONATED")."' title='".T_("DONATED")."' />" : "") . " " . ($warned > 'no' ? "<img src='".$site_config['SITEURL']."/images/warned.png' alt='".T_("WARNED")."' title='".T_("WARNED")."' />" : "") . "";
   }
   }
    }else{
if ($site_config["CLASS_USER"]) {
   $owner1 = "<a href='account-details.php?id=$cros[id]'>" . class_user($cros["username"]) . "</a>";
   }else{
   $owner1 = "<a href='account-details.php?id=$cros[id]'>" . $cros["username"] . "</a> " . ($donated > 0 ? "<img src='".$site_config['SITEURL']."/images/star.png' alt='".T_("DONATED")."' title='".T_("DONATED")."' />" : "") . " " . ($warned > 'no' ? "<img src='".$site_config['SITEURL']."/images/warned.png' alt='".T_("WARNED")."' title='".T_("WARNED")."' />" : "") . "";                
   }
    }
    if (empty($cros["username"])) {
    $owner1 = "<i>".T_("UNKNOWN_USER")."</i>";
   }

     $bah = SQL_Query_exec("SELECT COUNT(*) FROM peers WHERE seeder = 'yes' AND torrent = $id");
     $count = mysqli_fetch_row($bah);
     $seeders = $count[0];
     $bah1 = SQL_Query_exec("SELECT COUNT(*) FROM peers WHERE seeder = 'no' AND torrent = $id");
     $count1 = mysqli_fetch_row($bah1);
     $leechers = $count1[0];

   $s .= "<tr><td class=table_col1 class=outer>".$owner1."</td>";
  $s .= "<td class=table_col1 align=right class=outer><nobr>" . mksize($arrs["uploaded"]) . "</nobr></td>";
  $s .= "<td class=table_col1 align=right class=outer><nobr>" . mksize(($arrs["uploaded"] - (isset($arrs["uploadoffset"]))) / $secs) . "/s</nobr></td>";
  $s .= "<td class=table_col1 align=right class=outer><nobr>" . mksize($arrs["downloaded"]) . "</nobr></td>";

if ($arrs["seeder"] == "no")
  $s .= "<td class=table_col1 align=right class=outer><nobr>" . mksize(($arrs["downloaded"] - $arrs["downloadoffset"]) / $secs) . "/s</nobr></td>";
  else
   $s .= "<td class=table_col1 align=right class=outer><nobr>" . mksize(($arrs["downloaded"] - (isset($arrs["downloadoffset"]))) / max(1, (isset($arrs["finishedat"])) - $arrs["st"])) . "/s</nobr></td>";

if ($arrs["downloaded"]) {
     $ratio = floor(($arrs["uploaded"] / $arrs["downloaded"]) * 1000) / 1000;
     $s .= "<td align=right class=outer><font color=" . get_ratio_color($ratio) . ">" . number_format($ratio, 3) . "</font></td>";
     }
     else

if ($arrs["uploaded"])
     $s .= "<td class=table_col1 align=right class=outer>Inf.</td>";
     else
     $s .= "<td class=table_col1 align=right class=outer>---</td>";
 //    $s .= "<td class=table_col1 align=right class=outer>" . sprintf("%.2f%%", 100 * (1 - ($arrs["to_go"] / $arr["size"]))) . "</td>";
     }
     }
     $s .= "</table><br /></fieldset><br /><br />";
     }

     $char1 = 50;
     $shortname = CutName(htmlspecialchars($arr["name"]), $char1);

     $image1 = (isset($row['image1']));
 
if ($arr["image1"] == '')
     $image1 = "<div class='cursor'><img src=images/no_poster.png width=175 height=255></div>";
     else
     $image1 = "<a href=".$site_config["SITEURL"]."/uploads/images/$arr[image1] rel='prettyPhoto'><img src=".$site_config["SITEURL"]."/uploads/images/$arr[image1] width=175 height=255 border=0 title='".T_("CLICK_ENLARGE")."'></a>";


 $ret = SQL_Query_exec("SELECT torrents.anon, 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.donated, users.warned, 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");
   $catarr =  mysqli_fetch_assoc($ret);
   $donated = $catarr["donated"];
   $warned = $catarr["warned"];
if ($site_config["CLASS_USER"]) {
   $ca = "<a href='account-details.php?id=$catarr[owner]'>".class_user($catarr['username'])."</a>";
   }else{
   $ca = "<a href='account-details.php?id=$catarr[owner]'>" . $catarr['username']."</a> " . ($donated > 0 ? "<img src='".$site_config["SITEURL"]."/images/star.png' alt='".T_("DONATED")."' title='".T_("DONATED")."' />" : "") . " " . ($warned > 'no' ? "<img src='".$site_config['SITEURL']."/images/warned.png' alt='".T_("WARNED")."' title='".T_("WARNED")."' />" : "") . "";
   }

if (($arr["anon"] == "yes" || $catarr["privacy"] == "strong") && $CURUSER["id"] != $catarr["owner"] && $CURUSER["edit_torrents"] != "yes")
    $owner2 = "<b>" .T_("ADDED_BY"). ": </b><i>".T_("ANONYMOUS")."</i>";
     else
    $owner2 = "<b>" .T_("ADDED_BY"). ": </b>".$ca."";
if (empty($catarr["username"])) {
    $owner1 = "<i>".T_("UNKNOWN_USER")."</i>";
   }



     $flagname = $catarr["lang_name"];
if (empty($catarr["lang_name"]))
     $catarr["lang_name"] = "Unknown/NA";
     $lang = "<td class=ttable_col2 align='center'><b>" .T_("LANG"). " : </b>" . $catarr["lang_name"] . "";

if (empty($catarr["lang_image"]))
     $catarr["lang_image"] = "unknown.gif";
     $flag = "&nbsp;<img border=\"0\" src=\"" . $site_config['SITEURL'] . "/images/languages/" . $catarr["lang_image"] . "\" alt=\"".$flagname."\" /></td>";

     print("<fieldset class='download'><legend ><!--<a style='text-decoration:none' title='".$arr["name"]."' href=torrents-details.php?id=$id&hit=1>--><b>" . $shortname . "</b><!--</a>--></legend>");
     print("$s");
end_frame();
I havent tested v3 on mysql 8. I have only tested on ubuntu 18.04 lts. Havent tried ubuntu 19 or 20, or whatever they are up to now. Your first error is a theme issue, its not seeing your themes directory in the variable. M-jay is correct on that. try ubuntu 18 if you are able. Bleeding edge isnt always best
IMDb Mod [TTv3] — 2020-08-24 21:46:54 in v3 Mods Completed
updated my trailer code above. I posted the wrong edits before. The substr is correct for how IMDB works currently. You can use that code to post IMDB trailers directly by going to IMDB, clicking on the trailer, in the upper right corner is a share icon, you click that, then click COPY and use that URL to use on your site. When my trailers stop working, that when I know that imdb changed some URL or the folder structure of the trailers. So if you are looking at my old 2.08 code, the above code is the new stuff. Its just a change in how to shorten the URL to get the imdb ID number
IMDb Mod [TTv3] — 2020-08-23 20:10:41 in v3 Mods Completed
trailer code torrents-details.php

  if ($row["trailers"]) { //eg: https://www.imdb.com/video/vi612877081?playlistId=tt7991608
$IMDBurl = $row["trailers"];
$trailer = explode('/', $IMDBurl);
$video2 = strtok($trailer[4],'?');
       ?>
      <div class="tablet">
      <center><iframe seamless src="https://www.imdb.com/videoembed/<?php echo $video2; ?>"></iframe></center><br />
</div>


my trailers function in functions.php
case 'tube':
$IMDBurl = $row["trailers"];
$trailer = explode('/', $IMDBurl);
$video2 = strtok($trailer[4],'?');
     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;
       
IMDb Mod [TTv3] — 2020-08-23 19:30:14 in v3 Mods Completed
this used to work, not sure why it dont anymore, but I havent really bothered with it. This is in my torrents-upload. MVP wrote this so all credit to him/her. this used to pull data automatically, not trailers tho. You have to add those manually. I did a pretty good job at the code for posting trailers on torrents. Just gotta keep up with how IMDB shares their trailer vids lol

   /////AUTO IMDB ////////////
       if ( preg_match( '/^([\w\s]+)?.?(\d{4})/i', $name, $m ) )
   {
        $m[ 1 ] = urlencode( $m[ 1 ] );
   

        if ( ( $data = json_decode( @ file_get_contents( "http://www.omdbapi.com/?apikey=YOUR_KEY_HERE&t=$m[1]&y=$m[2]" ) ) ) And ! ( isset( $data -> Error ) ) )
        {
             SQL_Query_exec("UPDATE `torrents` SET `imdb` = " . sqlesc( 'https://www.imdb.com/title/' . $data -> imdbID ) . " WHERE `id` = $id");
        }
   }
   ///End auto imdb
IMDb Mod [TTv3] — 2020-08-23 14:10:06 in v3 Mods Completed
The cache is dynamic. It changes each time someone views the torrents-details page. It seems it pulls the data from the OMDB each time the page is viewed in cache/diskcache/imdb folder.the rounded edges on my CSS is all thanks to spiritblue.[ATTACH type="full" alt="Capture.PNG"]5793[/ATTACH]
Seed Bonus [TTv3] — 2020-08-22 10:28:00 in v3 Mods Completed
simplest solution in backend/cleanup.php if your cleanup runs every 10 minutes (600 seconds). I revisited this because your solution didnt work for me, and im lazy, so I just did this. I touched the keyboard a very minimal amount of times haha
SQL_Query_exec("UPDATE users SET seedbonus = seedbonus + '" . (($site_config["bonuspertime"] / 6) * $row->count) . "' WHERE id = '" . $row->peer . "' AND seedbonus < ".$site_config["bonusmax"]."");
enjoy. Sharing is caring :)
color member — 2020-08-16 19:10:30 in v2.08 Support
This is in functions.php. Create different cases for any groups you are adding to the stock version
//start class colors function
function class_user($name) {
global $site_config;
$a ="SELECT class, donated, warned, enabled FROM `users` WHERE username ='".$name."'";
$res = SQL_Query_exec($a);
$classy = @mysqli_fetch_row($res);
switch ($classy[0]) {
        case 8: // Site Owner
        $col = "".$site_config["siteowner_color"]."";
        break;
        case 7: // Administrator
        $col = "".$site_config["administrator_color"]."";
        break;
        case 6: // Super Moderator
        $col = "".$site_config["super_moderator_color"]."";
        break;
        case 5: // Moderator
        $col = "".$site_config["moderator_color"]."";
        break;
        case 4: // Uploader
        $col = "".$site_config["uploader_color"]."";
        break;
        case 3: // VIP
        $col = "".$site_config["vip_color"]."";
        break;
        case 2: // Power User
        $col = "".$site_config["power_user_color"]."";
        break;
        case 1: // User
        $col = "".$site_config["user_color"]."";

}if($classy[1]>0){
$star="<img src='".$site_config[SITEURL]."/images/star.png' alt='donated' border='0'>";
}else{ $star="";}
if($classy[2]=="yes"){
$warn="<img src='".$site_config[SITEURL]."/images/warned.png' alt='warned' border=0>";
}else{ $warn=""; }
if($classy[3]=="no"){
$disabled="<img src='".$site_config[SITEURL]."/images/disabled.png' alt='disabled' border=0>";
}else{ $disabled=""; }
return unesc("<font color='".$col."'>".$name."".$star."".$warn."".$disabled."</font>");
}
//end class colors function

config.php
// class colors
$site_config["CLASS_USER"] ='true'; //only used for site catalog. Leave TRUE. Does not turn off class user colors. Im just lazy as hell haha
$site_config['siteowner_color'] = '#00ffbf';  // Site Owner
$site_config['administrator_color'] = 'red';  // Administrator
$site_config['super_moderator_color'] = '#009AFF';   // Super Moderator
$site_config['moderator_color'] = 'pink';  // Moderator
$site_config['uploader_color'] = 'purple';  // Uploader
$site_config['vip_color'] = 'dimgray';  // VIP
$site_config['power_user_color'] = 'brown';  // Power User
$site_config['user_color'] = 'green';  // User
My copy is geared towards movies and TV shows. STorrents does switch games, so that layout wouldn't be ideal for what I did. He did an amazing job, so does m-jay, but I made mine the way I want, but I do borrow from all of you guys, because thats how things get done lol
My modded version is actually a bit newer than the mysqli version that I shared on GIT. I guess I could spend some time and make my version the standard. Just gimme some time. its not simple lol
Im sure I can do that. There will be tons of extra files in it, some stuff was experimental, some actually works. some stuff was old things, but nothing interferes with anything, it was a testing platform
I have already converted my modded copy to php7. I use it for a my testing.  I could sanitize it and post up a copy. but I have lots of odd tabs that I did for testing, so I would have to clean it up a bit
yes, there was a DB connection. If you look at my old modded version, its in there. I dont know it offhand, just open up my old sql and get the query from there. if this helps, heres a link to it https://sourceforge.net/projects/tt-2-08-micro-edition/
seems like a better version of what I did years ago. Nice stuff
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: 10

  • Online

  • Total online: 4
  • Members: 1
  • Guests online: 3
  • Comments: 3
  • Messages: 1,728