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
Balloon popup [TTv3]
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Mods Completed

2019-04-07 16:30:00
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
overlib.rar
Download
nocover.png
nocover.png

TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Last edited by M-jay warn on 2021-11-27 10:21:44
Unknown User
2019-04-07 16:33:58
Thanks A Lot :)
2019-04-07 16:44:05
first post updated. Recheck your functions.php edit
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2019-05-21 15:18:48
Thanks you! ;)


Big thanks for hack cool! ;)

...on my side I do not have the description?

Here is my code:
                //////////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.jpg");
              $des = mysqli_real_escape_string($GLOBALS["descr"], format_comment($descr['descr']));
              //$des = mysqli_real_escape_string(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>":"")."&nbsp;<a href=\"torrents-details.php?id=$id&amp;hit=1\" onMouseover=\"return overlib('<table border=1 width=100% class=ttable_headinner cellspacing=0 cellpadding=5 align=center><tr><td class=ttable_head 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>Uploadé le: </b>" . date("d-m-Y", utc_to_tz_time($row["added"])) . "<br /><b>Taille: </b>". mksize($row["size"]) . "<br /><b>completé: </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> Uploadé par : </b>" . $descr['username'] . "</div></td></tr><tr><td class=ttable_head colspan=2 align=center>".T_("DESCRIPTION")."</td></tr><tr><td class=table_col1 colspan=2><font color=#000000>" . CutName($des, $char5) . "</td></tr></table>', CENTER, HEIGHT, 150, WIDTH, 300)\"; onMouseout=\"return nd()\">".$smallname."</a></td>");  
           /// END BALONN MOD ///


iMAGE:

2019-05-29 15:51:05
if apostrophe in my torrent title the balloon does not work, do you have a solution for the js and the apostrophe?

Thanks!
2019-05-30 11:09:28
this line is what handles apostophe. Im not quite sure why this isnt working correctly for you. I will check into it more
$des = mysqli_real_escape_string($GLOBALS["DBconnector"], format_comment($descr['descr']));
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2019-05-30 13:22:37
"MicroMonkey, post: 66644, member: 311":

this line is what handles apostophe. Im not quite sure why this isnt working correctly for you. I will check into it more
$des = mysqli_real_escape_string($GLOBALS["DBconnector"], format_comment($descr['descr']));

always so faithful thank you very much for your support, very appreciated ;)
2020-06-21 19:03:00
not sure if you saw this, but I figured I would post this anyways since I got a like notification on this post.
This is NOT correct (I screen capped this from spiritblue post above)
[ATTACH alt="Capture.PNG"]5591[/ATTACH]
use
$des = mysqli_real_escape_string($GLOBALS["DBconnector"], format_comment($descr['descr']));


You have to remember when using V3, some functions require a database connection and thats why I added that stupid global variable. Escape string is a function that requires this. This function is defined in /backend/functions.php
$GLOBALS["DBconnector"]
Capture.PNG
Capture.PNG

TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2020-06-22 22:25:56
"MicroMonkey, post: 68750, member: 311":

not sure if you saw this, but I figured I would post this anyways since I got a like notification on this post.
This is NOT correct (I screen capped this from spiritblue post above)
[ATTACH alt="Capture.PNG"]5591[/ATTACH]
use
$des = mysqli_real_escape_string($GLOBALS["DBconnector"], format_comment($descr['descr']));


You have to remember when using V3, some functions require a database connection and thats why I added that stupid global variable. Escape string is a function that requires this. This function is defined in /backend/functions.php
$GLOBALS["DBconnector"]


Right, I understood this variable after the change, thank you problem solved! ? ?
2021-06-21 14:24:41
Hello everyone, can you tell me how to modify this code to have just the description of the torrent, thanks in advance :giggle


               //////////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>":"")."&nbsp;<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
 
2021-06-22 21:46:39
modify the print line and remove what you dont want
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2023-08-05 11:26:01
Hello, I need your help because I can't modify the code to only have the description of the torrent, thank you in advance for your help 😕  😺
2023-08-05 15:33:52
try this.
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>":"")."&nbsp;<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><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;

TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2023-08-05 16:42:40
thank you for your help MicroMonkey and when I exceed 95 characters on this piece of code

$char5 = 95; //cut name length

I have the torrents page which is all messy, it also does it with the full balloon code

I attach a picture



             $des = mysqli_real_escape_string($GLOBALS["DBconnector"], format_comment($descr['descr']));
            $char5 = 95; //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>":"")."&nbsp;<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><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;






2023-08-06 03:43:29
hello niki ;)

Your text length is long, not possible, test with $char5 = 32; //cut name length
And you have an error with the balloon dimension on functions.php...


===================

Ta longueur de texte est longue, pas possible, test avec $char5 = 32; //cut name length
Et vous avez une erreur avec la cote balloon sur fonctions.php

Last edited by spiritblue on 2023-08-06 03:49:26
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