Forum Moderators: coopster
The PHP script is as follows:
<img src='".$mosConfig_live_site."/images/$option/ads/".$row->id.$ext_name."_t.jpg' alt='".htmlentities(stripslashes($row->ad_headline),ENT_QUOTES)."' border='0' />
On the 2 computers where it works when I view the source I get:
<img src='http://www.example.com/images/com_adsmanager/ads/1a_t.jpg' alt='' border='0' />
On the computer where it doesnt work I get:
<!-- -->
Any ideas?
[edited by: eelixduppy at 5:15 am (utc) on Oct. 11, 2007]
Perhaps something like the following:
echo "<img src='".$mosConfig_live_site."/images/$option/ads/".$row->id.$ext_name."_t.jpg' alt='".htmlentities(stripslashes($row->ad_headline),ENT_QUOTES)."' border='0' />";
Added
On the computer where it doesnt work I get:<!-- -->
It seems you have got the wrong lines, the result you mentioned couldn't probably come out of the original line you mentioned above.
[edited by: Habtom at 5:19 am (utc) on Oct. 11, 2007]
<?php
$linkTarget = sefRelToAbs("index.php?option=com_adsmanager&page=show_ad&adid=".$row->id."&catid=".$row->category."&Itemid=".$itemid);
$ok = 0;$i=1;
while(!$ok)
{
if ($i < $nb_images + 1)
{
$ext_name = chr(ord('a')+$i-1);
$pic = $mosConfig_absolute_path."/images/$option/ads/".$row->id.$ext_name."_t.jpg";
if (file_exists( $pic))
{
echo "<div align='center'><a href='".$linkTarget."'><img src='".$mosConfig_live_site."/images/$option/ads/".$row->id.$ext_name."_t.jpg' alt='".htmlentities(stripslashes($row->ad_headline),ENT_QUOTES)."' border='0' /></a>";
$ok = 1;
}
}
else if ($nb_images!= 0)
{
echo "<div align='center'><a href='".$linkTarget."'><img src='".$mosConfig_live_site."/components/$option/images/nopic.gif' alt='nopic' border='0' /></a>";
$ok = 1;
}
else
{
$ok = 1;
}
$i++;
}
echo "<br /><a href='$linkTarget'>".stripslashes($row->ad_headline)."</a>";
echo "<br /><span class=\"adsmanager_cat\">(".$row->parent." / ".$row->cat.")</span>";
echo "<br />".adsmanager_html::reorderDate($row->date_created);
echo "</div>";
?>
But like I said before, only the "if" statement image part isnt working.
The script says "ads" but it is really for a classifieds section of the website so maybe my next step should be changing the word "ads" in the script to "classifieds" instead and seeing if that fixes it?