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
description torrent
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Support

2021-06-14 17:24:27
Hello, I'm looking for the code to add in the function.php file to have a short description of the torrent when you hover over the title of the torrent with the cursor in the torrent.php file

I made a test with the code below and it does not work ?

<center><b>" .  format_comment($row['descr']) . "<b/></center>


2021-06-14 17:37:06
Title is a global attribute. You can use it with any tag.


<center><span title= ” .  format_comment($row['descr']) . " style=‘font-weight:bold’>” .  format_comment($row['descr']) . "<b/></center>
2021-06-15 14:24:52
thank you STorrents2020 but it doesn't work I'm looking for the modification to do so that when we pass the mouse cursor on the no of the torrent the description is displayed

I just tested the code below and it doesn't work either, it's to do like the balloon modification but just with the description


             
$des = mysqli_real_escape_string($GLOBALS["DBconnector"],format_comment($descr['descr']));
              $char5 = 500; //cut name length


<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>




Last edited by niki on 2021-06-15 14:27:14
2021-06-15 14:47:36
I have just modified again and with the code below the balloon is displayed with the image, seed, and leech but the description of the torrent is not displayed? Thank you for your help


//////////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>":"")."&nbsp;<a href=\"torrents-details.php?id=$id&hit=1\" onmouseover=\"return overlib('$descr')\"; onmouseout=\"return nd()\">$dispname</td>");
break;
////////END BALLOON MOD/////////////////////////


2021-06-15 15:06:04
Here I found it works with the code below :thumb

//////////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
 
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: 2
  • Members: 0
  • Guests online: 2
  • Comments: 3
  • Messages: 1,728