collapse

* User Info

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

* Who's Online

  • Dot Guests: 43
  • Dot Hidden: 0
  • Dot Users: 1
  • Dot Users Online:

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • Mstcool: :p *
    September 13, 2014, 07:55:49 PM
  • Mstcool: so when is a new version coming out? :o
    September 13, 2014, 07:55:45 PM
  • USFA: sorry thought was search no glasses
    September 06, 2014, 08:48:23 PM
  • USFA: rename forum
    September 06, 2014, 08:47:40 PM
  • 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

* Team Blog

* Recent Posts

Re: I'm new here by oNLy1
[Today at 09:16:40 PM]


Re: The Never-Ending Always-Changing Off-Topic Thread by oNLy1
[Today at 09:13:09 PM]


Tages News mit einbinden by dingleberry
[Today at 04:12:50 AM]


Re: [Block] Advanced Unread Posts by Underdog
[Yesterday at 05:40:01 PM]


The Never-Ending Always-Changing Off-Topic Thread by BurkeKnight
[September 15, 2014, 04:40:57 PM]

Join us on IRC! Come on in to #simpleportal on the irc.villageirc.net server.

Author Topic: SMF & Simple Portal - auto collapsable blocks?  (Read 1841 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: 6469
  • 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: 6469
  • 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: 383
  • 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.