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

NB-wow — 2019-04-14 01:36:06 in v3 Themes
I had this on a drive. Feel free to play with it.
[ATTACH type="full" alt="2629"]5017._xfImport[/ATTACH]
first post updated. Recheck your functions.php edit
I think this is complete. if im missing something, let me know and I will check it again.
You must have jquery running on your page. If not, insert into header.php of each theme used

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>

in each theme header.php before <head> put
<script type="text/javascript" src="/js/overlib.js"></script>


in functions.php, find
print("<td class='ttable_col$x' nowrap='nowrap'>".(count($expandrows)?"<a href=\"javascript: klappe_torrent('t".$row['id']."')\"><img border=\"0\" src=\"".$site_config["SITEURL"]."/images/plus.gif\" id=\"pict".$row['id']."\" alt=\"Show/Hide\" class=\"showthecross\" /></a>":"")." <a title=\"".$row["name"]."\" href=\"torrents-details.php?id=$id&hit=1\">$dispname</a></td>");
           break;


replace with
//////////BALLOON TOOLTIP MOD///////////////////////////
                        $bimg = @mysqli_fetch_array(@SQL_Query_exec("SELECT image1 FROM torrents WHERE id=$id"));
                        $balon =($bimg["image1"] ? "$site_config[SITEURL]/uploads/images/" . htmlspecialchars($bimg["image1"]) : "images/nocover.png");
                        $descr = "<table width=100% class=ttable_col1 cellspacing=0 cellpadding=5 align=center><tr><td class=ttable_head colspan=2 align=center>$smallname</td></tr><tr valign=top><td align=center><img border=0 width=220  src=$balon></td><td><div align=left><b>Date Added: </b>" . date("m-d-Y", utc_to_tz_time($row["added"])) . "<br /><b>Seeders: </b><font color=green>" . $row["seeders"] . "</font><br /><b>Leechers: </b><font color=red>" . $row["leechers"] . "</font><br /></div></td></tr></table>";
                 
                        print("<td class=ttable_col$x nowrap>$reqname".(count($expandrows)?" <a href=\"javascript: klappe_torrent('t".$row['id']."')\"><img border=\"0\" src=\"".$site_config["SITEURL"]."/images/plus.gif\" id=\"pict".$row['id']."\" alt=\"Show/Hide\" class=\"showthecross\"></a>":"")." <a href=\"torrents-details.php?id=$id&hit=1\" onmouseover=\"return overlib('$descr')\"; onmouseout=\"return nd()\">$dispname</td>");
break;
////////END BALLOON MOD/////////////////////////


place overlib.js in root js folder
upload image to images folder

This is an alternate set of edits you can try also (credit to Uffeno1). Functions.php
                //////////BALLOON TOOLTIP MOD
                   $preparing_descr=SQL_Query_exec("SELECT torrents.anon, torrents.views, torrents.hits, torrents.descr, 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.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");
              $descr=mysqli_fetch_array($preparing_descr);
           
              if (empty($descr["lang_name"]))
              $descr["lang_name"] = "Unknown/NA";
              $lang = "<b>" .T_("LANG"). " : </b>" . $descr["lang_name"] . "";
           
              if (isset($descr["lang_image"]) && $descr["lang_image"] != "")
              $flag = "<img src=$site_config[SITEURL]/images/languages/$descr[lang_image] border=0   alt=$descr[lang_name]>";
           
              $bimg = @mysqli_fetch_array(@SQL_Query_exec("SELECT image1 FROM torrents WHERE id=$id"));
                   $balon =($bimg["image1"] ? "$site_config[SITEURL]/uploads/images/" . htmlspecialchars($bimg["image1"]) : "images/nocover.png");
           
              $des = mysqli_real_escape_string($GLOBALS["DBconnector"], format_comment($descr['descr']));
              $char5 = 500; //cut name length
           
              if (($descr["anon"] == "yes" || $row["privacy"] == "strong") && $CURUSER["id"] != $descr["owner"] && $CURUSER["edit_torrents"] != "yes") {
              $descr['username'] = "".T_("ANONYMOUS")."";
              }else{
              $descr['username'];
              }
              print("<td class='ttable_col$x' nowrap='nowrap'>".(count($expandrows)?"<a href=\"javascript: klappe_torrent('t".$row['id']."')\"><img border=\"0\" src=\"".$site_config["SITEURL"]."/images/plus.gif\" id=\"pict".$row['id']."\" alt=\"Show/Hide\" class=\"showthecross\" /></a>":"")." <a href=\"torrents-details.php?id=$id&hit=1\" onMouseover=\"return overlib('<table class=ballooncolor border=1 width=100% class=ttable_headinner cellspacing=0 cellpadding=5 align=center><tr><td class=balloonheadercolor colspan=2 align=center>$smallname</td></tr><tr valign=top><td class=table_col1 align=center><img border=0 width=120 src=$balon></td><td width=80% class=table_col1><div align=left><b>Uploaded on: </b>" . date("m-d-Y", utc_to_tz_time($row["added"])) . "<br /><b>Size: </b>". mksize($row["size"]) . "<br /><b>Completed: </b>" . $row["times_completed"] . "<br /></div><div align=left><b>Views: </b>" . $descr["views"] . "<br />".$lang." ".$flag."<br /><b>Hits: </b>" . $descr["hits"] . "<br /><b>Seeders: </b><font color=green>" . $row["seeders"] . "</font><br /><b>Leechers: </b><font color=red>" . $row["leechers"] . "</font><br /><b> Uploaded by: </b>" . $descr['username'] . "</div></td></tr><tr><td class=balloonheadercolor colspan=2 align=center>".T_("DESCRIPTION")."</td></tr><tr><td class=table_col1 colspan=2>" . CutName($des, $char5) . "</td></tr></table>', CENTER, HEIGHT, 150, WIDTH, 300)\"; onMouseout=\"return nd()\">".$dispname."</a></td>");
