Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Auto-Collapse Forum?
Avatar
Ruthanne Reid
Member
Free Members
sp_UserOfflineSmall Offline
Mar 13, 2015 - 12:26 am

Is it possible to set a forum to be collapsed on page load so people would have to click on it to open it? Thanks in advance!

http://amongthemythos.com/forum

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 13, 2015 - 1:00 am

do you really mean a forum closed?? with no topics showing?  or do you mean on group view, the group closed with no forums showing??

if the former, then sorry, no...

if the latter, please see:  https://simple-press.com/docum.....openclose/

you can default it to closed...  you need to edit the use of that template tag in you spGroupview.php template in your theme...  that is, change

                    sp_GroupOpenClose('tagClass=spIcon spRight&default=open', 'Open forum listing', 'Close forum listing');

to

                    sp_GroupOpenClose('tagClass=spIcon spRight&default=closed', 'Open forum listing', 'Close forum listing');

as always, we strongly suggest you do this in a child theme or you own theme to keep from losing changes to our theme on updates...

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 13, 2015 - 4:25 am

A couple of things Steve didn't say about using that display function...

Firstly, it is currently only used - by default - in the 'Unified' and 'Reboot' themes.

Secondly, if allowed, it will set cookies on each users browser so that it remembers the state it was in when last used so it will not, necessarily, always be closed when first accessed depending on its previous use.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 13, 2015 - 2:57 pm

Not to argue with my colleague :) but all the themes we provide (except for iforum where it doesnt really make sense) have that feature in them, with open by default...

but he makes a good point on the state remembered per user... ;)

Avatar
Ruthanne Reid
Member
Free Members
sp_UserOfflineSmall Offline
Mar 13, 2015 - 6:00 pm

Thank you both for your answer! :) I'm using the reboot theme. I was hoping I could do it with one specific group - it's old forums I moved over from a phpBB installation. I'm keeping them for the sake of archives, but I'd like to have that group closed so it doesn't get more attention than the active groups.

If there's no way, I'll go ahead and make an official request elsewhere. :)

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 13, 2015 - 6:07 pm

you can do it for none, one, few or all...  just check the group id before passing the argument...

something like:

                    $state = ($spThisGroup->group_id == 1) ? 'closed' : 'open';
                    sp_GroupOpenClose("tagClass=spIcon spRight&default=$state", 'Open forum listing', 'Close forum listing');

where the 1 for group_id would be the one you want closed... others would be open...  as Andy, said, user state will be remembered...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626