<!-- BEGIN LINK ATTACHMENTS --> <a href="download.php?id={LINKID}&attachid={ATTACHID}">{ATTACHFILETITLE}</a> ({ATTACHKB} KB, {ATTACHDOWNLOADS} downloads)<br> <IF {ATTACHISIMAGE}><img src="{ATTACHTHUMBURL}"></a><br></IF> <!-- END LINK ATTACHMENTS -->
<!-- BEGIN LINK ATTACHMENTS --> <a href="download.php?id={LINKID}&attachid={ATTACHID}">{ATTACHFILETITLE}</a> ({ATTACHKB} KB, {ATTACHDOWNLOADS} downloads)<br> <IF {ATTACHISIMAGE}><a href="download.php?id={LINKID}&attachid={ATTACHID}"><img src="thumbnail.php?id={LINKID}&attachid={ATTACHID}" alt="image"></a><br></IF> <!-- END LINK ATTACHMENTS -->
which then would display the alt tag "image" when your mouse pointer is moved over the attached image. Obviously if there's no image there can be no alt tag, because that is directly and only connected to the image.
What exactly is your question here? Do you want the alt text to appear without the image? I'm not sure if that's possible, having an alt text connected to a link. But then, I don't really see how that could be useful
if no image has been attached/uploaded, then obviously no image will be displayed. If the image that has been uploaded is broken, then you can use the alt text to display whatever you want it to say.
But for one of my directories I use something else. I added this code:
*without the extra ";" at the end, don't know where that's coming from.
So if the image cannot be displayed for whatever reason, an alternative image (in my case a transparent graphic) will be displayed to avoid a broken image. But you HAVE to make sure that this image exists, otherwiese you'll be stuck in never-ending loop
Comments on alt tag does not display
Experienced
Usergroup: Customer
Joined: Jul 29, 2005
Total Topics: 30
Total Comments: 65
Hi Paul,
In displaylinks.tpl we have this:
<!-- BEGIN LINK ATTACHMENTS -->
<a href="download.php?id={LINKID}&attachid={ATTACHID}">{ATTACHFILETITLE}</a> ({ATTACHKB} KB, {ATTACHDOWNLOADS} downloads)<br>
<IF {ATTACHISIMAGE}><img src="{ATTACHTHUMBURL}"></a><br></IF>
<!-- END LINK ATTACHMENTS -->
but if no image, the alt tag does not display.
Thanks,
rw
Forum Regular
Usergroup: Customer
Joined: May 11, 2003
Total Topics: 64
Total Comments: 199
Well, the original code is
which then would display the alt tag "image" when your mouse pointer is moved over the attached image.
Obviously if there's no image there can be no alt tag, because that is directly and only connected to the image.
What exactly is your question here? Do you want the alt text to appear without the image? I'm not sure if that's possible, having an alt text connected to a link. But then, I don't really see how that could be useful
Experienced
Usergroup: Customer
Joined: Jul 29, 2005
Total Topics: 30
Total Comments: 65
Yes that was the idea, if no image to either display: "No Image Available" or alternative image.
Thanks,
rw
Forum Regular
Usergroup: Customer
Joined: May 11, 2003
Total Topics: 64
Total Comments: 199
oh, I see well, this is how it works:
if no image has been attached/uploaded, then obviously no image will be displayed. If the image that has been uploaded is broken, then you can use the alt text to display whatever you want it to say.
But for one of my directories I use something else. I added this code:
<img src="thumbnail.php?id={LINKID}" OnError=this.src="no_button.gif">
*without the extra ";" at the end, don't know where that's coming from.
So if the image cannot be displayed for whatever reason, an alternative image (in my case a transparent graphic) will be displayed to avoid a broken image. But you HAVE to make sure that this image exists, otherwiese you'll be stuck in never-ending loop
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
The 'no thumbnail' image should already work if it's there, but I think it's only preincluded in WSN Gallery.