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
Bookmark Torrents for 2.08
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Mods Completed

Unknown User
2014-10-30 18:26:59
awesome thx work great on tt v.2.8
2021-04-29 05:48:55
Hi guys, i want to ask you if you know how to fix this

Warning: count(): Parameter must be an array or an object that implements Countable in /opt/lampp/htdocs/bookmark.php on line 97

Line 97:
echo "<td class='table_col2' 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 title=\"".$row["name"]."\" href=\"torrents-details.php?id=$row[id]&amp;hit=1\">$dispname</a> $freeleech</td>


Thanks and Regards
2021-04-29 10:49:20
I think is_countable($expandrows) && count($expandrows) should work. This is the format for anyone reading this in the future
.(is_countable($expandrows) && count($expandrows)?

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 MicroMonkey on 2021-05-06 22:10:09
2021-04-29 11:16:54
Yes it work, thanks MM
2021-04-30 01:09:38
Thats a hell of a ternary op string lol dump that into a parent var, and make user of printf() to wrap that much clearly. The var also allows you to control further what conditions or output you desire.
2021-04-30 12:38:47
I agree with you buddy, but this script was written a long time ago and needs many nice adjustments and changes.

Have tried many times to transfer my script to something that is more modern but it is a huge job when you have many years behind your job.

It works as long as it does


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2021-05-04 16:18:07
Guys,
need some advice to implement this mod on my script that already has a Baloon tooltip mod installed,
with every change there is a white page on it,
nothing in the sqlerr table

I can share that part with you so you can see what it looks like in function.php


case 'name':
$char1 = 75; //cut name length
$smallname = htmlspecialchars(CutName($row["name"], $char1));
$dispname = " ".$smallname." ";
$last_access = $CURUSER["last_browse"];
$time_now = gmtime();
if ($last_access > $time_now || !is_numeric($last_access))
$last_access = $time_now;
if (sql_timestamp_to_unix_timestamp($row["added"]) >= $last_access)
//$dispname .= "";
$dispname .= " <span style=\"float:right\"><i class=\"flaticon-new\" style=\"color:red;font-size:18px;\"></i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>";
if ($row["comments"] >= 1)
$dispname .= "<span class=\"koment\" align=\"right\" style=\"float:right\"><i class=\"far fa-comment-dots\" style=\"color:green\"></i>&nbsp;&nbsp;&nbsp;&nbsp;" . number_format($row["comments"]) . "</span>";
if ($row["seeders"] >= 50)
$dispname .= "<span style=\"float:right\"><i class=\"flaticon-fire\" style=\"color:gold;font-size:18px;\"></i>&nbsp;&nbsp;&nbsp;&nbsp;</span>";
if ($row["freeleech"] == 1)
$dispname .= " <span style=\"float:right\"><i class=\"flaticon-peace\" style=\"color:gold;font-size:18px;\"></i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>";
if ($row["vip"] == "yes")
$dispname .= "<span style=\"float:right\"><img src=\"./images/vip.png\" width=\"30\" title=\"VIP torrent\">&nbsp;&nbsp;&nbsp;&nbsp;</span>";
if ($row["webseed"] == 1)
$dispname .= " <span style=\"float:right\"><i class=\"flaticon-bulb\" style=\"color:gold;font-size:18px;\"></i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>";
if ($row["recommended"] == "yes")
$dispname .= " <span style=\"float:right\"><i class=\"flaticon-top\" style=\"color:gold;font-size:18px;\"></i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>";
if ($row["sticky"] == "yes")
$dispname .= " <span style=\"float:right\"><i class=\"flaticon-oscars\" style=\"color:gold;font-size:18px;\"></i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>";
//////////BALLOON TOOLTIP MOD///////////////////////////
$res7 = SQL_Query_exec("SELECT torrents.anon, torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, torrents.nfo, torrents.url, 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, torrentgenres.name AS genre_name, torrentgenres.image AS genre_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 torrentgenres ON torrents.torrentgenres = torrentgenres.id LEFT JOIN users ON torrents.owner = users.id WHERE torrents.id = $id");
$row = mysql_fetch_assoc($res7);
if (isset($row["lang_image"]) && $row["lang_image"] != "")
                        $bimg = @mysql_fetch_array(@SQL_Query_exec("SELECT image1  FROM torrents WHERE id=$id"));
                        $Limg = @mysql_fetch_array(@SQL_Query_exec("SELECT * FROM torrentlang WHERE id=$id"));
                        $Lbalon =($Limg["image"] ? "$site_config[SITEURL]/images/languages/" . htmlspecialchars($Limg["image"]) : "images/languages/unknown.png");
                        $balon =($bimg["image1"] ? "$site_config[SITEURL]/uploads/images/" . htmlspecialchars($bimg["image1"]) : "images/nocover.png");
                        $descr = "<table width=100% class=account align=center><tr><td class=css-right colspan=2 align=center>$smallname</td></tr><tr valign=top><td align=center class=css><img border=0 width=220  src=$balon class=poster></td><td class=css-right><div align=left class=torrent-category-detail clearfix><ul class=list><li><h4 align=center>Specifikacija</h4></li><li><b>Postavljeno : </b>" . date("d-m-Y", utc_to_tz_time($row["added"])) . "</li><li><b>Seedera : </b><font color=#0000ff>" . $row["seeders"] . "</font></li><li><b>Leechera : </b><font color=#ff0000>" . $row["leechers"] . "</font></li><li><b>Preuzeto : </b><font color=#00ff00>" . $row["times_completed"] . "</font></li><li><b>Subtitl : </b> &nbsp;&nbsp;&nbsp;<img border=\'0\' height=\'18px\' src=\' " . $site_config['SITEURL'] . "/images/languages/" . $row["lang_image"] . " \' alt=\' " . $row["lang_name"] . " \' /></li></ul><br><br></div></td></tr><tr><td class=css-right colspan=2 align=center> &nbsp;&nbsp;&nbsp;&nbsp;<img border=\'0\' src=\' " . $site_config['SITEURL'] . "/images/genre/" . $row["genre_image"] . " \' alt=\' " . $row["genre_name"] . " \' /> </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</a>  </td>");
                        //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;<div class=\"wrapper\"><a href=\"torrents-details.php?id=$id&hit=1\" onmouseover=\"return overlib('$descr')\"; onmouseout=\"return nd()\">$dispname</a></div></td>");
