The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
toggle_collapse closed initially?
Is it possible to make the collapse forum buttons on the forum home be initially collapsed instead of initially open?
I only need it to be this way on the forum home and just for the forum listing. |
#2
|
||||
|
||||
I think I got this figured out with a little help from a poster at vb.com.
So basically in the template that contains the collapse object you want to put in the following code: PHP Code:
So basically, this sets the cookie for that object as soon as the page loads instead of waiting for the user to click it. Then once the cookie is set, it doesn't call the collapse function anymore and just relies on what the user chose as their option. It seems to work for me but if anyone finds a problem, please post it. So in your example AutomatikStudio, if i understood you right, you would use toggle_collapse('forumbit_1'); and that would collapse your first parent forum. Hope that helps someone..... |
#3
|
||||
|
||||
The problem with this code is that you can't have all objects expanded if you want to because then $_COOKIE['vbulletin_collapse'] is empty and the condition turns out to be true which leads to collapsing the specified objects.
|
#4
|
||||
|
||||
that's true and im not sure how to solve that issue. maybe create an empty, hidden and collapsed object.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|