I wanted to mod A block with Image from torrent......that i can post from any catagory and any torrent image...and with 2 posters in a row....
i got this one but its only showing 1 image and problem is cannot edit from catagory or any torrent i like..its only showing latest upload..
Pic attached 1st one my site...2nd one i wanna do...im posting the code also..
Regards,

i got this one but its only showing 1 image and problem is cannot edit from catagory or any torrent i like..its only showing latest upload..
Pic attached 1st one my site...2nd one i wanna do...im posting the code also..
Regards,
<?php
if (!$site_config["MEMBERSONLY"] || $CURUSER) {
$limit = 4; // Only show 4 max
$res = mysql_query("SELECT torrents.id, torrents.name, torrents.image1, torrents.image2, categories.name as cat_name, categories.parent_cat as cat_parent FROM torrents LEFT JOIN categories ON torrents.category=categories.id WHERE banned = 'no' AND (image1 != '' OR image2 != '') AND visible = 'yes' ORDER BY id DESC LIMIT $limit") or die(mysql_error());
if (mysql_num_rows($res)) {
begin_block(T_("LATEST_POSTERS"));
print("<table align=center cellpadding=0 cellspacing=0 width=100% border=0>");
while ($row = mysql_fetch_array($res)) {
$cat = htmlspecialchars("$row[cat_parent] - $row[cat_name]");
$name = htmlspecialchars($row["name"]);
if ($row["image1"]) {
print("<tr><td align=center><a href='$site_config[SITEURL]/torrents-details.php?id=$row[id]' title='$name / $cat'><img border='0' src='uploads/images/$row[image1]' alt=\"$name / $cat\" width=100></a><BR></td></tr>");
} else {
print("<tr><td align=center><a href='$site_config[SITEURL]/torrents-details.php?id=$row[id]' title='$name / $cat'><img border='0' src='uploads/images/$row[image2]' alt=\"$name / $cat\" width=100></a><BR></td></tr>");
}
}
print("</table>");
end_block();
}
}
?>TT Forum Guys Are Awesome...

