Main Menu
collapse

Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

User Info

Welcome Guest.
Please log in.

Who's Online

  • Dot Guests: 1262
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]


Thanks for having an interest with our portal. If you have any requests for features, have a look at the Feature Requests board.

Default Body Class - custom styles question.

Started by zushiba, January 20, 2010, 07:27:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zushiba

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.

ccbtimewiz

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)

[SiNaN]

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. ;)
And slowly, you come to realize... It's all as it should be...

zushiba

Well it works and that's what's important. Thanks :)

[SiNaN]

And slowly, you come to realize... It's all as it should be...

trlxpro


ccbtimewiz

I guess manual hacking is certainly one way of doing it LOL.

trlxpro

Quote from: ccbtimewiz on January 27, 2010, 09:18:18 PM
I guess manual hacking is certainly one way of doing it LOL.

quite certainly the easiest. =D

[SiNaN]

Quote from: ccbtimewiz on January 27, 2010, 09:18:18 PM
I guess manual hacking is certainly one way of doing it LOL.

A single line won't hurt. ;)

You're welcome.
And slowly, you come to realize... It's all as it should be...