break;
////////END BALLOON MOD
NFO fix [TTv3] — 2019-04-07 16:12:03 in v3 Mods Completed
This isnt really a mod. Its basically a fix to the original code
in torrents-details.php find
//DISPLAY NFO BLOCK
function my_nfo_translate($nfo){
       $trans = array(
       "\x80" => "&#199;", "\x81" => "&#252;", "\x82" => "&#233;", "\x83" => "&#226;", "\x84" => "&#228;", "\x85" => "&#224;", "\x86" => "&#229;", "\x87" => "&#231;", "\x88" => "&#234;", "\x89" => "&#235;", "\x8a" => "&#232;", "\x8b" => "&#239;", "\x8c" => "&#238;", "\x8d" => "&#236;", "\x8e" => "&#196;", "\x8f" => "&#197;", "\x90" => "&#201;",
       "\x91" => "&#230;", "\x92" => "&#198;", "\x93" => "&#244;", "\x94" => "&#246;", "\x95" => "&#242;", "\x96" => "&#251;", "\x97" => "&#249;", "\x98" => "&#255;", "\x99" => "&#214;", "\x9a" => "&#220;", "\x9b" => "&#162;", "\x9c" => "&#163;", "\x9d" => "&#165;", "\x9e" => "&#8359;", "\x9f" => "&#402;", "\xa0" => "&#225;", "\xa1" => "&#237;",
       "\xa2" => "&#243;", "\xa3" => "&#250;", "\xa4" => "&#241;", "\xa5" => "&#209;", "\xa6" => "&#170;", "\xa7" => "&#186;", "\xa8" => "&#191;", "\xa9" => "&#8976;", "\xaa" => "&#172;", "\xab" => "&#189;", "\xac" => "&#188;", "\xad" => "&#161;", "\xae" => "&#171;", "\xaf" => "&#187;", "\xb0" => "&#9617;", "\xb1" => "&#9618;", "\xb2" => "&#9619;",
       "\xb3" => "&#9474;", "\xb4" => "&#9508;", "\xb5" => "&#9569;", "\xb6" => "&#9570;", "\xb7" => "&#9558;", "\xb8" => "&#9557;", "\xb9" => "&#9571;", "\xba" => "&#9553;", "\xbb" => "&#9559;", "\xbc" => "&#9565;", "\xbd" => "&#9564;", "\xbe" => "&#9563;", "\xbf" => "&#9488;", "\xc0" => "&#9492;", "\xc1" => "&#9524;", "\xc2" => "&#9516;", "\xc3" => "&#9500;",
       "\xc4" => "&#9472;", "\xc5" => "&#9532;", "\xc6" => "&#9566;", "\xc7" => "&#9567;", "\xc8" => "&#9562;", "\xc9" => "&#9556;", "\xca" => "&#9577;", "\xcb" => "&#9574;", "\xcc" => "&#9568;", "\xcd" => "&#9552;", "\xce" => "&#9580;", "\xcf" => "&#9575;", "\xd0" => "&#9576;", "\xd1" => "&#9572;", "\xd2" => "&#9573;", "\xd3" => "&#9561;", "\xd4" => "&#9560;",
       "\xd5" => "&#9554;", "\xd6" => "&#9555;", "\xd7" => "&#9579;", "\xd8" => "&#9578;", "\xd9" => "&#9496;", "\xda" => "&#9484;", "\xdb" => "&#9608;", "\xdc" => "&#9604;", "\xdd" => "&#9612;", "\xde" => "&#9616;", "\xdf" => "&#9600;", "\xe0" => "&#945;", "\xe1" => "&#223;", "\xe2" => "&#915;", "\xe3" => "&#960;", "\xe4" => "&#931;", "\xe5" => "&#963;",
       "\xe6" => "&#181;", "\xe7" => "&#964;", "\xe8" => "&#934;", "\xe9" => "&#920;", "\xea" => "&#937;", "\xeb" => "&#948;", "\xec" => "&#8734;", "\xed" => "&#966;", "\xee" => "&#949;", "\xef" => "&#8745;", "\xf0" => "&#8801;", "\xf1" => "&#177;", "\xf2" => "&#8805;", "\xf3" => "&#8804;", "\xf4" => "&#8992;", "\xf5" => "&#8993;", "\xf6" => "&#247;",
       "\xf7" => "&#8776;", "\xf8" => "&#176;", "\xf9" => "&#8729;", "\xfa" => "&#183;", "\xfb" => "&#8730;", "\xfc" => "&#8319;", "\xfd" => "&#178;", "\xfe" => "&#9632;", "\xff" => "&#160;",
       );
       $trans2 = array("\xe4" => "&auml;",        "\xF6" => "&ouml;",        "\xFC" => "&uuml;",        "\xC4" => "&Auml;",        "\xD6" => "&Ouml;",        "\xDC" => "&Uuml;",        "\xDF" => "&szlig;");
       $all_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
       $last_was_ascii = False;
       $tmp = "";
       $nfo = $nfo . "\00";
       for ($i = 0; $i < (strlen($nfo) - 1); $i++)
       {
               $char = $nfo[$i];
               if (isset($trans2[$char]) and ($last_was_ascii or strpos($all_chars, ($nfo[$i + 1]))))
               {
                       $tmp = $tmp . $trans2[$char];
                       $last_was_ascii = True;
               }
               else
               {
                       if (isset($trans[$char]))
                       {
                               $tmp = $tmp . $trans[$char];
                       }
                       else
                       {
                           $tmp = $tmp . $char;
                       }
                       $last_was_ascii = strpos($all_chars, $char);
               }
       }
       return $tmp;
}
//-----------------------------------------------

