TinyPortal

Development => Support => Topic started by: Inge Jones on May 17, 2012, 11:00:26 AM

Title: Set block to collapsed by default?
Post by: Inge Jones on May 17, 2012, 11:00:26 AM
I have searched the forum and see that as recently as 2008 people were being told there was no way to set a block to start off as collapsed until the user decides its one they would like open.  I was wondering if the situation had changed in the intervening years?
Title: Re: Set block to collapsed by default?
Post by: IchBin on May 17, 2012, 09:10:41 PM
There's really no easy way to do it that I can think of ATM. TP uses cookies to keep track of whether a person has toggled a block on or off. So the setting in the cookie doesn't exist unless a block has been toggled by the user. You'd have to write some code to insert that setting into the cookie automatically for each user that comes to your site.
Title: Re: Set block to collapsed by default?
Post by: Inge Jones on May 18, 2012, 10:33:00 AM
Fair enough, thanks :)  It's not important enough to bother with that workaround, just a minor UI issue as I have created a custom upload block for topic-related uploads and most of the time the user won't wish to use this rather large upload management form that opens in the block above the posting/editing form.  However, after they first find the little '-' they should be fine :D
Title: Re: Set block to collapsed by default?
Post by: IchBin on May 18, 2012, 06:55:53 PM
If it's a custom block it would probably be easier to put something in your code to not show the output of the block unless they've clicked something or other.
Title: Re: Set block to collapsed by default?
Post by: Inge Jones on May 19, 2012, 09:33:21 AM
Yes, I thought of that - was just weighing up whether it was important enough for the extra effort :)

Have you considered adding a tickbox to the options for a block whether to be collapsed by default, then, if that is ticked, it's collapsed unless the user's setting or cookie is found, and if it's not ticked, it's open unless the user's cookie that you mentioned is found?
Title: Re: Set block to collapsed by default?
Post by: IchBin on May 19, 2012, 09:44:13 PM
Considering over the 5+ years I've been with this portal I've only seen the request come up a few times, no I haven't considered it. It's just not worth the little time and effort I have to put in a feature than only a handful of people will use.
Title: Re: Set block to collapsed by default?
Post by: Inge Jones on May 20, 2012, 02:55:43 PM
Thanks anyway, I am enjoying your portal software even without the feature :)
Title: Re: Set block to collapsed by default?
Post by: Maxx1 on May 20, 2012, 10:52:48 PM
Quote from: IchBin™ on May 19, 2012, 09:44:13 PM
Considering over the 5+ years I've been with this portal I've only seen the request come up a few times, no I haven't considered it. It's just not worth the little time and effort I have to put in a feature than only a handful of people will use.

Agreed and I test and give support to several portal system and the same thing, do not see any reason why anyone would want this..
How ever if any of your members want to collapse the block, say if it has an ad block or one block is way too long, they can do this very easily, and they will remain that way for that member as long as they do not clear their browser's cache. (history). they can close all the blocks in seconds.

They may also close the side panels to fit the main content in a mobile unit's browser window and if this is the case, this why I only use the left or the right panels so, the blocks can be turned off by the user easily to read the forums content, or view a Video, or Picture and so on!
Note have have done this and the site looks good in my little Android Phone.

One thing I'd suggest for all the Themer's  is maybe a bigger shrink or collapse icon, to be viewed easier on the mobile devices!

TP blocks have allot of great options already!

hope this helps!

regards,
Maxx