This mod is for Recommended Torrents only with poster
lets get start
First add in SQL:
ALTER TABLE `torrents` ADD `recommended` ENUM( 'Yes', 'No' ) NOT NULL DEFAULT 'No';
then in browse.php (or where you want to be the posters) add:
PHP Code:
<?
$rezfive = mysql_query("SELECT id, recommended, name, poster FROM torrents WHERE recommended = 'yes' ORDER BY added DESC LIMIT 7") or sqlerr(__FILE__, __LINE__);
print '<h2 align=center><font color=white>Recommend Torrents</font></h2><table width=100% border=1 ><tr>';
if (mysql_num_rows($rezfive) > 0) {
while ($fiverow = mysql_fetch_assoc($rezfive)) {
$poster = (!empty($fiverow["poster"]) ? (str_replace(" ", "%20", htmlentities($fiverow['poster']))) : 'pic/poster.jpg');
print ("<td><a href=\"".$BASEURL."/details.php?id=".$fiverow['id']."\" /><img src=\"".$poster."\" width=\"145\" height=\"210\" border=0 /></a><br /></td>");
}
}
echo "</tr></table>";
?>
in edit.php
after
PHP Code:
if ($CURUSER["admin"] == "yes")
tr("Banned", "<input type=\"checkbox\" name=\"banned\"" . (($row["banned"] == "yes") ? " checked=\"checked\"" : "" ) . " value=\"1\" /> Banned", 1);
add
PHP Code:
tr("Recommended Torrent","<input type=radio name=recommended" . ($row["recommended"] == "yes" ? " checked" : "") . " value=yes>Yes!<input type=radio name=recommended" . ($row["recommended"] == "no" ? " checked" : "") . " value=no>No!<br><font class=small size=1>IF you want to recommend this torrent!</font>",1);
in takeedit.php
PHP Code:
if (!empty($_POST['recommended']))
$recommended = unesc($_POST['recommended']);
and this
PHP Code:
$updateset[] = "recommended = " . sqlesc($recommended);
I think thats all
Mod by Westony Orginal topic in
http://www.tbdev.net/index.php?showtopic=15390
Orginal Picture :
My tracker picture :