//DISPLAY NFO BLOCK
if($row["nfo"]== "yes"){
   $nfofilelocation = "$nfo_dir/$row[id].nfo";
   $filegetcontents = file_get_contents($nfofilelocation);
   $nfo = htmlspecialchars($filegetcontents);
       if ($nfo) {
           $nfo = my_nfo_translate($nfo);
           echo "<br /><br /><b>NFO:</b><br />";
           print("<textarea class='nfo' style='width:98%;height:100%;' rows='20' cols='20' readonly='readonly'>".stripslashes($nfo)."</textarea>");
       }else{
           print(T_("ERROR")." reading .nfo file!");
       }
}

replace with

//DISPLAY NFO BLOCK
begin_frame("NFO");
   if ($row["nfo"] == "yes") {
    echo('<img src="nfo-view.php?id=' . $id . '">');
           }
       else {
           if ($nfo) {
               $nfo = my_nfo_translate($nfo);
               echo "<br /><br /><b>NFO:</b><br />";
               print("<textarea class='nfo' style='width:98%;height:100%;' align='center' rows='20' cols='20' readonly='readonly'>" . stripslashes($nfo) . "</textarea>");
           } //$nfo
           else {
               $nfo = utf8_encode(str_replace("\x0d\x0d\x0a", "\x0d\x0a", @file_get_contents($nfofilelocation)));
               if ($nfo) {
                   $nfo = my_nfo_translate($nfo);
                   echo "<br /><br /><b>NFO:</b><br />";
                   print("<textarea class='nfo' style='width:98%;height:100%;' align='center' rows='20' cols='20' readonly='readonly'>" . stripslashes($nfo) . "</textarea>");
               } //$nfo
               else {
                   print(T_("NFO_NOT_FOUND"));
               }
           }
       }
end_frame();

upload attached files keeping folder structure
heres my torrents-edit
<?php
require_once("backend/functions.php");
dbconn();
loggedinonly();

$id = (int) $_REQUEST["id"];
if (!is_valid_id($id)) show_error_msg(T_("ERROR"), T_("INVALID_ID"), 1);
$action = $_REQUEST["action"];

$row = mysqli_fetch_assoc(SQL_Query_exec("SELECT `owner` FROM `torrents` WHERE id=$id"));
if($CURUSER["edit_torrents"]=="no" && $CURUSER['id'] != $row['owner'])
   show_error_msg(T_("ERROR"), T_("NO_TORRENT_EDIT_PERMISSION"), 1);


function uploadimage($x, $imgname, $tid) {
   global $site_config;

   $imagesdir = $site_config["torrent_dir"]."/images";

   $allowed_types = &$site_config["allowed_image_types"];

   if ( !( $_FILES["image$x"]["name"] == "" ) ) {
       if ($imgname != "") {
           $img = "$imagesdir/$imgname";
           $del = unlink($img);
       }

       $y = $x + 1;

   $im = getimagesize($_FILES["image$x"]["tmp_name"]);

   if (!$im[2])
       show_error_msg(T_("ERROR"), "Invalid Image $y.", 1);

   if (!array_key_exists($im['mime'], $allowed_types))
       show_error_msg(T_("ERROR"), T_("INVALID_FILETYPE_IMAGE"), 1);

       if ($_FILES["image$x"]["size"] > $site_config['image_max_filesize'])
           show_error_msg(T_("ERROR"), sprintf(T_("INVAILD_FILE_SIZE_IMAGE"), $y), 1);

       $uploaddir = "$imagesdir/";

       $ifilename = $tid . $x . $allowed_types[$im['mime']];
                                             
       $copy = copy($_FILES["image$x"]["tmp_name"], $uploaddir.$ifilename);

       if (!$copy)
           show_error_msg(T_("ERROR"), sprintf(T_("ERROR_UPLOADING_IMAGE"), $y), 1);

       return $ifilename;
   }
}//end func


//GET DATA FROM DB
$res = SQL_Query_exec("SELECT * FROM torrents WHERE id = $id");
$row = mysqli_fetch_array($res);
if (!$row){
   show_error_msg(T_("ERROR"), T_("TORRENT_ID_GONE"), 1);
}

$torrent_dir = $site_config["torrent_dir"];  
$nfo_dir = $site_config["nfo_dir"];  

//DELETE TORRENT
if ($action=="deleteit"){
   $torrentid = (int) $_POST["torrentid"];
   $delreason = sqlesc($_POST["delreason"]);
   $torrentname = $_POST["torrentname"];

   if (!is_valid_id($torrentid))
       show_error_msg(T_("FAILED"), T_("INVALID_TORRENT_ID"), 1);

   if (!$delreason){
       show_error_msg(T_("ERROR"), T_("MISSING_FORM_DATA"), 1);
   }

   deletetorrent($torrentid);

   write_log($CURUSER['username']." has deleted torrent: ID:$torrentid - ".htmlspecialchars($torrentname)." - Reason: ".htmlspecialchars($delreason));
   if ($CURUSER['id'] != $row['owner']) {
   $delreason = $_POST["delreason"];
   SQL_Query_exec("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')");
   }

   show_error_msg(T_("COMPLETED"), htmlspecialchars($torrentname)." ".T_("HAS_BEEN_DEL_DB"),1);
   die;
}

