ALTER TABLE `torrents` ADD `sticky` enum('yes','no') NOT NULL default 'no';In torrents. PHP, wherever you will find this line torrents-today etc...
$orderby = "ORDER BY torrents.id DESC";Change to:
$orderby = "ORDER BY torrents.sticky ASC, torrents.id DESC";The SQL call looks for the same here torrents. php, torrents-Search. PHP, torrents-Today. PHP:
torrents.category,Add to the following:
torrents.sticky,In index. PHP:
torrents.category,Add to the following:
torrents.sticky,Change this
ORDER BY id DESC LIMIT 25";By this
ORDER BY sticky ASC, id DESC LIMIT 25";In Torrent-edit. php adds after:
$updateset[] = "category = " . (int) $_POST["type"];For this:
if(get_user_class() >= 5) { // modo lowest class to make torrent sticky.
if ($_POST["sticky"] == "yes")
$updateset[] = "sticky = 'yes'";
else
$updateset[] = "sticky = 'no'";
}After looking for this:
echo "<tr><td class='table_col1' align='right'><b>".T_("CATEGORIES").": </b></td><td class='table_col2'>".$catdropdown."</td></tr>";Add:
if(get_user_class() >= 5) // modo lowest class to make torrent sticky.
echo "<tr><td class='table_col1' align='right'><b>".T_("STICKY").": </b></td><td class='table_col2'><input type=\"checkbox\" name=\"sticky\"" . (($row["sticky"] == "yes") ? " checked=\"checked\"" : "" ) . " value=\"yes\" />Sticky this torrent!</td></tr>";In search function. php:
if ($row["freeleech"] == 1)
$dispname .= "<img src='images/free.gif' border='0' alt='' />";Add after:
if ($row["sticky"] == "yes")
$dispname .= "<img src='images/sticky.gif' bored='0' alt='sticky' title='sticky' />";