break;
//////////BALLOON TOOLTIP MOD///////////////////////////


case 'dl':
print("<td class='ttable_col$x' align='center'><a href=\"download.php?id=$id&amp;name=" . rawurlencode($row["filename"]) . "\"><img src='" . $site_config['SITEURL'] . "/images/icon_download.gif' border='0' alt=\"Download .torrent\" /></a></td>");
break;
case 'uploader':
echo "<td class='ttable_col$x' align='center'>";
if (($row["anon"] == "yes" || $row["privacy"] == "strong") && $CURUSER["id"] != $row["owner"] && $CURUSER["edit_torrents"] != "yes")
echo "Anonymous";
elseif ($row["username"])
echo "<a href='account-details.php?id=$row[owner]'>".class_user($row[username])."</a>";
else
echo "Unknown";
echo "</td>";
break;
case 'comments':
print("<td class='ttable_col$x' align='center'><font size='1' face='Khand'><a href='comments.php?type=torrent&amp;id=$id'>" . number_format($row["comments"]) . "</a></font></td>\n");
break;
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>");
else
print("<td class='ttable_col$x' align='center'>-</td>");
break;
case 'size':
print("<td class='ttable_col$x' align='center'><button  class='Tsiz'><i class=\"fas fa-database\"></i>&nbsp;&nbsp; ".mksize($row["size"])."</button></td>\n");
break;
case 'completed':
print("<td class='ttable_col$x' align='center'><button  class='Tdl'><i class=\"fab fa-android\"></i>&nbsp;&nbsp; ".number_format($row["times_completed"])." </button></td>");
break;
case 'seeders':
print("<td class='ttable_col$x' align='center'><button  class='Tsee'><i class=\"fas fa-angle-double-up\"></i>&nbsp;&nbsp; ".number_format($row["seeders"])."</button></td>\n");
break;
case 'leechers':
print("<td class='ttable_col$x' align='center'><button  class='Tlee'><i class=\"fas fa-angle-double-down\"></i>&nbsp;&nbsp; " . number_format($row["leechers"]) . "</button></td>\n");
break;
case 'health':
print("<td class='ttable_col$x' align='center'><img src='".$site_config["SITEURL"]."/images/health/health_".health($row["leechers"], $row["seeders"]).".gif' alt='' /></td>\n");
break;
case 'external':
if ($site_config["ALLOWEXTERNAL"]){
if ($row["external"]=='yes')
print("<td class='ttable_col$x' align='center'>".T_("E")."</td>\n");
else
print("<td class='ttable_col$x' align='center'>".T_("L")."</td>\n");
}
break;
case 'added':
print("<td class='ttable_col$x' align='center'>".date("d-m-Y H:i:s", utc_to_tz_time($row['added']))."</td>");
break;
case 'speed':
if ($row["external"] != "yes" && $row["leechers"] >= 1){
$speedQ = SQL_Query_exec("SELECT (SUM(downloaded)) / (UNIX_TIMESTAMP('".get_date_time()."') - UNIX_TIMESTAMP(started)) AS totalspeed FROM peers WHERE seeder = 'no' AND torrent = '$id' ORDER BY started ASC");
$a = mysql_fetch_assoc($speedQ);
$totalspeed = mksize($a["totalspeed"]) . "/s";
} else
$totalspeed = "--";
print("<td class='ttable_col$x' align='center'>$totalspeed</td>");
break;