//DO THE SAVE TO DB HERE
if ($action=="doedit"){
   $updateset = array();

   $nfoaction = $_POST['nfoaction'];
   if ($nfoaction == "update"){
     $nfofile = $_FILES['nfofile'];
     if (!$nfofile) die("No data " . var_dump($_FILES));
     if ($nfofile['size'] > 65535)
       show_error_msg("NFO is too big!", "Max 65,535 bytes.",1);
     $nfofilename = $nfofile['tmp_name'];
     if (@is_uploaded_file($nfofilename) && @filesize($nfofilename) > 0){
           @move_uploaded_file($nfofilename, "$nfo_dir/$id.nfo");
           $updateset[] = "nfo = 'yes'";
       }//success
   }
if (!empty($_POST["name"]))
   $updateset[] = "name = " . sqlesc($_POST["name"]);
if ( $_POST['imdb'] != $row['imdb'] ){
    $updateset[] = "imdb = " . sqlesc($_POST["imdb"]);
    $TTCache->Delete("imdb/$id");
}
   if (!empty($_POST["name"]))
        $updateset[] = "name = " . sqlesc($_POST["name"]);
   
   $updateset[] = "descr = " . sqlesc($_POST["descr"]);
   $updateset[] = "category = " . (int) $_POST["type"];
   $updateset[] = "torrentlang = " . (int) $_POST["language"];

   if ($CURUSER["edit_torrents"] == "yes") {
       if ($_POST["banned"]) {
           $updateset[] = "banned = 'yes'";
           $_POST["visible"] = 0;
       } else {
           $updateset[] = "banned = 'no'";
       }
   }

   $updateset[] = "visible = '" . ($_POST["visible"] ? "yes" : "no") . "'";
      if (!empty($_POST['tube']))
   $tube = unesc($_POST['tube']);
   $updateset[] = "tube = " . sqlesc($tube);
   if ($CURUSER["edit_torrents"] == "yes")
       $updateset[] = "freeleech = '".$_POST["freeleech"]."'";

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

   //update images
   $img1action = $_POST['img1action'];
   if ($img1action == "update")
       $updateset[] = "image1 = " .sqlesc(uploadimage(0, $row["image1"], $id));
   if ($img1action == "delete") {
       if ($row[image1]) {
           $del = unlink($site_config["torrent_dir"]."/images/$row[image1]");
           $updateset[] = "image1 = ''";
       }
   }

   $img2action = $_POST['img2action'];
   if ($img2action == "update")
       $updateset[] = "image2 = " .sqlesc(uploadimage(1, $row["image2"], $id));
   if ($img2action == "delete") {
       if ($row[image2]) {
           $del = unlink($site_config["torrent_dir"]."/images/$row[image2]");
           $updateset[] = "image2 = ''";
       }
   }


   SQL_Query_exec("UPDATE torrents SET " . join(",", $updateset) . " WHERE id = $id");

   $returl = "torrents-edit.php?id=$id&edited=1";
   if (isset($_POST["returnto"])){
       $returl = $_POST["returnto"];
   }

   write_log("Torrent $id (".htmlspecialchars($_POST["name"]).") was edited by $CURUSER[username]");

   header("Location: $returl");
   die();
}//END SAVE TO DB

//UPDATE CATEGORY DROPDOWN
$catdropdown = "<select name=\"type\">\n";
$cats = genrelist();
   foreach ($cats as $catdropdownubrow) {
       $catdropdown .= "<option value=\"" . $catdropdownubrow["id"] . "\"";
       if ($catdropdownubrow["id"] == $row["category"])
           $catdropdown .= " selected=\"selected\"";
       $catdropdown .= ">" . htmlspecialchars($catdropdownubrow["parent_cat"]) . ": " . htmlspecialchars($catdropdownubrow["name"]) . "</option>\n";
   }
$catdropdown .= "</select>\n";
//END CATDROPDOWN

//UPDATE TORRENTLANG DROPDOWN
$langdropdown = "<select name=\"language\"><option value='0'>Unknown</option>\n";
$lang = langlist();
foreach ($lang as $lang) {
   $langdropdown .= "<option value=\"" . $lang["id"] . "\"";
   if ($lang["id"] == $row["torrentlang"])
       $langdropdown .= " selected=\"selected\"";
   $langdropdown .= ">" . htmlspecialchars($lang["name"]) . "</option>\n";
}
$langdropdown .= "</select>\n";
//END TORRENTLANG


$char1 = 55;
$shortname = CutName(htmlspecialchars($row["name"]), $char1);

if ($_GET["edited"]){
   show_error_msg("Edited OK", T_("TORRENT_EDITED_OK"), 1);
}

stdhead(T_("EDIT_TORRENT")." \"$shortname\"");

begin_frame(T_("EDIT_TORRENT")." \"$shortname\"");

print("<br /><br /><form method='post' name=\"bbform\" enctype=\"multipart/form-data\" action=\"torrents-edit.php?action=doedit\">\n");
print("<input type=\"hidden\" name=\"id\" value=\"$id\" />\n");

if (isset($_GET["returnto"]))
   print("<input type=\"hidden\" name=\"returnto\" value=\"" . htmlspecialchars($_GET["returnto"]) . "\" />\n");

print("<table class='table_table' cellspacing='0' cellpadding='4' width='586' align='center'>\n");
echo "<tr><td class='table_col1' align='right' width='60'><b>".T_("NAME").": </b></td><td class='table_col2' ><input type=\"text\" name=\"name\" value=\"" . htmlspecialchars($row["name"]) . "\" size=\"60\" /></td></tr>";
echo "<tr><td class='table_col1'  align='right'><b>".T_("IMAGE").": </b></td><td class='table_col2'><b>".T_("IMAGE")." 1:</b>&nbsp;&nbsp;<input type='radio' name='img1action' value='keep' checked='checked' />".T_("KEEP_IMAGE")."&nbsp;&nbsp;"."<input type='radio' name='img1action' value='delete' />".T_("DELETE_IMAGE")."&nbsp;&nbsp;"."<input type='radio' name='img1action' value='update' />".T_("UPDATE_IMAGE")."<br /><input type='file' name='image0' size='60' /> <br /><br /> <b>".T_("IMAGE")." 2:</b>&nbsp;&nbsp;<input type='radio' name='img2action' value='keep' checked='checked' />".T_("KEEP_IMAGE")."&nbsp;&nbsp;"."<input type='radio' name='img2action' value='delete' />".T_("DELETE_IMAGE")."&nbsp;&nbsp;"."<input type='radio' name='img2action' value='update' />".T_("UPDATE_IMAGE")."<br /><input type='file' name='image1' size='60' /></td></tr>";
echo "<tr><td class='table_col1'  align='right'><b>".T_("NFO").": </b><br /></td><td class='table_col2' ><input type='radio' name='nfoaction' value='keep' checked='checked' />Keep NFO &nbsp; <input type='radio' name='nfoaction' value='update' />Update NFO:";
if ($row["nfo"] == "yes"){
   echo "&nbsp;&nbsp;<a href='nfo-view.php?id=".$row["id"]."' target='_blank'>[".T_("VIEW_CURRENT_NFO")."]</a>";
} else{
   echo "&nbsp;&nbsp;<font color='#ff0000'>".T_("NO_NFO_UPLOADED")."</font>";
}
echo "<br /><input type='file' name='nfofile' size='60' /></td></tr>";
echo "<tr><td align='right'><b>".T_("VIDEOTUBE").": <b></td><td class='table_col2' align='left'><input type='text' name='tube' value='" . htmlspecialchars($row["tube"]) . "' size='60' />&nbsp;<a href='http://www.youtube.com' target='_blank'><img border='0' src='images/youtube.png' width='50' height='50' title='Click here to go to Youtube'></a><br/><i>".T_("FORMAT").": </i> <span style='color:#FF0000'><b>http://www.youtube.com/watch?v=Jc9KR3tOP</b></span></td></tr>";
echo "<tr><td class='table_col1' align='right'><b>".T_("CATEGORIES").": </b></td><td class='table_col2'>".$catdropdown."</td></tr>";


