Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Cool tip for image field entries...

Quote Reply
Cool tip for image field entries...
Hi. I just came up with a pretty sweet little bit of template code :)

<font face="Tahoma,Arial,Helvetica" size="2">
<%if Image1%>
<%if ID%>
we dont need to pass in the hidden value, as the image shown here
should already be saved in the DB.
<img src="<%Plugins::Thumb_Images::ThumbURL($ID,'Image1')%>"><BR>
<img src="<%Image1%>"> <font face="Tahoma,Arial,Helvetica" size="1">
<b>NOTE: You may have to Copy + Paste
the following path into the below field: <%Image1%>
(not all browsers will show it correctly by default)</b>

<input <%if Image1%>value="<%Image1%>"<%endif%> type="file" name="Image1" size="20">

As far as I can see, its working ok.

Basically, if <%Image1%> is passed in, but not <%ID%>, then it should be a new link submission (thus it gets directly printed out, instead of going through Thumb_Images).

If <%Image1%> exists, and <%ID%> does too, then it should be a link that needs modifying (thus it already has been saved to the database/server). It should then show them their current image, with the box below it, so they can change it if/when required :)

Just thought I would share that with you, as I know quite a few people have been trying to do similar things.


Andy (mod)
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!