Regards to all of you


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2021-05-06 00:02:33
can you add the mod to your file like the instructions say and then post that code so we can see what you are adding? Might make it easier to figure out what is wrong
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 MicroMonkey on 2021-05-06 00:09:18
2021-05-06 18:38:16
Quote:
can you add the mod to your file like the instructions say and then post that code so we can see what you are adding?


Yes mate, I implemen this code and find my mistake, I forgot make changes in the end of code (last line in functions.php)

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;$bookmark <a title=\"".$row["name"]."\" href=\"torrents-details.php?id=$id&amp;hit=1\">$dispname</a> $freeleech $new</td>");


Now that works like a charm

Regards to all of you guys


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2023-10-09 15:56:53
Good morning

I have this sql error as soon as I am on the bookmarks page
 	Database Error in backend/functions.php on line 1252: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1. Query was: SELECT torrents.anon, torrents.views, torrents.hits, torrents.descr, torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, torrents.exclusif, torrents.recommended, torrents.nfo, torrents.last_action, torrents.ratingsum, torrents.name, torrents.owner, torrents.save_as, torrents.visible, torrents.size, torrents.added, 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 = .


Error ligne 1252 fontions.php:
            //////////BALLOON TOOLTIP MOD///////////torrents.vip
           $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.exclusif, torrents.recommended, torrents.nfo, torrents.last_action, torrents.ratingsum, torrents.name, torrents.owner, torrents.save_as, torrents.visible, torrents.size, torrents.added, 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")or die(mysqli_error($GLOBALS["DBconnector"]));
               $descr=mysqli_fetch_array($preparing_descr);


And here is my bookmarks file:


Thank you for your help
bookmarks.rar
Download

Last edited by spiritblue on 2023-10-09 15:59:15
2024-03-03 20:17:54
updated bookmark files for v3
files.rar
Download

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