echo "<tr><td class='table_col1' align='right'><b>".T_("IMDB")."</b></td><td class='table_col2'><input type=\"text\" name=\"imdb\" value=\"" . htmlspecialchars($row["imdb"]) . "\" size=\"60\" /></td></tr>";


echo "<tr><td class='table_col1' align='right'><b>".T_("LANG").": </b></td><td class='table_col2'>".$langdropdown."</td></tr>";

if ($CURUSER["edit_torrents"] == "yes")
   echo "<tr><td class='table_col1' align='right'><b>".T_("BANNED").": </b></td><td class='table_col2'><input type=\"checkbox\" name=\"banned\"" . (($row["banned"] == "yes") ? " checked=\"checked\"" : "" ) . " value=\"1\" /> ".T_("BANNED")."?<br /></td></tr>";
echo "<tr><td class='table_col1' align='right'><b>".T_("VISIBLE").": </b></td><td class='table_col2'><input type=\"checkbox\" name=\"visible\"" . (($row["visible"] == "yes") ? " checked=\"checked\"" : "" ) . " value=\"1\" /> " .T_("VISIBLEONMAIN"). "<br /></td></tr>";

if ($row["external"] != "yes" && $CURUSER["edit_torrents"] == "yes"){
   echo "<tr><td class='table_col1' align='right'><b>".T_("FREE_LEECH").": </b></td><td class='table_col2'><input type=\"checkbox\" name=\"freeleech\"" . (($row["freeleech"] == "1") ? " checked=\"checked\"" : "" ) . " value=\"1\" />".T_("FREE_LEECH_MSG")."<br /></td></tr>";
}

if ($site_config['ANONYMOUSUPLOAD']) {
   echo "<tr><td class='table_col1' align='right'><b>".T_("ANONYMOUS_UPLOAD").": </b></td><td class='table_col2'><input type=\"checkbox\" name=\"anon\"" . (($row["anon"] == "yes") ? " checked=\"checked\"" : "" ) . " value=\"1\" />(".T_("ANONYMOUS_UPLOAD_MSG").")<br /></td></tr>";
}
print ("<tr><td class='table_head' align='center' colspan='2'><b>" .T_("DESCRIPTION"). ":</b></td></tr></table>");
require_once("backend/bbcode.php");
print textbbcode("bbform","descr", htmlspecialchars($row["descr"]));

   
print("<br /><center><input type=\"submit\" value='".T_("SUBMIT")."' /> <input type='reset' value='".T_("UNDO")."' /></center>\n");
print("</form>\n");
end_frame();

begin_frame(T_("DELETE_TORRENT"));
       print("<center><form method='post' action='torrents-edit.php?action=deleteit&amp;id=$id'>\n");
       print("<input type='hidden' name='torrentid' value='$id' />\n");
       print("<input type='hidden' name='torrentname' value='".htmlspecialchars($row["name"])."' />\n");
       echo "<b>".T_("REASON_FOR_DELETE")."</b><input type='text' size='30' name='delreason' />";
       echo "&nbsp;<input type='submit' value='".T_("DELETE_TORRENT")."' /></form></center>";
end_frame();

stdfoot();

?>
I didnt create this mod This is an attempt to re-post the mod so others can use it. Hopefully I dont miss any edits haha
back up all files first! I am not responsible for any issues

Run sql
ALTER TABLE `torrents` ADD `tube` varchar(100) DEFAULT NULL;


in functions.php find
            case 'uploader':
               echo "<th>".T_("UPLOADER")."</th>";
           break;

above put
            case 'tube':
               echo "<th>".T_("YOUTUBE")."</th>";
           break;

find
            case 'uploader':
               echo "<td class='ttable_col$x' align='center'>";

above put
         case 'tube':
     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' alt=\"\" /></a></td>");  
           else
        print("<td class='ttable_colx' align='center'>-</td>");
        break;


in torrents-details.php find in the big sql query
torrents.seeders,

add after
torrents.tube,


find
echo "</table></fieldset><br /><br />";

add before
if (!empty($row["tube"]))
print ("<tr><td align='left'><b>" .T_("VIDEOTUBE"). ": </b></td><td align='left'><embed src='". str_replace("watch?v=", "v/", htmlspecialchars($row["tube"])) ."' type=\"application/x-shockwave-flash\" width=\"400\" height=\"310\"></embed></td></tr>");

else
print ("");


in torrents-upload.php find
    if (!is_valid_id($catid))
       $message = T_("UPLOAD_NO_CAT");

replace with
    if (!is_valid_id($catid))
       $message = T_("UPLOAD_NO_CAT");
             if (!empty($_POST['tube']))
           $tube = unesc($_POST['tube']);


