Gossamer Forum
Home : Products : Links 2.0 : Customization :

Graphic link for categories

Quote Reply
Graphic link for categories
Hi

I was browsing through the forum in relation to adding a grahic beside the title of the categories, none of the solutions would appear to work, possibly because I have so many mods.

I found a simple but not perfect solution.

Code:
<img src="/pathto/images/$category_name.gif" border="0">
By simply adding this you can place graphics in a directory, by calling them the category name.

The problem is if they contain more than one word category name removes _ and /.

In the sub routine in site_html_templates.pl you find

Code:
my ($url, $numlinks, $mod, $subcat, $category_name, $description, $output, $i);
I take it if you could enter another scalar in here that would give you the category name including the _ but not the / then this would be the name of the directory, and hey all would be great.

Could some nice programmer help me out or am I way off the mark

thanks

DavyC

Quote Reply
Re: Graphic link for categories In reply to
hola,

http://www.gossamer-threads.com/...um3/HTML/004795.html

it works fine to me... and it does not contains much modifications... you have only to add a field in your category.def...

i think this is one of the best solutions for adding a graphic to a category field... and, of course, because i'm not a programmer!!!

are you sure you have followed all the instructions?
tell me what's showing you...

maybe you've forgot the "|" in the "data/categories.db" before adding the new field?

ciao