Thread: Poster mod
View Single Post
  #2  
Old 25th March 2010, 21:46
helvijs13 helvijs13 is offline
Senior Member
 
Join Date: Sep 2008
Posts: 23
Default
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 : Click the image to open in full size.

My tracker picture : Click the image to open in full size.

Last edited by helvijs13; 25th March 2010 at 22:27.
Reply With Quote
The Following 3 Users Say Thank You to helvijs13 For This Useful Post:
BamBam0077 (15th June 2022), bestlap (23rd January 2013), nicukent (16th November 2011)