PDA

View Full Version : Javascript ... Wayne Luke Can't Help


spence2
08-04-2004, 05:33 PM
<a href="http://www.vbulletin.com/forum/showthread.php?t=112231" target="_blank">Posted on vB.com</a>, but unfortunately no help.

My Question:
How can I set subforums as "collapsed" by default on the index page? I still want the collapse/expand to be operable; however, I would like for users to have to click to expand.

Wayne Luke says I need to tweak the javascript.
Can anyone tell me how?
Thanks!

CarCdr
08-04-2004, 05:44 PM
The following two template changes will *always* load the main page with the subforums collapsed. The user can un-collapse them, but as soon as the main page is reloaded, they will be collapsed again.

In the template named forumhome_forumbit_level1_nopost, make these two changes:

Change:
src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif"
To:
src="$stylevar[imgdir_button]/collapse_tcat_collapsed.gif"

Change:
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
To:
<tbody id="collapseobj_forumbit_$forumid" style="display:none;">

spence2
08-04-2004, 06:15 PM
Worked like a charm. Thank you so much!

BTW, someone commented at vB.com:
"Be aware that users that don't have javascript activated will NOT be able to see the collapsed elements, as they will not be able to open them.