collapse

* User Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Who's Online

  • Dot Guests: 53
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • Mstcool: Oh, ok, Sinan
    August 25, 2014, 10:19:15 PM
  • ArsenArsen: When i make them
    August 19, 2014, 12:20:20 AM
  • ArsenArsen: I had some mod ideas, i will put them.
    August 19, 2014, 12:19:45 AM
  • [SiNaN]: We could, but it's there as a reminder of some kind, that we should fill it in, somehow.
    August 18, 2014, 09:57:14 PM
  • Mstcool: Y don't u guys remove the customization section since it has no files?
    August 17, 2014, 10:27:28 PM
  • ArsenArsen: Ok, Great!
    August 15, 2014, 03:13:18 PM
  • [SiNaN]: We have the translators' names listed in the downloads area.
    August 15, 2014, 03:05:39 PM
  • ArsenArsen: Never Mind, i wont, noone did.
    August 15, 2014, 02:22:32 PM
  • ArsenArsen: Can i put mz name on translation
    August 15, 2014, 02:21:06 PM
  • [SiNaN]: You can only change your forum profile options once you have 5 posts. I have made an exception for Translator group though, so you should be able to do it now.
    August 13, 2014, 03:32:17 PM
  • ArsenArsen: Cant find where to change avatar
    August 13, 2014, 03:12:38 PM
  • ArsenArsen: Ok
    August 11, 2014, 05:17:55 AM
  • Underdog: there is a documentation link on your top-right
    August 10, 2014, 08:48:45 PM
  • ArsenArsen: What to use for docs? This is NoT SP support question.
    August 10, 2014, 02:55:55 PM
  • Ron-KK4HGY: Hello all!
    August 06, 2014, 03:22:50 PM
  • USFA: tada
    August 04, 2014, 09:49:45 PM
  • BCNPalomino: lol, that search doe :O
    July 18, 2014, 09:26:27 AM
  • RohailPro23: hi all
    July 18, 2014, 08:09:00 AM
  • samborabora: sorry, thought this was search, lol
    June 29, 2014, 04:45:12 AM
  • samborabora: sp_embed_image
    June 29, 2014, 04:45:01 AM

* Team Blog

* Recent Posts

Re: Easy one: Displaying an Action in a block by andy
[Today at 12:23:01 AM]


Re: Easy one: Displaying an Action in a block by BurkeKnight
[Yesterday at 03:55:27 PM]


Re: Easy one: Displaying an Action in a block by andy
[Yesterday at 02:29:45 PM]


Re: Easy one: Displaying an Action in a block by XaR
[Yesterday at 01:12:01 PM]


Re: home page help by XaR
[Yesterday at 11:36:41 AM]

Welcome to SimplePortal.net! You can download SimplePortal from the Download Page!

Author Topic: SMF & Simple Portal - auto collapsable blocks?  (Read 1810 times)

0 Members and 1 Guest are viewing this topic.

Offline koshal

  • Semi Newbie
  • *
  • Posts: 6
  • Gender: Male
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
SMF & Simple Portal - auto collapsable blocks?
« on: January 19, 2010, 05: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

Offline koshal

  • Semi Newbie
  • *
  • Posts: 6
  • Gender: Male
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: SMF & Simple Portal - auto collapsable blocks?
« Reply #1 on: January 21, 2010, 07:31:23 PM »
no help  :thumbsdown:

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6467
  • The Amazing Coder!
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: SMF & Simple Portal - auto collapsable blocks?
« Reply #2 on: January 22, 2010, 08: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.
And slowly, you come to realize... It's all as it should be...

Offline koshal

  • Semi Newbie
  • *
  • Posts: 6
  • Gender: Male
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: SMF & Simple Portal - auto collapsable blocks?
« Reply #3 on: January 23, 2010, 04:19:50 AM »
yay :)
Thank you very much!

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6467
  • The Amazing Coder!
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: SMF & Simple Portal - auto collapsable blocks?
« Reply #4 on: January 29, 2010, 09:03:11 AM »
You're welcome. ;)
And slowly, you come to realize... It's all as it should be...

Offline katoon

  • Semi Newbie
  • *
  • Posts: 41
  • SMF Version: 2.0.1
  • SP Version: 2.0.2
Re: SMF & Simple Portal - auto collapsable blocks?
« Reply #5 on: November 27, 2012, 01:50:46 AM »
How do you find a id of a block?

Offline phantomm

  • Support
  • *
  • Posts: 379
  • Gender: Male
  • Smile, tomorrow will be worse...
    • Polish ElkArte community
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: SMF & Simple Portal - auto collapsable blocks?
« Reply #6 on: November 27, 2012, 04:51:56 AM »
When you open block edit page you will see block ID in URL.