boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Categories List & Image Help

 
Post new topic   Reply to topic    boardom Forum Index -> Template help
View previous topic :: View next topic  
Author Message
Xanthis



Joined: 09 Dec 2003
Posts: 2

PostPosted: Tue Dec 09, 2003 1:56 pm    Post subject: Categories List & Image Help Reply with quote

Hi All... Long time stalker of the forums, first time poster. Most of the time I can search and find the answer to my problems... I've tried looking for the answer to this one, but alas I'm blind and it's fairly late so I'm getting a bit thin. Sorry if this post is else where but I couldn't find it!


getting to the point...here's my question I need help on:

I have my categories listing in ID order, all looking nice in the text links.
Is there a way to add a image, like a bullet, that also links to the category, just before the categories name?

Example:

Cat 1
Cat 2


I'm thinking i've gotta do something with this code:

Code:
<?php list_cats(0, 'All', 'ID'); ?>


but honestly i'm stumped.
Any help, i would be really greatful Very Happy
Back to top
View user's profile Send private message
yann



Joined: 05 Dec 2003
Posts: 10
Location: London

PostPosted: Tue Dec 09, 2003 3:14 pm    Post subject: Reply with quote

Hi,

Edit the function list_cats in the file b2-include/b2template.functions.php. Replace

Code:

echo "\t<a href=\"".$file.$querystring_start.'cat'.$querystring_equal.'all">'.$all."</a><br />\n";


by something like this

Code:
echo "\t<a href=\"".$file.$querystring_start.'cat'.$querystring_equal.'all"><img src="b2-img/bullet.gif" border="0" />'.$all."</a><br />\n";


and

Code:

echo "\t<a href=\"".$file.$querystring_start.'cat'.$querystring_equal.$row->cat_ID.'">';


by something like that

Code:

echo "\t<a href=\"".$file.$querystring_start.'cat'.$querystring_equal.$row->cat_ID.'"><img src="b2-img/bullet.gif" border="0" />';


where bullet.gif if your picture. I hope it helps...
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Xanthis



Joined: 09 Dec 2003
Posts: 2

PostPosted: Tue Dec 09, 2003 9:21 pm    Post subject: Reply with quote

Many Thanks. I thought it would end up being something that took 2 seconds.
Thanks again for you help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Template help All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group