Gossamer Forum
Home : Products : Links 2.0 : Customization :

Conditional bullets / images

Quote Reply
Conditional bullets / images
I'm setting up a directory where links tend to come in particular flavors: plain-ole web sites, web sites that require particular kinds of Hebrew support, email list archives, page images of classical texts.

I thought it would be nice/useful to put this info in a standard format. The idea hit me of not only using images instead of bullets before each link, but having the image depend on that type. This would require allowing the person adding a link choose which image he thinks is appropriate for it.

Suggestions?

-mitch
Quote Reply
Re: [aishdas] Conditional bullets / images In reply to
You would need to add a drop-down menu option in links.def. Its a reasonably easy task to do. Simply have a look around this forum for 'add field dropdown' ... that should hopefully give you some good results Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [aishdas] Conditional bullets / images In reply to
Not sure if this is what you are looking for but:

in links.def add a comma to the last line of the %db_def section and then insert the following as the last line
Picture => [20, 'alpha', 12, 12, 1, 'EA', 'HS|EA|CTI|GEN']

Change 20 as needed.

In the %db_select_fields section insert the following at the first line
Picture => 'HS,EA,CTI,GEN',

Adjust links.db by adding a delimiter at the end of each record. you can use cvsdb at http://home.hccnet.nl/...oftware/software.htm


In Add.html add

<TR>
<TD>Picture:&nbsp;</TD>
<TD>
<SELECT NAME=Picture>
<OPTION value=HS>Hebrew Support</OPTION>
<OPTION value=EA>Email Archives</OPTION>
<OPTION value=CTI>Classical Text Images</OPTION>
<OPTION value=GEN>General</OPTION>
</SELECT>
</TD>
</TR>


In modify.html add


<TR>
<TD>Picture:&nbsp;</TD>
<TD>
<SELECT NAME=Picture>
<OPTION value="HS"<%if Picture eq 'HS'%> SELECTED<%endif%>>Hebrew Support</OPTION>
<OPTION value="EA"<%if Picture eq 'EA'%> SELECTED<%endif%>>Email Archives</OPTION>
<OPTION value="CTI"<%if Picture eq 'CTI'%> SELECTED<%endif%>>Classical Text Images</OPTION>
<OPTION value="GEN"<%if Picture eq 'GEN'%> SELECTED<%endif%>>General</OPTION>
</SELECT>
</TD>
</TR>


In links.html add

<IMG SRC="/path_to_images/<%Picture%>.jpg" align=middle BORDER=0 ALT="Website Picture">

then create
HS.jpg
EA.jpg
CTI.jpg
GEN.jpg

This is untested so check it out.


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."

Last edited by:

esm: Mar 27, 2003, 10:20 AM