View Single Post
  #1  
Old 15th November 2015, 21:20
kira kira is offline
Senior Member
 
Join Date: Jul 2011
France
Posts: 69
Default Add last torrents - image not available
add block last torrents images in the homepage
error we see just 'image not available' and not the poster

PHP Code:
//== Latest torrents
if (($last5torrents $mc1->get_value('last5_tor_')) === false) {
$sql "SELECT t.id, t.category, t.owner, t.seeders, t.poster, t.leechers, t.name, t.description, t.dcredits, t.times_completed, t.nuked, nukereason, t.added, c.name AS cat_name, c.image AS cat_img FROM torrents AS t LEFT JOIN categories AS c ON c.id = t.category WHERE visible='yes' ORDER BY added DESC LIMIT {$TBDEV['latest_torrents_limit']}";
$result mysqli_query($GLOBALS["___mysqli_ston"], $sql) or sqlerr(__FILE____LINE__);
while (
$last5torrent mysqli_fetch_assoc($result)) $last5torrents[] = $last5torrent;
 
$mc1->cache_value('last5_tor_'$last5torrents$TBDEV['expires']['last5_torrents']);
}
$HTMLOUT.= "<div class='roundedCorners' style='background:#ECE9D8;text-align:left;width:85%;border:1px solid #C0C0C0;padding:3px;'>
<div style='background:transparent;height:20px;'><span style='font-weight:bold;font-size:10pt;'>Derniers Torrents</span></div><br />"
;
$HTMLOUT.= "<table align='center' width='100%' border='0' cellspacing='0' cellpadding='5'>";
$HTMLOUT.= empty($last5torrent["poster"]) ? "<img src='" $TBDEV['pic_base_url'] . "noposter.jpg' width='150' height='220' />" "<img src='" htmlsafechars($last5torrent['poster']) . "' width='150' height='220' />";
$HTMLOUT.= "</table></div><br />";
//== End Latest torrents 
Reply With Quote