theMusicMan
03-20-2005, 12:45 PM
OK, here's the lowdown. I am adding an image url as a custom field in the Links Directory and am parsing that field as the source for an image to be displayed in the View Link page.
This works fine as the image can be seen in this View Link page here...
http://www.themouthpiece.com/links/...howdetails&l=98 (http://www.themouthpiece.com/links/showlink.php?do=showdetails&l=98)
However... what I want to be able to do is check for the existence of an image in the field and if there is one there, display some alt"" text for mouse over image, but if there is no image URL there (ie: the field is empty) I want to display alternative alt"" text. I am using a conditional thus;
<td>
<a href="showlink.php?$session[sessionurl]l=$link[linkid]&linkurl=$link[url]" target="_blank">
<img
<if condition="$field2">
alt="$link[name]... courtesy of the tMP Links Directory"
<else />
alt="No URL supplied for a 100 * 100 thumbnail. Please enter one here..."
</if>
border="0" src="$field[value]" width="100" height="100"></a>
</td>
However... I can't get the conditional to work and to change the alt text. What am I doing wrong here....?
This works fine as the image can be seen in this View Link page here...
http://www.themouthpiece.com/links/...howdetails&l=98 (http://www.themouthpiece.com/links/showlink.php?do=showdetails&l=98)
However... what I want to be able to do is check for the existence of an image in the field and if there is one there, display some alt"" text for mouse over image, but if there is no image URL there (ie: the field is empty) I want to display alternative alt"" text. I am using a conditional thus;
<td>
<a href="showlink.php?$session[sessionurl]l=$link[linkid]&linkurl=$link[url]" target="_blank">
<img
<if condition="$field2">
alt="$link[name]... courtesy of the tMP Links Directory"
<else />
alt="No URL supplied for a 100 * 100 thumbnail. Please enter one here..."
</if>
border="0" src="$field[value]" width="100" height="100"></a>
</td>
However... I can't get the conditional to work and to change the alt text. What am I doing wrong here....?