find in the big sql query
category,

add after
tube,


find
'".$catid."',

add after
'".$tube."',


find
print ("<tr><td align='right'>" . T_("TORRENT_NAME") . ": </td><td align='left'><input type='text' name='name' size='60' value='" . $_POST['name'] . "' /><br />".T_("THIS_WILL_BE_TAKEN_TORRENT")." \n</td></tr>");

add after
print ("<TR><td align=right>".T_("VIDEOTUBE").": </td><td align=left><input type='text' name='tube' size='50' />&nbsp;<a href=\"http://www.youtube.com\" target='_blank'><img border='0' src='images/youtube.png' width='50' height='50' title='Click here to go to Youtube'></a><br/><i>".T_("FORMAT").": </i> <span style='color:#FF0000'><b> http://www.youtube.com/watch?v=Jc9KR3tOP</b></SPAN></td></tr>");


in torrent-edit.php find
    $updateset[] = "visible = '" . ($_POST["visible"] ? "yes" : "no") . "'";

add after
        if (!empty($_POST['tube']))
   $tube = unesc($_POST['tube']);
   $updateset[] = "tube = " . sqlesc($tube);


find
echo "<tr><td class='table_col1' align='right'><b>".T_("CATEGORIES").": </b></td><td class='table_col2'>".$catdropdown."</td></tr>";

add above
echo "<tr><td align='right'><b>".T_("VIDEOTUBE").": <b></td><td class='table_col2' align='left'><input type='text' name='tube' value='" . htmlspecialchars($row["tube"]) . "' size='60' />&nbsp;<a href='http://www.youtube.com' target='_blank'><img border='0' src='images/youtube.png' width='50' height='50' title='Click here to go to Youtube'></a><br/><i>".T_("FORMAT").": </i> <span style='color:#FF0000'><b>http://www.youtube.com/watch?v=Jc9KR3tOP</b></span></td></tr>";


in torrents.php in the big sql query add
torrents.tube,


in languages/english.php put
// Youtube mod
$LANG["VIDEOTUBE"] = "YouTube Trailer/Video";
$LANG["NOVIDEOTUBE"] = "No YouTube video for this Torrent.";
$LANG["FORMAT"] = "Accepted Format";
$LANG["YOUTUBE"] = "Trailer";


I think thats all. I did my best to go through my files and gather all the edits. If I missed something, let me know and I will check. BACK UP YOUR FILES AND DATABASE FIRST![ATTACH type="full" alt="2619"]5008._xfImport[/ATTACH]
nice. How do you do that? Can you do other themes also?
This is for the original TT shoutbox and the ajshoutbox. I thought someone had already made a mod to do this, but I couldnt find it, so I mashed my own together from spare parts

In admincp.php, this is the link on the page. Adjust the width and height to suit your needs.

<td align="center"><a href="admincp.php?action=clearshout"><img src="images/admin/shoutclear.png" border="0" width="118" height="80" alt="" /><br /><?php echo T_("CLEAR_SHOUTBOX"); ?><br /></a></td>



at the bottom before ?> put

///////////////// CLEAR STOCK SHOUTBOX /////////////////////////////

if ($action == "clearshout") {

stdhead(T_("CLEAR_SHOUTBOX"));
error_reporting(E_ALL);

  begin_frame("".T_("CLEAR_SHOUTBOX")."");

?>
<br /><br />
<font size ='3'><center><?php echo T_("CLEAR_SHOUTBOX_TEXT"); ?></center></font>
<br /><br />

  <form enctype="multipart/form-data" method="post" action="admincp.php">
  <input type="hidden" name="action" value="clearshout" />
  <input type="hidden" name="do" value="delete" />
  <table class="f-border" cellspacing="0" cellpadding="5" width="100%" align="center">
  <tr><td colspan="2" align="center"><input type="submit" value="<?php echo T_("CLEAR_SHOUTBOX");?>" /></td></tr>
  </table></form>

  <?php
  end_frame();
 
  if ($do == "delete"){
        SQL_Query_exec("TRUNCATE TABLE `shoutbox`");
        write_log("Shoutbox cleared by $CURUSER[username]");
        $msg_shout = sqlesc("".T_("SHOUTBOX_CLEARED_MESSAGE")."");
        SQL_Query_exec("INSERT INTO shoutbox (userid, date, user, message) VALUES(0,'".get_date_time()."', 'System' ,".$msg_shout.")");
        autolink ("admincp.php", "<b><font color='#ff0000'>Shoutbox Cleared....</font></b>");

}
  navmenu();
  stdfoot();
}
///////////////END CLEAR STOCK SHOUTBOX //////////////////////////////////////////////


if you use the ajshoutbox, use this instead. Place this at the bottom before ?>
///////////////// CLEAR AJAX SHOUTBOX /////////////////////////////

if ($action == "clearshout" ) {

stdhead(T_("CLEAR_SHOUTBOX"));
error_reporting(E_ALL);

  begin_frame("".T_("CLEAR_SHOUTBOX")."");

?>
<br /><br />
<font size ='3'><center><?php echo T_("CLEAR_SHOUTBOX_TEXT"); ?></center></font>
<br /><br />

  <form enctype="multipart/form-data" method="post" action="admincp.php">
  <input type="hidden" name="action" value="clearshout" />
  <input type="hidden" name="do" value="delete" />
  <table class="f-border" cellspacing="0" cellpadding="5" width="100%" align="center">
  <tr><td colspan="2" align="center"><input type="submit" value="<?php echo T_("CLEAR_SHOUTBOX");?>" /></td></tr>
  </table></form>

  <?php
  end_frame();
 
  if ($do == "delete"){
        SQL_Query_exec("TRUNCATE TABLE `ajshoutbox`");
        write_log("AJAX Shoutbox cleared by $CURUSER[username]");
        $msg_shout = sqlesc("".T_("SHOUTBOX_CLEARED_MESSAGE")."");
        SQL_Query_exec("INSERT INTO ajshoutbox (uid, date, name, text) VALUES(0,'".get_date_time()."', 'System' ,".$msg_shout.")");
        autolink ("admincp.php", "<b><font color='#ff0000'> AJAX Shoutbox Cleared....</font></b>");

}
  navmenu();
  stdfoot();
}
///////////////END CLEAR AJAX SHOUTBOX //////////////////////////////////////////////


