[solved]theming my s9y, looking for changing category styles

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
.g@sp.
Regular
Posts: 50
Joined: Thu Apr 20, 2006 2:01 pm
Location: Brussels, Belgium

[solved]theming my s9y, looking for changing category styles

Post by .g@sp. »

hi
i've just installed my s9y, think it'll be great... 8)

i'm skinning it and i've a few questions...


:arrow: how can i modify the style of the category names in my sidebar ?
there's a div for SideBarContent, but it'll change every categories, and i just wanna change sub-categories... how can i do that ?

:arrow: another "basis" question... there is no html in index.php, where can i find it ???

:arrow: not really a "designing" question : is it possible to manage what are the homelinks ? (precisely i wanna have the parent category for homelink1 and the subcategory for homelink2)

Thank you very much if someone could help, and sorry for my poor english (i'm french speaker... hm is there any french forum about s9y ??)
Last edited by .g@sp. on Sat Apr 22, 2006 12:13 am, edited 1 time in total.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: theming my s9y, looking for changing category styles

Post by garvinhicking »

Hi!

For changing sub-categories, you'll need first activate Smarty Templating in the categories sidebar plugin. Then you can take on the plugin_categories.tpl file (copy it from templates/default/ into your template directory).

There you change this:

Code: Select all

{foreach from=$categories item="plugin_category"}
        <li style="display: block;">
        {if $is_form}   
            <input style="width: 15px" type="checkbox" name="serendipity[multiCat][]" value="{$plugin_category.categoryid}" />
        {/if}
   
        {if !empty($category_image)}
            <a class="serendipity_xml_icon" href="{$plugin_category.feedCategoryURL}"><img src="{$category_image}" alt="XML" style="border: 0px" /></a>
        {/if}

            <a href="{$plugin_category.categoryURL}" title="{$plugin_category.category_description|escape}" style="padding-left: {$plugin_category.paddingPx}px">{$plugin_category.category_name|escape}</a>
        </li>
{/foreach} 
into this:

Code: Select all

{foreach from=$categories item="plugin_category"}
        <li class="depth{$plugin_category.depth}" style="display: block;">
        {if $is_form}   
            <input style="width: 15px" type="checkbox" name="serendipity[multiCat][]" value="{$plugin_category.categoryid}" />
        {/if}
   
        {if !empty($category_image)}
            <a class="serendipity_xml_icon" href="{$plugin_category.feedCategoryURL}"><img src="{$category_image}" alt="XML" style="border: 0px" /></a>
        {/if}

            <a href="{$plugin_category.categoryURL}" title="{$plugin_category.category_description|escape}" style="padding-left: {$plugin_category.paddingPx}px"> {$plugin_category.category_name|escape}</strong>{/if}</a>
        </li>
{/foreach} 
Then each li element will have a "li.depthX" class. Then you can do this in your CSS:

Code: Select all

li.depth0 { font-weight: bold }
to make all main-level categories bold, for example.

The basic html you can find in the "index.tpl" template file. You can change those homelinks in the index.tpl.

Sadly we don't have a french forum, since we don't have any french-speaking developers. :-)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
.g@sp.
Regular
Posts: 50
Joined: Thu Apr 20, 2006 2:01 pm
Location: Brussels, Belgium

Post by .g@sp. »

ok thanks, i'll try it asap

i've made some corrections on french translation (in serendipity_lang_fr.inc.php, but not finished), can i send it somewhere when it'll be done ?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Best thing for you would be to check back with the original french translator(s) mentioned in the file, and then you or they can send me the updated files for me to commit. Many thanks for offering to help! Much appreciated!

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
.g@sp.
Regular
Posts: 50
Joined: Thu Apr 20, 2006 2:01 pm
Location: Brussels, Belgium

Post by .g@sp. »

you'll need first activate Smarty Templating in the categories sidebar plugin
i'm sorry, but i don't understand/find that...

ok i've found it ;)

but there is en error on the code you gave me :
on line 17 :

Code: Select all

            <a href="{$plugin_category.categoryURL}" title="{$plugin_category.category_description|escape}" style="padding-left: {$plugin_category.paddingPx}px"> {$plugin_category.category_name|escape}</strong>{/if}
the </strong> and {/if} are alone, there are no <strong> either {if} before ;)

thanks, it works perfetly as i want know...

just gonna try other things ;)
Post Reply