Hi mate, just a little help from me regarding indexing of different categories of torrents:
it all depends on the categories you have on your tracker and what numbers you have on those categories, I guess your category is
1 - MOVIE
2 - TVSHOWS
3 - MUSIC
4 - EBOOKS
you can change them as you wish depending on your needs
all categories are limited to a certain number of torrent views and that is 10 pieces
// movie torrents
begin_frame(T_("MOVIE_TORRENTS"));
print("<br /><center><a href='torrents.php'>".T_("BROWSE_TORRENTS")."</a> - <a href='torrents-search.php'>".T_("SEARCH_TORRENTS")."</a></center><br />");
if ($site_config["MEMBERSONLY"] && !$CURUSER) {
echo "<br /><br /><center><b>".T_("BROWSE_MEMBERS_ONLY")."</b></center><br /><br />";
} else {
$movie = "SELECT torrents.id, torrents.anon, torrents.announce, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech, categories.name AS cat_name, categories.image AS cat_pic, categories.parent_cat AS cat_parent, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id WHERE visible = 'yes' AND banned = 'no' AND categories.sort_index= '1' ORDER BY id DESC LIMIT 10";
$mov = SQL_Query_exec($movie);
if (mysqli_num_rows($mov)) {
torrenttable($mov);
}else {
print("<div class='f-border'>");
print("<div class='f-cat' width='100%'>".T_("NOTHING_FOUND")."</div>");
print("<div>");
print T_("NO_UPLOADS");
print("</div>");
print("</div>");
}
if ($CURUSER)
SQL_Query_exec("UPDATE users SET last_browse=".gmtime()." WHERE id=$CURUSER[id]");
}
end_frame();
// tvshows torrents
begin_frame(T_("TVSHOWS_TORRENTS"));
print("<br /><center><a href='torrents.php'>".T_("BROWSE_TORRENTS")."</a> - <a href='torrents-search.php'>".T_("SEARCH_TORRENTS")."</a></center><br />");
if ($site_config["MEMBERSONLY"] && !$CURUSER) {
echo "<br /><br /><center><b>".T_("BROWSE_MEMBERS_ONLY")."</b></center><br /><br />";
} else {
$tvshow = "SELECT torrents.id, torrents.anon, torrents.announce, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech, categories.name AS cat_name, categories.image AS cat_pic, categories.parent_cat AS cat_parent, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id WHERE visible = 'yes' AND banned = 'no' AND categories.sort_index= '2' ORDER BY id DESC LIMIT 10";
$tv = SQL_Query_exec($tvshow);
if (mysqli_num_rows($tv)) {
torrenttable($tv);
}else {
print("<div class='f-border'>");
print("<div class='f-cat' width='100%'>".T_("NOTHING_FOUND")."</div>");
print("<div>");
print T_("NO_UPLOADS");
print("</div>");
print("</div>");
}
if ($CURUSER)
SQL_Query_exec("UPDATE users SET last_browse=".gmtime()." WHERE id=$CURUSER[id]");
}
end_frame();
// music torrents
begin_frame(T_("MUSIC_TORRENTS"));
print("<br /><center><a href='torrents.php'>".T_("BROWSE_TORRENTS")."</a> - <a href='torrents-search.php'>".T_("SEARCH_TORRENTS")."</a></center><br />");
if ($site_config["MEMBERSONLY"] && !$CURUSER) {
echo "<br /><br /><center><b>".T_("BROWSE_MEMBERS_ONLY")."</b></center><br /><br />";
} else {
$music = "SELECT torrents.id, torrents.anon, torrents.announce, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech, categories.name AS cat_name, categories.image AS cat_pic, categories.parent_cat AS cat_parent, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id WHERE visible = 'yes' AND banned = 'no' AND categories.sort_index= '3' ORDER BY id DESC LIMIT 10";
$mus = SQL_Query_exec($music);
if (mysqli_num_rows($mus)) {
torrenttable($mus);
}else {
print("<div class='f-border'>");
print("<div class='f-cat' width='100%'>".T_("NOTHING_FOUND")."</div>");
print("<div>");
print T_("NO_UPLOADS");
print("</div>");
print("</div>");
}
if ($CURUSER)
SQL_Query_exec("UPDATE users SET last_browse=".gmtime()." WHERE id=$CURUSER[id]");
}
end_frame();
// ebooks torrents
begin_frame(T_("EBOOKS_TORRENTS"));
print("<br /><center><a href='torrents.php'>".T_("BROWSE_TORRENTS")."</a> - <a href='torrents-search.php'>".T_("SEARCH_TORRENTS")."</a></center><br />");
if ($site_config["MEMBERSONLY"] && !$CURUSER) {
echo "<br /><br /><center><b>".T_("BROWSE_MEMBERS_ONLY")."</b></center><br /><br />";
} else {
$ebooks = "SELECT torrents.id, torrents.anon, torrents.announce, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech, categories.name AS cat_name, categories.image AS cat_pic, categories.parent_cat AS cat_parent, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id WHERE visible = 'yes' AND banned = 'no ' AND categories.sort_index= '4' ORDER BY id DESC LIMIT 10";
$ebo = SQL_Query_exec($ebooks);
if (mysqli_num_rows($ebo)) {
torrenttable($ebo);
}else {
print("<div class='f-border'>");
print("<div class='f-cat' width='100%'>".T_("NOTHING_FOUND")."</div>");
print("<div>");
print T_("NO_UPLOADS");
print("</div>");
print("</div>");
}
if ($CURUSER)
SQL_Query_exec("UPDATE users SET last_browse=".gmtime()." WHERE id=$CURUSER[id]");
}
end_frame();