SimplePortal

Customization => Themes and Graphics => Topic started by: zushiba on January 20, 2010, 07:27:16 PM

Title: Default Body Class - custom styles question.
Post by: zushiba on January 20, 2010, 07:27:16 PM
Is there a simple way to add custom styles to the list of available styles for blocks?
Adding a Custom Body Class simply appends whatever you've got in the box to windowbgX that you've got selected.
Title: Re: Default Body Class - custom styles question.
Post by: ccbtimewiz on January 21, 2010, 01:54:14 AM
No, there isn't a simple way as it would require template editing, source editing, and some conditional rewriting, as far as I'm aware.

You can fully customize blocks from the top to the bottom using those custom style options-- I managed it using a wide variety of CSS manipulating (see: backgrounds, margins, paddings, colors, offsets, etc)
Title: Re: Default Body Class - custom styles question.
Post by: [SiNaN] on January 21, 2010, 03:56:09 AM
You'll just need to add a single line to Themes/default/PortalAdminBlocks.template.php file.

Code: (Find) [Select]
<option value="windowbg3"', $context['SPortal']['block']['style']['body_default_class'] == 'windowbg3' ? ' selected="selected"' : '', '>windowbg3</option>
Code: (Replace) [Select]
<option value="windowbg3"', $context['SPortal']['block']['style']['body_default_class'] == 'windowbg3' ? ' selected="selected"' : '', '>windowbg3</option>
<option value="classname"', $context['SPortal']['block']['style']['body_default_class'] == 'classname' ? ' selected="selected"' : '', '>classname</option>

Change the classname as the name of class you want to add to that list.

There is a reason why I call this thing flexible. ;)
Title: Re: Default Body Class - custom styles question.
Post by: zushiba on January 21, 2010, 11:38:22 AM
Well it works and that's what's important. Thanks :)
Title: Re: Default Body Class - custom styles question.
Post by: [SiNaN] on January 21, 2010, 11:46:42 AM
Glad that it worked. ;)
Title: Re: Default Body Class - custom styles question.
Post by: trlxpro on January 27, 2010, 09:07:57 PM
thanks SiN, just what i was lo0king 4. =]
Title: Re: Default Body Class - custom styles question.
Post by: ccbtimewiz on January 27, 2010, 09:18:18 PM
I guess manual hacking is certainly one way of doing it LOL.
Title: Re: Default Body Class - custom styles question.
Post by: trlxpro on January 27, 2010, 11:09:55 PM
I guess manual hacking is certainly one way of doing it LOL.

quite certainly the easiest. =D
Title: Re: Default Body Class - custom styles question.
Post by: [SiNaN] on January 29, 2010, 10:05:02 AM
I guess manual hacking is certainly one way of doing it LOL.

A single line won't hurt. ;)

You're welcome.
SimplePortal 2.3.8 © 2008-2024, SimplePortal