|
#1
|
||||
|
||||
[2.0.4]Poster/Screenshot mod
Add a poster and Screenshots to your torrents detail's
This Mod was a request From TryHarder at seed-bytes as he prepares for his Move to PMBT. First off you well want to make a change to your database By running this SQL Please remember to alter the prefix If needed Code:
ALTER TABLE `torrent_torrents` ADD `post_img` TEXT CHARACTER SET utf8 COLLATE utf8_bin NULL AFTER `descr` , ADD `screan1` TEXT CHARACTER SET utf8 COLLATE utf8_bin NULL AFTER `post_img` , ADD `screan2` TEXT CHARACTER SET utf8 COLLATE utf8_bin NULL AFTER `screan1` , ADD `screan3` TEXT CHARACTER SET utf8 COLLATE utf8_bin NULL AFTER `screan2` , ADD `screan4` TEXT CHARACTER SET utf8 COLLATE utf8_bin NULL AFTER `screan3` ; Find Code:
echo "<tr><td><p>"._bttorrentname."</p></td><td><p><input type=\"text\" name=\"namex\" size=\"80\" /><br />("._btfromtorrent. "<b>"._btdescname."</b>)</p>\n</td></tr>\n"; echo "<tr><td><HR SIZE=1 NOSHADE></td><td></td></tr>\n"; Code:
// Poster Modd echo "<tr><td><p>"._bt_poster."</p></td><td><p><input type=\"text\" name=\"post_img\" size=\"80\" /><br />"._bt_poster_exp."</p>\n</td></tr>\n"; echo "<tr><td><HR SIZE=1 NOSHADE></td><td></td></tr>\n"; // Screen shot Mod echo "<tr><td><p>"._bt_screensa."</p></td><td><p><input type=\"text\" name=\"screan1\" size=\"80\" /><br />"._bt_screen_expa."</p>\n</td></tr>\n"; echo "<tr><td><HR SIZE=1 NOSHADE></td><td></td></tr>\n"; echo "<tr><td><p>"._bt_screensb."</p></td><td><p><input type=\"text\" name=\"screan2\" size=\"80\" /><br />"._bt_screen_expb."</p>\n</td></tr>\n"; echo "<tr><td><HR SIZE=1 NOSHADE></td><td></td></tr>\n"; echo "<tr><td><p>"._bt_screensc."</p></td><td><p><input type=\"text\" name=\"screan3\" size=\"80\" /><br />"._bt_screen_expc."</p>\n</td></tr>\n"; echo "<tr><td><HR SIZE=1 NOSHADE></td><td></td></tr>\n"; echo "<tr><td><p>"._bt_screensd."</p></td><td><p><input type=\"text\" name=\"screan4\" size=\"80\" /><br />"._bt_screen_expd."</p>\n</td></tr>\n"; echo "<tr><td><HR SIZE=1 NOSHADE></td><td></td></tr>\n"; // End Mods Find Code:
if(!isset($build)) $build = "no"; Code:
if(isset($post_img) && $post_img != ''){ if (!preg_match('#^(https?://).*?\.(gif|jpg|jpeg|png)$#i', $post_img, $match)) { bterror($errors,'The URL you specified For Poster is invalid.'); } if (empty($match[2])) { bterror($errors,'The URL you specified is not a (gif|jpg|jpeg|png).'); } } else $post_img = "NULL"; if(isset($screan1) && $screan1 != ''){ if (!preg_match('#^(https?://).*?\.(gif|jpg|jpeg|png)$#i', $post_img, $match)) { bterror($errors,'The URL you specified For Screenshot1 is invalid.'); } if (empty($match[2])) { bterror($errors,'The URL you specified is not a (gif|jpg|jpeg|png).'); } } else $screan1 = "NULL"; if(isset($screan2) && $screan2 != ''){ if (!preg_match('#^(https?://).*?\.(gif|jpg|jpeg|png)$#i', $post_img, $match)) { bterror($errors,'The URL you specified For Screenshot2 is invalid.'); } if (empty($match[2])) { bterror($errors,'The URL you specified is not a (gif|jpg|jpeg|png).'); } } else $screan2 = "NULL"; if(isset($screan3) && $screan3 != ''){ if (!preg_match('#^(https?://).*?\.(gif|jpg|jpeg|png)$#i', $post_img, $match)) { bterror($errors,'The URL you specified For Screenshot3 is invalid.'); } if (empty($match[2])) { bterror($errors,'The URL you specified is not a (gif|jpg|jpeg|png).'); } } else $screan3 = "NULL"; if(isset($screan4) && $screan4 != ''){ if (!preg_match('#^(https?://).*?\.(gif|jpg|jpeg|png)$#i', $post_img, $match)) { bterror($errors,'The URL you specified For Screenshot4 is invalid.'); } if (empty($match[2])) { bterror($errors,'The URL you specified is not a (gif|jpg|jpeg|png).'); } } else $screan4 = "NULL"; Code:
$torrentfields[] = "descr"; $torrentvalues[] = "'".$descr."'"; Code:
// Poster Modd $torrentfields[] = "post_img"; $torrentvalues[] = "'".addslashes($post_img)."'"; //ScreenShot Modd $torrentfields[] = "screan1"; $torrentvalues[] = "'".addslashes($screan1)."'"; $torrentfields[] = "screan2"; $torrentvalues[] = "'".addslashes($screan2)."'"; $torrentfields[] = "screan3"; $torrentvalues[] = "'".addslashes($screan3)."'"; $torrentfields[] = "screan4"; $torrentvalues[] = "'".addslashes($screan4)."'"; //End mods find Code:
$sql = "SELECT A.id as id, A.exeem, A.seeders, A.leechers, A.tot_peer, A.speed, A.info_hash, A.filename, A.banned, A.nuked, A.nukereason, A.password, UNIX_TIMESTAMP() - UNIX_TIMESTAMP(A.last_action) AS lastseed, A.numratings, A.name, IF(A.numratings < '".$minvotes."', NULL, ROUND(A.ratingsum / A.numratings, 1)) AS rating, A.save_as, A.banned, A.descr, A.visible, A.size, A.plen, A.added, A.views, A.downloaded, A.completed, A.type, A.private, A.min_ratio, A.numfiles, A.owner, A.ownertype, A.complaints, A.evidence, A.tracker, A.tracker_list, A.dht as dht, A.md5sum as md5sum, A.uploader_host as user_host, B.name AS cat_name, IF(C.name IS NULL, C.username, C.name) as ownername, A.tracker_update, COUNT(S.status) as auths FROM ".$db_prefix."_torrents A LEFT JOIN ".$db_prefix."_categories B ON A.category = B.id LEFT JOIN ".$db_prefix."_users C ON A.owner = C.id LEFT JOIN ".$db_prefix."_privacy_file S ON S.torrent = A.id AND S.status = 'pending' WHERE A.id = '".$_GET['torrent']."' GROUP BY A.id LIMIT 1;"; Code:
$sql = "SELECT A.id as id,A.post_img,A.screan1,A.screan2,A.screan3,A.screan4, A.exeem, A.seeders, A.leechers, A.tot_peer, A.speed, A.info_hash, A.filename, A.banned, A.nuked, A.nukereason, A.password, UNIX_TIMESTAMP() - UNIX_TIMESTAMP(A.last_action) AS lastseed, A.numratings, A.name, IF(A.numratings < '".$minvotes."', NULL, ROUND(A.ratingsum / A.numratings, 1)) AS rating, A.save_as, A.descr, A.visible, A.size, A.plen, A.added, A.views, A.downloaded, A.completed, A.type, A.private, A.min_ratio, A.numfiles, A.owner, A.ownertype, A.complaints, A.evidence, A.tracker, A.tracker_list, A.dht as dht, A.md5sum as md5sum, A.uploader_host as user_host, B.name AS cat_name, IF(C.name IS NULL, C.username, C.name) as ownername, A.tracker_update, COUNT(S.status) as auths FROM ".$db_prefix."_torrents A LEFT JOIN ".$db_prefix."_categories B ON A.category = B.id LEFT JOIN ".$db_prefix."_users C ON A.owner = C.id LEFT JOIN ".$db_prefix."_privacy_file S ON S.torrent = A.id AND S.status = 'pending' WHERE A.id = '".$_GET['torrent']."' GROUP BY A.id LIMIT 1;"; Code:
if ($torrent_global_privacy AND $user->user AND !$user->premium AND $torrent_global_privacy AND $download_level=="user" AND $torrent["owner"] != $user->id AND $torrent["private"] == "true" AND $torrent["owner"] != 0) { echo "<tr><td><p>"._btauthstatus."</p></td>"; switch ($flag) { case AUTH_PENDING: { echo "<td><p class=\"pending\">"._btdwauthpending."</p></td>"; break; } case AUTH_GRANTED: { echo "<td><p class =\"granted\">"._btdwauthgranted."</p></td>"; break; } case AUTH_DENIED: { echo "<td><p class =\"denied\">"._btdwauthdenied."<p></td>"; break; } case AUTH_NONE: { echo "<td><p class =\"pending\">"._btdwauthnorequest."<p></td>"; break; } } echo "</tr>\n"; } Code:
#Poster if($torrent["post_img"] !=''){ echo "<tr><td><HR SIZE=1 NOSHADE></td><td><HR SIZE=1 NOSHADE></td></tr>\n"; echo "<tr><td><p>"._bt_poster."</p></td><td><img src=\"".$torrent["post_img"]."\" border=\"0\"></td></tr>\n"; echo "<tr><td><HR SIZE=1 NOSHADE></td><td><HR SIZE=1 NOSHADE></td></tr>\n"; } Code:
if (!empty($torrent["descr"])) {//Sometimes massive upload Torrents do not have description echo "<tr><td><p>"._btdescription."</p></td><td id=\"descrTD".$torrent['id']."\">".($user->admin ? "<a ondblclick=\"sndReq('op=edit_torrent_descr&torrent=".$torrent['id']."', 'descrTD".$torrent['id']."')\">" . pic("edit.gif","",_btalt_edit) ."</a>" : ""); if ($descript != strip_tags($descript)) //Means it is written in HTML echo $descript; else echo "<p>".str_replace("\n","<br>",$descript)."</p>"; echo "</td></tr>\n"; } Code:
#Sceenshot if($torrent["screan1"] !=''){ echo "<tr><td><HR SIZE=1 NOSHADE></td><td><HR SIZE=1 NOSHADE></td></tr>\n"; echo "<tr><td><p>"._bt_screensa."</p></td><td><a href=\"".stripslashes($torrent["screan1"])."\" title=\"Click For Full Size\"><img src=\"".stripslashes($torrent["screan1"])."\" width=\"300\" border=\"0\"><br>Click Here For Full Size</a></td></tr>\n"; echo "<tr><td><HR SIZE=1 NOSHADE></td><td><HR SIZE=1 NOSHADE></td></tr>\n"; } if($torrent["screan2"] !=''){ echo "<tr><td><HR SIZE=1 NOSHADE></td><td><HR SIZE=1 NOSHADE></td></tr>\n"; echo "<tr><td><p>"._bt_screensb."</p></td><td><a href=\"".stripslashes($torrent["screan2"])."\" title=\"Click For Full Size\"><img src=\"".stripslashes($torrent["screan2"])."\" width=\"300\" border=\"0\"><br>Click Here For Full Size</a></td></tr>\n"; echo "<tr><td><HR SIZE=1 NOSHADE></td><td><HR SIZE=1 NOSHADE></td></tr>\n"; } if($torrent["screan3"] !=''){ echo "<tr><td><HR SIZE=1 NOSHADE></td><td><HR SIZE=1 NOSHADE></td></tr>\n"; echo "<tr><td><p>"._bt_screensc."</p></td><td><a href=\"".stripslashes($torrent["screan3"])."\" title=\"Click For Full Size\"><img src=\"".stripslashes($torrent["screan3"])."\" width=\"300\" border=\"0\"><br>Click Here For Full Size</a></td></tr>\n"; echo "<tr><td><HR SIZE=1 NOSHADE></td><td><HR SIZE=1 NOSHADE></td></tr>\n"; } if($torrent["screan4"] !=''){ echo "<tr><td><HR SIZE=1 NOSHADE></td><td><HR SIZE=1 NOSHADE></td></tr>\n"; echo "<tr><td><p>"._bt_screensd."</p></td><td><a href=\"".stripslashes($torrent["screan4"])."\" title=\"Click For Full Size\"><img src=\"".stripslashes($torrent["screan4"])."\" width=\"300\" border=\"0\"><br>Click Here For Full Size</a></td></tr>\n"; echo "<tr><td><HR SIZE=1 NOSHADE></td><td><HR SIZE=1 NOSHADE></td></tr>\n"; } and find the last row not commented out and add Code:
define("_bt_poster","Poster"); define("_bt_screensa","Screenshot 1"); define("_bt_screensb","Screenshot 2"); define("_bt_screensc","Screenshot 3"); define("_bt_screensd","Screenshot 4"); define("_bt_poster_exp","(Direct link for a poster,Poster Upload " . $siteurl . ")"); define("_bt_screen_expa","(Direct link for a Screenshot 1)"); define("_bt_screen_expb","(Direct link for a Screenshot 2)"); define("_bt_screen_expc","(Direct link for a Screenshot 3)"); define("_bt_screen_expd","(Direct link for a Screenshot 4)");
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent Do not ask me to make a mod for any other source Do not Ask me to setup your site. I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum My Current Demo is here http://demo.btmanager.org/ Last edited by joeroberts; 17th November 2010 at 19:19. |
The Following User Says Thank You to joeroberts For This Useful Post: | ||
Phogo (13th February 2012)
|
#2
|
||||
|
||||
I asked about this Months ago, Nice work joe buddy :D now i can work on more stuff to go with this .
p.s is there a reason you spellt screen -> screan ?
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?" "I Kill You!" simples
|
#3
|
||||
|
||||
it was late when I did the mod :unknown:
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent Do not ask me to make a mod for any other source Do not Ask me to setup your site. I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum My Current Demo is here http://demo.btmanager.org/ |
#4
|
||||
|
||||
no problem, iv correctd them anyway.
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?" "I Kill You!" simples
Last edited by daffy; 17th November 2010 at 23:36. |
#5
|
||||
|
||||
ok but, at about what line?
Quote:
|
#6
|
||||
|
||||
does your word/notepad not hav a search function? i believe they do,
mine tells me it is on line 1439, yours will be roundabouts there.
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?" "I Kill You!" simples
|
The Following User Says Thank You to daffy For This Useful Post: | ||
Giorgatzelos (18th November 2010)
|
#7
|
||||
|
||||
here is the edit part
open edit.php and find Code:
else $owner = $original_owner; Code:
if(isset($post_img) && $post_img != ''){ if (!preg_match('#^(https?://).*?\.(gif|jpg|jpeg|png)$#i', $post_img, $match)) { $errmsg[] ='The URL you specified For Poster is invalid.'; } elseif (empty($match[2])) { $errmsg[] ='The URL you specified is not a (gif|jpg|jpeg|png).'; } else $post_img = "'" . addslashes($post_img) . "'"; } else $post_img = "NULL"; if(isset($screensa) && $screensa != ''){ if (!preg_match('#^(https?://).*?\.(gif|jpg|jpeg|png)$#i', $screensa, $match)) { $errmsg[] ='The URL you specified For Screenshot1 is invalid.'; } elseif (empty($match[2])) { $errmsg[] ='The URL you specified is not a (gif|jpg|jpeg|png).'; } else $screensa = "'" . addslashes($screensa) . "'"; } else $screensa = "NULL"; if(isset($screensb) && $screensb != ''){ if (!preg_match('#^(https?://).*?\.(gif|jpg|jpeg|png)$#i', $screensb, $match)) { $errmsg[] ='The URL you specified For Screenshot2 is invalid.'; } elseif (empty($match[2])) { $errmsg[] ='The URL you specified is not a (gif|jpg|jpeg|png).'; } else $screensb = "'" . addslashes($screensb) . "'"; } else $screensb = "NULL"; if(isset($screensc) && $screensc != ''){ if (!preg_match('#^(https?://).*?\.(gif|jpg|jpeg|png)$#i', $screensc, $match)) { $errmsg[] ='The URL you specified For Screenshot3 is invalid.'; } elseif (empty($match[2])) { $errmsg[] ='The URL you specified is not a (gif|jpg|jpeg|png).'; } else $screensc = "'" . addslashes($screensc) . "'"; } else $screensc = "NULL"; if(isset($screensd) && $screensd != ''){ if (!preg_match('#^(https?://).*?\.(gif|jpg|jpeg|png)$#i', $screensd, $match)) { $errmsg[] ='The URL you specified For Screenshot4 is invalid.'; } elseif (empty($match[2])) { $errmsg[] ='The URL you specified is not a (gif|jpg|jpeg|png).'; } else $screensd = "'" . addslashes($screensd) . "'"; } else $screensd = "NULL"; Code:
$sql = "UPDATE ".$db_prefix."_torrents SET name = '".$namex."', exeem = '".$exeem."', descr = '".$descr."', category = '".$torrent_category."', ownertype = '".$ownertype."', owner = '".$owner."', password = ".$password.", banned = '".$banned."', nuked = '".$nuked."', ratiobuild = '".$build."', nukereason='".$nukereason."', evidence = '".$evidence."', imdb = '".$imdblink."' WHERE id = '".$id."';"; Code:
$sql = "UPDATE ".$db_prefix."_torrents SET name = '".$namex."', exeem = '".$exeem."', descr = '".$descr."', post_img = ".$post_img.", screan1 = ".$screensa.", screan2 = ".$screensb.", screan3 = ".$screensc.", screan4 = ".$screensd.", category = '".$torrent_category."', ownertype = '".$ownertype."', owner = '".$owner."', password = ".$password.", banned = '".$banned."', nuked = '".$nuked."', ratiobuild = '".$build."', imdb = '".$imdblink."', nukereason='".$nukereason."', evidence = '".$evidence."' WHERE id = '".$id."';"; Code:
echo "<tr><td><p>IMDB Link<p></td><td><p><input type=\"text\" name=\"imdblink\" value=\"".$row['imdb']."\" size=\"80\"></p>\n</td></tr>\n"; Code:
echo "<tr><td><p>"._bt_poster." :<p></td><td><p><input type=\"text\" name=\"post_img\" value=\"".$row['post_img']."\" size=\"80\"></p>\n</td></tr>\n"; echo "<tr><td><p>"._bt_screensa."<p></td><td><p><input type=\"text\" name=\"screensa\" value=\"".$row['screan1']."\" size=\"80\"></p>\n</td></tr>\n"; echo "<tr><td><p>"._bt_screensb."<p></td><td><p><input type=\"text\" name=\"screensb\" value=\"".$row['screan2']."\" size=\"80\"></p>\n</td></tr>\n"; echo "<tr><td><p>"._bt_screensc."<p></td><td><p><input type=\"text\" name=\"screensc\" value=\"".$row['screan3']."\" size=\"80\"></p>\n</td></tr>\n"; echo "<tr><td><p>"._bt_screensd."<p></td><td><p><input type=\"text\" name=\"screensd\" value=\"".$row['screan4']."\" size=\"80\"></p>\n</td></tr>\n"; |
#8
|
||||
|
||||
latest posters
be nice to have a latest images block for this to.....
Updated: some time later.... hahaha here goes latest images with Seeds and Leechs stats. Thanks to joe on this one. add attached to blocks add below where want it to show. index.php or blocks/usercp.php Code:
if ($user->user) { include("blocks/latestimages_block.php"); } user code below for horizontal (center of site) instead of vertical (side of site) Code:
<?php if (!defined('IN_PMBT')) die ("You can't access this file directly"); OpenTable("Latest Posters"); $news = mysql_query("SELECT id, name, added, post_img FROM ".$db_prefix."_torrents WHERE banned = 'no' AND visible='yes'")or sqlerr(__FILE__, __LINE__); if (mysql_num_rows($news) > 0) { print("<table align=center cellpadding=0 cellspacing=0 width=100% border=0>"); while ($row2 = mysql_fetch_array($news)) { $tor = $row2['0']; $altname = $row2['1']; //$date_time=get_date_time(time()-(3600*168)); // the 24 is the hours you want listed change by whatever you want $orderby = "ORDER BY ".$db_prefix."_torrents.id DESC"; //Order $limit = "LIMIT 100"; //Limit $where = "WHERE banned = 'no' AND visible='yes' AND ".$db_prefix."_torrents.id='$tor'"; $res = mysql_query("SELECT ".$db_prefix."_torrents.id, ".$db_prefix."_torrents.seeders, ".$db_prefix."_torrents.leechers, ".$db_prefix."_torrents.post_img, ".$db_prefix."_torrents.screen1, ".$db_prefix."_torrents.screen2, ".$db_prefix."_torrents.screen3, ".$db_prefix."_torrents.screen4, ".$db_prefix."_torrents.added, ".$db_prefix."_categories.name AS cat_name FROM ".$db_prefix."_torrents LEFT JOIN ".$db_prefix."_categories ON ".$db_prefix."_torrents.category = ".$db_prefix."_categories.id $where $orderby $limit")or sqlerr(__FILE__, __LINE__); $row = mysql_fetch_array($res); $cat = $row['cat_name']; $seed =$row['seeders']; $leech =$row['leechers']; $simg1 = $row['screen1']; $simg2 = $row['screen2']; $simg3 = $row['screen3']; $simg4 = $row['screen4']; $img1 = "<a href='$siteurl/details.php?id=$row[id]'><img border='0' src='$row[post_img]' alt=\"$altname / $cat\" width='130' onmouseover=\" return overlib('<center><h1><b>screen Shots:</b></h1></center><hr><table width=100%><br><tr><td><img src=$simg1 width=250 border=0></td><td><img src=$simg2 width=250 border=0><img src=$simg3 width=250 border=0><img src=$simg4 width=250 border=0></td></tr></table>', CENTER, HEIGHT, 250, WIDTH, 300);\" onmouseout=\"return nd();\"></a><br><font color=\"green\"><b>S</font> $seed</b> and <font color=\"red\"><b>L</font> $leech </b><br>"; $img2 = "<a href='$siteurl/details.php?id=$row[id]'><img border='0' src='$row[post_img]' alt=\"$altname / $cat\" width='130' onmouseover=\" return overlib('<center><h1><b>screen Shots:</b></h1></center><hr><table width=100%><br><br><br><br><br><tr><td><center><font color=red size=4><b>Sorry no screens available</b></font></center></td></tr></table>', CENTER, HEIGHT, 250, WIDTH, 300);\" onmouseout=\"return nd();\"></a><br><font color=\"green\"><b>S</font> $seed</b> and <font color=\"red\"><b>L</font> $leech </b><br>"; if ($row["post_img"] != ""){ if ($row["screen1"]!=''){ print("<td style=\"text-align: center;\">". $img1 ."<BR>\n</td>\n"); }else{ print("<td style=\"text-align: center;\">". $img2 ."<BR>\n</td>\n"); } } } print("</tr></table>"); //} ?> </div> </div> <?php } CloseTable(); ?> Bump: ok this is to add IMDB link in details. find below in ajax.php (i am going off if you have above installed, if not, im sure youl see where to place the line Code:
$sql = "SELECT A.id as id,A.post_img,A.screan1,A.screan2,A.screan3,A.screan4, A.exeem, A.seeders, A.leechers, A.tot_peer, A.speed, A.info_hash, A.filename, A.banned, A.nuked, A.nukereason, A.password, UNIX_TIMESTAMP() - UNIX_TIMESTAMP(A.last_action) AS lastseed, A.numratings, A.name, IF(A.numratings < '".$minvotes."', NULL, ROUND(A.ratingsum / A.numratings, 1)) AS rating, A.save_as, A.descr, A.visible, A.size, A.plen, A.added, A.views, A.downloaded, A.completed, A.type, A.private, A.min_ratio, A.numfiles, A.owner, A.ownertype, A.complaints, A.evidence, A.tracker, A.tracker_list, A.dht as dht, A.md5sum as md5sum, A.uploader_host as user_host, B.name AS cat_name, IF(C.name IS NULL, C.username, C.name) as ownername, A.tracker_update, COUNT(S.status) as auths FROM ".$db_prefix."_torrents A LEFT JOIN ".$db_prefix."_categories B ON A.category = B.id LEFT JOIN ".$db_prefix."_users C ON A.owner = C.id LEFT JOIN ".$db_prefix."_privacy_file S ON S.torrent = A.id AND S.status = 'pending' WHERE A.id = '".$_GET['torrent']."' GROUP BY A.id LIMIT 1;"; Code:
$sql = "SELECT A.id as id,A.post_img,A.screan1,A.screan2,A.screan3,A.screan4, A.imdb, A.exeem, A.seeders, A.leechers, A.tot_peer, A.speed, A.info_hash, A.filename, A.banned, A.nuked, A.nukereason, A.password, UNIX_TIMESTAMP() - UNIX_TIMESTAMP(A.last_action) AS lastseed, A.numratings, A.name, IF(A.numratings < '".$minvotes."', NULL, ROUND(A.ratingsum / A.numratings, 1)) AS rating, A.save_as, A.descr, A.visible, A.size, A.plen, A.added, A.views, A.downloaded, A.completed, A.type, A.private, A.min_ratio, A.numfiles, A.owner, A.ownertype, A.complaints, A.evidence, A.tracker, A.tracker_list, A.dht as dht, A.md5sum as md5sum, A.uploader_host as user_host, B.name AS cat_name, IF(C.name IS NULL, C.username, C.name) as ownername, A.tracker_update, COUNT(S.status) as auths FROM ".$db_prefix."_torrents A LEFT JOIN ".$db_prefix."_categories B ON A.category = B.id LEFT JOIN ".$db_prefix."_users C ON A.owner = C.id LEFT JOIN ".$db_prefix."_privacy_file S ON S.torrent = A.id AND S.status = 'pending' WHERE A.id = '".$_GET['torrent']."' GROUP BY A.id LIMIT 1;"; Code:
#Sceenshot if($torrent["screan1"] !=''){ echo "<tr><td><HR SIZE=1 NOSHADE></td><td><HR SIZE=1 NOSHADE></td></tr>\n"; echo "<tr><td><p>"._bt_screensa."</p></td><td><a href=\"".stripslashes($torrent["screan1"])."\" title=\"Click For Full Size\"><img src=\"".stripslashes($torrent["screan1"])."\" width=\"300\" border=\"0\"><br>Click Here For Full Size</a></td></tr>\n"; echo "<tr><td><HR SIZE=1 NOSHADE></td><td><HR SIZE=1 NOSHADE></td></tr>\n"; } if($torrent["screan2"] !=''){ echo "<tr><td><HR SIZE=1 NOSHADE></td><td><HR SIZE=1 NOSHADE></td></tr>\n"; echo "<tr><td><p>"._bt_screensb."</p></td><td><a href=\"".stripslashes($torrent["screan2"])."\" title=\"Click For Full Size\"><img src=\"".stripslashes($torrent["screan2"])."\" width=\"300\" border=\"0\"><br>Click Here For Full Size</a></td></tr>\n"; echo "<tr><td><HR SIZE=1 NOSHADE></td><td><HR SIZE=1 NOSHADE></td></tr>\n"; } if($torrent["screan3"] !=''){ echo "<tr><td><HR SIZE=1 NOSHADE></td><td><HR SIZE=1 NOSHADE></td></tr>\n"; echo "<tr><td><p>"._bt_screensc."</p></td><td><a href=\"".stripslashes($torrent["screan3"])."\" title=\"Click For Full Size\"><img src=\"".stripslashes($torrent["screan3"])."\" width=\"300\" border=\"0\"><br>Click Here For Full Size</a></td></tr>\n"; echo "<tr><td><HR SIZE=1 NOSHADE></td><td><HR SIZE=1 NOSHADE></td></tr>\n"; } if($torrent["screan4"] !=''){ echo "<tr><td><HR SIZE=1 NOSHADE></td><td><HR SIZE=1 NOSHADE></td></tr>\n"; echo "<tr><td><p>"._bt_screensd."</p></td><td><a href=\"".stripslashes($torrent["screan4"])."\" title=\"Click For Full Size\"><img src=\"".stripslashes($torrent["screan4"])."\" width=\"300\" border=\"0\"><br>Click Here For Full Size</a></td></tr>\n"; echo "<tr><td><HR SIZE=1 NOSHADE></td><td><HR SIZE=1 NOSHADE></td></tr>\n"; } Add Below Code:
if ($torrent["imdb"]=='') { print("<tr><td><p>IMDB:</p></td><td>No Imdb Link Available</td></tr>"); }else{ print("<tr><td><p>IMDB:</p></td><td><a href=".$torrent['imdb']." target=_blank><img src=images/simdb.gif border=0 ></a></tr></tr>\n"); } oh and put image into images/
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?" "I Kill You!" simples
|
#9
|
|||
|
|||
Hey guys
First off, thank you for an amazing bittorrent package. It has been an absolute breeze setting it up and all the included features are really great. My only request would be an easier way to upload images. Currently we have to use the image bucket to upload a picture and then reference the location in the description field with [IMG]sitename/username/image.jpg[/IMG] I just found this thread and applied all the code changes but it looks like the mod only allows for image location via url. Is there anyway to modify this to allow clients to browse their local machine for the image to upload? Could that image location then be auto populated at the bottom of the description window? Thanks so much |
#10
|
||||
|
||||
go to admin->image-bucket and you can set it up there the link for uploading well appear under the description box in upload
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent Do not ask me to make a mod for any other source Do not Ask me to setup your site. I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum My Current Demo is here http://demo.btmanager.org/ |
The Following User Says Thank You to joeroberts For This Useful Post: | ||
hackajack (19th December 2011)
|
Tags |
mod , poster or screenshot |
|
|