SimplePortal

Support => English Support => Topic started by: koshal on January 19, 2010, 06:50:13 PM

Title: SMF & Simple Portal - auto collapsable blocks?
Post by: koshal on January 19, 2010, 06:50:13 PM
I'm using SMF 2.0RC2 with SimplePortal 2.3.1 and I've encountered a problem.
While adding a new (HTML for ex.) block to my main portal page, I can check a box to make it collapsable or not. Is there any way to make a new block collapsed by default, so that a user would have to expand it to see "whats hiding in there" ;)?

Thanks in adv. for any info.

Koshal
Title: Re: SMF & Simple Portal - auto collapsable blocks?
Post by: koshal on January 21, 2010, 08:31:23 PM
no help  :thumbsdown:
Title: Re: SMF & Simple Portal - auto collapsable blocks?
Post by: [SiNaN] on January 22, 2010, 09:11:58 AM
It's not that people are ignoring you on purpose. But since there's just me and yours is a more like custom coding request, than a support issue it took some time to get to your topic.

./Themes/default/Portal.template.php

Code: (Find) [Select]
if ($block['type'] == 'sp_boardNews')
If you just want a single block:

Code: (Replace) [Select]
if ($block['id'] == 1)
$block['collapsed'] = true;

if ($block['type'] == 'sp_boardNews')

If you want more than one:

Code: (Replace) [Select]
if (in_array($block['id'], array(1, 2, 3)))
$block['collapsed'] = true;

if ($block['type'] == 'sp_boardNews')

Change 1 or 1, 2, 3 as the ids of blocks you want to display in collapsed state.
Title: Re: SMF & Simple Portal - auto collapsable blocks?
Post by: koshal on January 23, 2010, 05:19:50 AM
yay :)
Thank you very much!
Title: Re: SMF & Simple Portal - auto collapsable blocks?
Post by: [SiNaN] on January 29, 2010, 10:03:11 AM
You're welcome. ;)
Title: Re: SMF & Simple Portal - auto collapsable blocks?
Post by: katoon on November 27, 2012, 02:50:46 AM
How do you find a id of a block?
Title: Re: SMF & Simple Portal - auto collapsable blocks?
Post by: phantomm on November 27, 2012, 05:51:56 AM
When you open block edit page you will see block ID in URL.
SimplePortal 2.3.8 © 2008-2024, SimplePortal