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
[HACK] Mini Cover
Controls ·  Search New posts · Mark unread

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

2019-12-01 12:27:01
Hello everyone,

Small hack to display a mini cover in the torrenttable function.

Modified file: [color=rgb(0, 168, 133)]Yes[/color]
SQL: [color=rgb(209, 72, 65)]No[/color]

For all modifications do not forget to save your old files.

Open [color=rgb(251, 160, 38)]backend[/color] / [color=rgb(251, 160, 38)]functions.php[/color] and search for :

case 'category':
echo "<th>Cat.</th>";
break;


Add below :

case 'cover':
               echo "<th>Cover</th>";
           break;


Search :

case 'category':
               print("<td class='ttable_col1' align='left' valign='middle'>");
               if (!empty($row["cat_name"])) {
                   print("<a href=\"torrents.php?parent_cat=" . $row["cat_parent"] . "\">");
               if (!empty($row["cat_pic"]) && $row["cat_pic"] != "")
               print("<center><img border=\"0\"  src=\"" . $site_config['SITEURL'] . "/images/categories/".$row["cat_parent"].".png\" alt=\"".$row["cat_parent"]."\" /></center>");
                   else
                       print("&nbsp;".$row["cat_parent"]);
                   print("</a>");
               } else
                   print("-");
               print("</td>\n");
break;


Add below :

case 'cover':
if (!empty($row['image1']))
{
   $imgCover = '/uploads/images/' . htmlspecialchars($row['image1']);
}
else
{
   $imgCover = 'images/nocover.jpg';
}
echo '<td class=ttable_col'.$x.' align="center"><img width="30" height="35" src="'.$imgCover.'"></td>';
break;




Open [color=rgb(243, 121, 52)]backend[/color] / [color=rgb(243, 121, 52)]config.php[/color] and search for :
$site_config["torrenttable_columns"]


After :
category,


Add this :
cover,


Put the image [color=rgb(251, 160, 38)]nocover.jpg[/color] in your images folder at the root of your site.
[ATTACH type="full" alt="5284"]5284[/ATTACH]

[color=rgb(184, 49, 47)]
Update 03-12-2019
Thanks
[/color][color=rgb(184, 49, 47)] shadows[/color]
Betterlogo.jpg
Betterlogo.jpg

Unknown User
2019-12-02 15:01:51
You don't need $sql, its already included in torrents-search.php and torrents.php

Also, you don't need ternary operator as it makes code messy, just add standard if else.

case 'cover':
if (!empty($row['image1']))
{
   $imgCover = '/uploads/images/' . htmlspecialchars($row['image1']);
}
else
{
   $imgCover = 'images/nocover.jpg';
}
echo '<td class=ttable_col'.$x.' align="center"><img width="30" height="35" src="'.$imgCover.'"></td>';
break;


See, way cleaner, less queries, less duplication.
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