styling categories (class="subcategory") styling categories (class="subcategory")
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

styling categories (class="subcategory")

Started by zro, August 05, 2005, 03:20:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zro

http://art.redtv.org/gallery/

been styling/moding my coppermine. Hit a problem.

I can't seem to decipher the category function enought to give subcatgories a differnet (css) class.

I've seen this question asked a few times in different ways, but not answered (maybe im being an annoyance, sorry)...

it seems that there is some differentiation being as it adds
</td><td><img src="images/spacer.gif" width="20" height="1"></td><td>
as {CAT_THUB}
for subcategories, but i cant seem to find where this is being processed....
(im new to php, and am currentally sucking down the manual... so sorry im ignorant.)

thanks!

zro

well i found in index.php line 146
the mysterious </td><td><img src="images/spacer.gif" width="20" height="1"></td><td>
but im still a littl confused on how i can wrap sub categories in a


--code--
<div class="sub">
                <a href="index.php?cat=13">subcat</a>
                <span><b>1</b> files in <b>1</b> albums</span>
</div>
--code--


obviously i can change the above mentioned mysterious code (/td td spacer...etc) to the opening div.... but how can i add a trailing </div> if ($level > 1)

any ideas?

seen that some have differentiated sub and top-level cats w/ wrapped tags
i.e. here http://photos.edgladwin.com/
seems to have subcats wrapped in div and <small>....

...grrr. how do you do this? thanks in advance.

zro

just tried adding this:


            if ($level > 1)
                       { get_subcat_data($subcat['cid'], $cat_data, $album_set_array, $level -1, $ident . "<div class=\"artsubcat \">");
            } else { get_subcat_data($subcat['cid'], $cat_data, $album_set_array, $level -1, $ident . "<div class=\"arttlcat \">"); }



in attempt to add div classes for each and every category based on "level" but i cant seem to get it to add to top level categories...
I tried $level < 2, =1, and finally this simple else.. but it doesnt seem to effect top level categpories.

the intention here was to add an opening div for everything and then close it later in the theme.php @ $template_cat_list =

i dunno if this is very efficent, but well, i cant even get it to work.... any ideas?