Support Forum
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!
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...
Visit Cruise Talk Central and Mr Papa's World
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.
YELLOW
SWORDFISH
|
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...
Visit Cruise Talk Central and Mr Papa's World
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.
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...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)