in english.php add

$LANG["CLEAR_SHOUTBOX_TEXT"] = "Are you sure you want to clear the shoutbox? You can't undo this";
$LANG["SHOUTBOX_CLEARED_MESSAGE"] = "The shoutbox has been cleared";
$LANG["CLEAR_SHOUTBOX"] = "Clear Shoutbox";


you may already have $LANG["CLEAR_SHOUTBOX"] = "Clear Shoutbox"; in your language file. Check and see first

upload image to images/admin/ folder
[ATTACH alt="2618"]5007._xfImport[/ATTACH]
I didnt create this, just sharing it with a few small modifications
In admincp.php put this link with the other links you already have (adjust height and width as needed)
<td align="center"><a href="admincp.php?action=torrentclients"><img src="images/admin/clients.png" border="0" width="118" height="80" alt="" /><br /><?php echo T_("CLIENTS"); ?><br /></a></td>


also somewhere in admincp.php, put
/////TORRENT CLIENTS////////
if ($action == "torrentclients") {
if ($CURUSER["class"]  < 6)
   show_error_msg("Error", "Access denied.");

   $res12 = SQL_Query_exec("SELECT client, peer_id FROM peers GROUP BY client");

   stdhead("Torrent clients");

begin_frame("All Clients");

   print("<br /><table class=tabla_table align=center border=0 cellspacing=0 cellpadding=5>\n");
   print("<tr><th class=table_head>Client</th><th class=table_head>Peer ID</th><th class=table_head>To ban use</th></tr>\n");

while($arr12 = mysqli_fetch_assoc($res12)) {
       $peer=$arr12['peer_id'];
       $peer=substr($peer,0,8);
       $peer2=$peer;
print("<tr><td class=table_col1>&nbsp; $arr12[client] &nbsp;</td><td class=table_col2>&nbsp; $arr12[peer_id] &nbsp;</td><td class=table_col2>&nbsp; $peer2 &nbsp;</td></tr>\n");
}
   print("</table><br />\n");

end_frame();
navmenu();
stdfoot();
}
/////END TORRENT CLIENTS/////

english.php, put
$LANG["CLIENTS"] = "Torrent Clients Used";

place image in images/admin/ folder
[ATTACH alt="2617"]5006[/ATTACH]

[ATTACH type="full" alt="Capture.PNG"]5234[/ATTACH]
Ajax Shoutbox V3 — 2019-04-06 05:23:09 in v3 Mods in Progress
previous post updated above and theme.css should be light also in the post above. Redownload rar package and overwrite. Class_user mod was commented, but its still in the files if you want to use it. I believe its in getshout and ajshouthistory. Just comment or delete unwanted code
Ajax Shoutbox V3 — 2019-04-06 04:26:48 in v3 Mods in Progress
here is a better theme.css to try out
    #chat {
           overflow: auto;
           width: 100%;
           height: 450px;
           padding: 0px;
   }
 
   #chatoutput ul {
           list-style: none;
           margin:0px;
           padding:0px;
           font-size: 10pt;
   }
 
   div.chatoutput {
           /*background:#465151;#323232;*/
           background:#A8A8A8;
           padding:5px 0px 3px 10px;
           margin:0px;
           color:#000000;
           line-height: 150%;
           margin-bottom:2px;
           border-radius: 5px;
   }
 
   div.loader {
           background-image: url('images/ajshoutbox/random.php');
           background-repeat: no-repeat;
           background-position:center center;
           width:199px;
           height:137px;
   }
 
   #chatoutput ul li {
 
   }
 
   #chatoutput ul li span.name {
           display: block;
           background:url(images/ajshoutbox/bubble.png) no-repeat left;
           padding-left:19px;
           margin-bottom:1px;
           font-weight: normal;
           color:#000000;
   }
 
   #chatoutput ul li:hover span.name {
           background:url(images/ajshoutbox/bubblehover.png) no-repeat left;
   }
 
   form {
           padding:0px;
           margin:0px;
   }
 
   #chatoutput {
           text-align: left;
           margin-right: 0px;
           color: #999;
   }
 
   /* swaps edit and delete images on mouse over */
   #EditSwap {
           width:0px;
           height:0px;
           background:url(images/ajshoutbox/shout_edit_gray.gif) no-repeat bottom;
           padding:10px;
   }
   #EditSwap:hover {
           background:url(images/ajshoutbox/shout_edit.png) no-repeat bottom;
   }
   #DeleteSwap {
           width:0px;
           height:0px;
           background:url(images/ajshoutbox/shout_delete_gray.gif) no-repeat bottom;
           padding:10px;
   }
   #DeleteSwap:hover {
           background:url(images/ajshoutbox/shout_delete.png) no-repeat bottom;
   }
   /* end of swaping */
 
   img.form {
           background:url(images/ajshoutbox/frame.png) no-repeat;
   }
   img.form:hover {
           background:url(images/ajshoutbox/frame_hover.png) no-repeat;
   }
   #chatcornerup {
       width:50%;
           padding: 10px;
           background-color: #E2E2E2;
       border:1px solid #777;
           border-bottom-style:none;
           border-top-right-radius: 2em;
           border-top-left-radius: 2em;
   }
   #chatcornerdown {
           width:65%;
           padding: 10px;
           background-color: #E2E2E2;
       border:1px solid #777;
           border-bottom-style:none;
           border-top-right-radius: 2em;
           border-top-left-radius: 2em;
   }
