Gossamer Forum
Home : Gossamer Threads Inc. : Custom Modification Jobs :

thumbnails for the links?

Quote Reply
thumbnails for the links?
Hi!

I like to have thumbnails for Link SQL near links like http://www.alexa.com for the first 3 links, any one can quote it? Cool

LinkMan
www.777-best-online-casinos.com
Best Online Casinos
Quote Reply
Re: [linkman] thumbnails for the links? In reply to
Add a field to your links database called "thumbnail" then add the image name for the links that have images and use:

Code:
<%if thumbnail%>
<img src="/images/<%thumbnail%>" alt="<%Title%>">
<%endif%>
Quote Reply
Re: [Paul] thumbnails for the links? In reply to
He said he only wants it for the first 3 links....so this would probably be better sorted with a global (custom, or if someone wants to write one, feel free...i dont have time, as I'm just off to work).

Cheers

Andy (mod)
andy@ultranerds.co.uk
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!
Quote Reply
Re: [Andy] thumbnails for the links? In reply to
If you are using loop variables, just expand the <%if%> portion to do a count of the loop iterations.

From the help pages:

Code:
Also, inside your loop you can use the following tags:


<%row_num%> - a counter for what row is being looped, starts at 1.
<%first%> - boolean that is true if this is the first row, false otherwise.
<%last%> - boolean that is true if this is the last row, false otherwise.
<%inner%> - boolean that is true if this is not first and not last.
<%even%> - boolean is true if row_num is even.
<%odd%> - boolean is true if row_num is odd.

You could use even and odd tags to produce alternating colors like:


<%loop results%>
<tr><td bgcolor="<%if even%>white<%else%>silver<%endif%>">..</td></tr>
<%endloop%>

Also, you can use <%lastloop%> to abort the loop and skip straight to the current
loop's <%endloop%> tag, and <%nextloop%> to load the next loop variables and jump
back to the beginning of the current loop.

The 6 built-in variables (row_num, first, last, ...) and any variables set via the
loop variable will only be available for the current loop iteration, after which
the variables of the next loop iteration will be set, or, for variables that exist
in one iteration but not the next, the variables that existed prior to the loop
being called will be restored.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.

Last edited by:

pugdog: Dec 29, 2002, 7:46 AM