for random items with no photo i came up with this fix. its not the cleanest code but it works
it will display nophotosmall.jpg image for an ad with no photo assigned to it
find
Code:
$html_random .= '<tr valign="top"><td width="90" align="left">
<a href="classifieds.php?do=viewitem&itemid='.$random["id"].'">
<img src="'.$thumb.'" border="0" /></a></td>
<td align="left"><h4><a href="classifieds.php?do=viewitem&itemid='.$random["id"].'">'.$title.'</a>
</h4>'.$price.' '.$vbulletin->options["microclassifieds_currency"].'</td></tr>';
and replace with
Code:
$ad_photo = $random["logo"];
if(empty($ad_photo))
{
$html_random .= '<tr valign="top"><td width="90" align="left">
<a href="classifieds.php?do=viewitem&itemid='.$random["id"].'">
<img border="0" src="microclassifieds/images/nophotosmall.png" width="50" align="left" style="padding:3px;">
<td align="left"><h4><a href="classifieds.php?do=viewitem&itemid='.$random["id"].'">'.$title.'</a>
</h4>'.$price.' '.$vbulletin->options["microclassifieds_currency"].'</td></tr>';
} else {
$html_random .= '<tr valign="top"><td width="90" align="left">
<a href="classifieds.php?do=viewitem&itemid='.$random["id"].'">
<img src="'.$thumb.'" border="0" /></a></td>
<td align="left"><h4><a href="classifieds.php?do=viewitem&itemid='.$random["id"].'">'.$title.'</a>
</h4>'.$price.' '.$vbulletin->options["microclassifieds_currency"].'</td></tr>';
}