Ajax Shoutbox V3 — 2019-04-06 04:04:13 in v3 Mods in Progress
to use the hide button in the ajshoutbox, in backend/bbcode.php find
switch(tag)
   {

add after
    case '[hide]':
   var start = document.forms[form].elements[text].selectionStart;
   var end = document.forms[form].elements[text].selectionEnd;
   if (start != end) {
       var body = document.forms[form].elements[text].value;
       var left = body.substring(0, start);
       var middle = "[hide]" + body.substring(start, end) + "[/hide]";
       var rightpos = start + body.substring(start, end).length;
       var right = body.substring(rightpos, end);
       document.forms[form].elements[text].value = left + middle + right;
   } else {
       document.forms[form].elements[text].value = document.forms[form].elements[text].value + "[hide][/hide]";
   }

in backend/functions.php find
$s = preg_replace("/\[\*\]/", "<li>", $s);

add after
        //[hide]Text[/hide] via Tiloup @support-tt-france.fr
   while (preg_match("/\[hide\]\s*((\s|.)+?)\s*\[\/hide\]\s*/i", $s))
       $s = preg_replace(
       "/\[hide\]\s*((\s|.)+?)\s*\[\/hide\]\s*/i",
       "<div style='margin:20px; margin-top:5px'><div><input type='button' value='View' style='text-align:center;width:100px;margin:0px;padding:0px;' onclick=\"if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Close'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'View'; }\" /></div><br/><div><div style='display: none;'>\\1</div></div></div>",$s);
Ajax Shoutbox V3 — 2019-04-06 01:57:30 in v3 Mods in Progress
Test please. Upload everything. Directories are intact. Overwrite all.
Remove ajshoutbox.js from your root directory because that is not where it goes
Remove ping.php from your root directory because that is not where it goes
just a note, I dont think <blink> works anymore if I remember correctly. You have to do some css to blink the text, something like this. If I dont have this correct, just look at the modded version login_block and you should see what I mean. I did this to the connectable mod to blink NO if a user wasnt connectable to get their attention lol
print("<font color='#ff0000' size='3' class='blink'><b><center>You Got A New PM </font>[<a href='mailbox.php?inbox' target='_blank'>$unreadmail</a>]</center></b></a></font>&nbsp;&nbsp;");

and then add to theme.css
@keyframes marquee {
   0%   { transform: translate(0, 0); }
   100% { transform: translate(-100%, 0); }
}
   .blink {
   -webkit-animation: 2s linear infinite condemed_blink_effect; // for android
   animation: 2s linear infinite condemed_blink_effect;
}
@-webkit-keyframes condemed_blink_effect { // for android
   0% {
       visibility: hidden;
   }
   50% {
       visibility: hidden;
   }
   100% {
       visibility: visible;
   }
}
@keyframes condemed_blink_effect {
   0% {
       visibility: hidden;
   }
   50% {
       visibility: hidden;
   }
   100% {
       visibility: visible;
   }
}
arne said this was ok, here are all the templates that he sent me, feel free to try a few different ones out. I only tried the one template number 14
I do have this file, tho I forget why I have it or how it was set up. Im still going through old drives of old backups to figure out what this even was, but here is the code. It was called facebook.php and was in the backend folder
<?php
   
    /*
    * TorrentTrader v2.xx
    * http://www.torrenttrader.org/
    * By Lee Howarth.
    */
   
    class Facebook
    {
        private $_path = array(
          'login' => 'https://www.facebook.com/dialog/oauth?',
          'token' => 'https://graph.facebook.com/oauth/access_token?',
          'graph' => 'https://graph.facebook.com/me?'
        );  
       
        private $_info = array(
          'apikey' => 'key_here',
          'secret' => 'key_here'
        );
       
        public function getAuth()
        {
            $data = array
            (
               'client_id'     => $this->_info['apikey'],
               'redirect_uri'  => 'http://site.com/account-signup.php?do=facebook',
               'scope'         => 'email,offline_access,publish_stream'
            );
           
            header('Location: ' . $this->_path['login'] . http_build_query($data));
        }
       
        public function getToken($code = null)
        {
            $data = array
            (
               'client_id'     => $this->_info['apikey'],
               'redirect_uri'  => 'http://site.com/account-signup.php?do=facebook',
               'client_secret' => $this->_info['secret'],
               'code'          => $code
            );
                 
            $path = $this->_path['token'] . http_build_query($data);
           
            if (($token = $this->_request($path)) && ($user = $this->_request($this->_path['graph'] . $token)))
            {
                 return array('token' => $token, 'user' => json_decode($user));
            }    
 
            return ( bool ) false;
        }
       
        private function _request($path)
        {                
            if (extension_loaded('curl'))
            {
                $ch = curl_init();
                curl_setopt($ch, CURLOPT_URL, $path);
                curl_setopt($ch, CURLOPT_HEADER, false);
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
                curl_setopt($ch, CURLOPT_TIMEOUT, 10);
                $data = curl_exec($ch);
                curl_close($ch);
            }
            else
            {
                $data = file_get_contents($path);
            }
           
            return $data;
        }
    }
   ?>
Nice stuff m-jay. I need to try it on a mobile, but my phone is complete shit. Im sposed to get a new one from work, they havent given me one yet. Mine barely makes phone calls. And just ignore the asshat, he never contributes anything anyways.
im not familiar with bootstrap either. Im not good at any of that stuff honestly. i usually just keep fiddling around till something looks good
anyone wanna test this and make it better? I was just bored and interested in seeing how this could work, so I did this with some files arne sent me. Upload everything, the only 3 files I was editing are account-signup, account-recover and account-login. The rest is css and images and stuff that the html uses. try it and see if its worth continuing to play with this, or I should just move on to something else. I get sidetracked and spend way too much time on silly things, but this looks very nice. Backup your files and try this. its just a quick example, and I know it can be alot better, but decent for a start anyways.

[URL unfurl="true"]http://www.mediafire.com/file/0l9p2h4ffo529cz/signup+tests.rar[/url]
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