Gossamer Forum
Home : Products : Links 2.0 : Customization :

Image + link

Quote Reply
Image + link
Hi.

I want each database entry to have a small image with a link I can specify. It is a link which takes the user to a info page for the database link. Preferrably a new window.

Can someone tell me how to...

Thanks a million, KL
Quote Reply
Re: Image + link In reply to
well...just open up link.html and add something like this

<a href="<%build_root_url%>/Detailed/<%ID%>.html" target="_new"><img src="http://www.yourserver.com/images/graphic.gif"></a>


Philip
http://ucmd.virtualave.net


[This message has been edited by lordmouse (edited October 28, 1999).]
Quote Reply
Re: Image + link In reply to
Well, I want to be able to have a different link for each database entry. I guess your suggestion doesn't work for this...

Thanks anyway. Other help much appreciated.

/KL
Quote Reply
Re: Image + link In reply to
Can you be more specific, like showing us some visual HTML examples of what result you are looking for???

You are being quite vague, and I think that widgetz's codes would work fine for what you've told us.

Give more details, and we may be able to assist you.

Wink

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Image + link In reply to
so each link has a specific graphic associated with it?

you could create a new field (i.e. "Graphic URL") that contains the URL of the graphic you want to use and in the image tag do something like

<img src="<%Graphic URL%>">

Does that help any?

Philip
http://ucmd.virtualave.net
Quote Reply
Re: Image + link In reply to
Ah...I see...

What you will need to do is download the Enhanced Template.PM Mod in the Resource Center. Then you can set-up comparisions for the link based on the Field you are putting in the links.def file, like the following:

Code:
<%if Field eq "Graphic">
<img src="<%Graphic URL%>">
<%endif%>

Hope this helps.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Image + link In reply to
 
Quote:
You are being quite vague, and I think that widgetz's codes would work
fine for what you've told us.

did i post here eliot?... confused me there..

anyways.. have you guys ever thought of storing the GIF image IN the database? it makes no difference in space (since GIFs take space on their own anyway).. but it means when you move servers/server crashes.. you will have one file to put back up and the images will still work..

it's actually pretty easy.. you just print the content of a gif file.. it's usually in binary format.. into the database..

then you use a perl script to print it (i made one for Links SQL.. but i'm in the middle of making an admin section to add the image (more conveinent then figuring out the content of a gif image yourself)..

anyways..
jerry
Quote Reply
Re: Image + link In reply to
Thanks Eliot. Just one question before I try it. This seems to give me an image from an url I specify. Does your solution include the possibility to add a link to the image. For example when a user clicks on the image, this person will be taken to a link which I have specified for that specific entry?

In easy words. I want to have an image with a link next to each database entry, which can be configured seperately for each entry.

Thanks, KL