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