Webmastersite.net
Register Log In

alt tag does not display

Comments on alt tag does not display

rw
Experienced

Usergroup: Customer
Joined: Jul 29, 2005

Total Topics: 30
Total Comments: 65
rw
Posted Jun 15, 2006 - 1:40 PM:

Hi Paul,
In displaylinks.tpl we have this:

<!-- BEGIN LINK ATTACHMENTS -->
<a href="download.php?id={LINKID}&amp;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
Jenny
Forum Regular

Usergroup: Customer
Joined: May 11, 2003

Total Topics: 64
Total Comments: 199
Jenny
Posted Jun 15, 2006 - 2:41 PM:

Well, the original code is
<!-- 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 sad
rw
Experienced

Usergroup: Customer
Joined: Jul 29, 2005

Total Topics: 30
Total Comments: 65
rw
Posted Jun 15, 2006 - 4:48 PM:

Yes that was the idea, if no image to either display: "No Image Available" or alternative image.

Thanks,

rw
Jenny
Forum Regular

Usergroup: Customer
Joined: May 11, 2003

Total Topics: 64
Total Comments: 199
Jenny
Posted Jun 15, 2006 - 5:01 PM:

oh, I see smiling face 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 grin
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jun 17, 2006 - 7:36 PM:

The 'no thumbnail' image should already work if it's there, but I think it's only preincluded in WSN Gallery.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.