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
Replace categorie torrents-search.php Fo
Controls ·  Search New posts · Mark unread

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

Unknown User
2017-04-01 06:46:14
[size=18px]Hello friends.
Today I want to bring a different style to torrent-search.php
Which I do not believe is a mod but I think it is posted in the correct location.[/size]

[size=18px]This style is something simple but elegant to have, the image can be changed by anyone you have or create[/size]

[size=18px]Remember that the image has to be located in the main images folder and not in themes[/size]


[size=22px]In torrents-search.php search and delete "This part is optional"[/size]

// get all parent cats
echo "<center><b>".T_("CATEGORIES").":</b> ";
$catsquery = SQL_Query_exec("SELECT distinct parent_cat FROM categories ORDER BY parent_cat");
echo " - <a href='torrents.php'>".T_("SHOWALL")."</a>";
while($catsrow = mysql_fetch_assoc($catsquery)){
echo " - <a href='torrents.php?parent_cat=".urlencode($catsrow['parent_cat'])."'>$catsrow[parent_cat]</a>";
}
echo "</center>";


[size=22px]Then find:  "This part is the main thing for the objective"[/size]

[size=22px]Category deletions[/size]

<?php
$i = 0;
$cats = SQL_Query_exec("SELECT * FROM categories ORDER BY parent_cat, name");
while ($cat = mysql_fetch_assoc($cats)) {
   $catsperrow = 5;
   print(($i && $i % $catsperrow == 0) ? "</tr><tr align='right'>" : "");
   print("<td style=\"padding-bottom: 2px;padding-left: 2px\"><a href='torrents.php?cat={$cat["id"]}'>".htmlspecialchars($cat["parent_cat"])." - " . htmlspecialchars($cat["name"]) . "</a> <input name='c{$cat["id"]}' type=\"checkbox\" " . (in_array($cat["id"], $wherecatina) || $_GET["cat"] == $cat["id"]  ? "checked='checked' " : "") . "value='1' /></td>\n");
   $i++;                                                                                                                                                                                                                                                                                                                
}
echo "</tr></table>";

//if we are browsing, display all subcats that are in same cat
if ($parent_cat){
   echo "<br /><br /><b>".T_("YOU_ARE_IN").":</b> <a href='torrents.php?parent_cat=$parent_cat'>$parent_cat</a><br /><b>".T_("SUB_CATS").":</b> ";
$subcatsquery = SQL_Query_exec("SELECT id, name, parent_cat FROM categories WHERE parent_cat='$parent_cat' ORDER BY name");
while($subcatsrow = mysql_fetch_assoc($subcatsquery)){
$name = $subcatsrow['name'];
echo " - <a href='torrents.php?cat=$subcatsrow[id]'>$name</a>";
}
}

echo "<br /><br />";//some spacing

?>


[size=22px]Then paste: [/size][size=22px]"Image insertion"[/size]

<img align="center" src="images/banner.jpg">
<br />
<br />


[size=22px]Result: [/size]
2017-04-01 21:55:13
nice. I always meant to change that, but now that you posted this, its much easier now lol. Thanks for the edits. Also, adjust your size like this


<img align="center" src="images/banner.jpg" width='800' height='150'>

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)
Unknown User
2017-04-02 00:00:43
"MicroMonkey, post: 94028":
nice. I always meant to change that, but now that you posted this, its much easier now lol. Thanks for the edits. Also, adjust your size like this

<img align="center" src="images/banner.jpg" width='800' height='150'>




[size=18px]"Thanks"[/size]  that is the idea to improve everything little by little lol

[size=18px]With these dimensions looks much better [/size] 
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: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728