PDA

View Full Version : How To Set Forum Rules Pannel As Collapsed By Default?


BENBOBBY
09-18-2009, 10:23 PM
Hi,

Im wondering if its possible to set the forum rules section as hidden by default so it looks like this

https://vborg.vbsupport.ru/external/2009/09/12.png


Rather than like this:

https://vborg.vbsupport.ru/external/2009/09/13.png


So theres less clutter. :)

Thanks.

--------------- Added 1253316775 at 1253316775 ---------------

Btw here is my existing forumrules template

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="210">
<thead>
<tr>
<td class="thead">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumrules')"><img id="collapseimg_forumrules" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumrules].gif" alt="" border="0" /></a>
$vbphrase[posting_rules]
</td>
</tr>
</thead>
<tbody id="collapseobj_forumrules" style="$vbcollapse[collapseobj_forumrules]">
<tr>
<td class="alt1" nowrap="nowrap"><div class="smallfont">
<if condition="!$show['codeonly']">
<div><if condition="$can['postnew']">$vbphrase[you_may_post_new_threads]<else />$vbphrase[you_may_not_post_new_threads]</if></div>
<div><if condition="$can['reply']">$vbphrase[you_may_post_replies]<else />$vbphrase[you_may_not_post_replies]</if></div>
<div><if condition="$can['attachment']">$vbphrase[you_may_post_attachments]<else />$vbphrase[you_may_not_post_attachments]</if></div>
<div><if condition="$can['editpost']">$vbphrase[you_may_edit_your_posts]<else />$vbphrase[you_may_not_edit_your_posts]</if></div>
<hr />
</if>
<div><phrase 1="misc.php?$session[sessionurl]do=bbcode" 2="$bbcodeon">$vbphrase[bb_code_is_x]</phrase></div>
<div><phrase 1="misc.php?$session[sessionurl]do=showsmilies" 2="$smilieson">$vbphrase[smilies_are_x]</phrase></div>
<div><phrase 1="misc.php?$session[sessionurl]do=bbcode#imgcode" 2="$imgcodeon">$vbphrase[img_code_is_x]</phrase></div>
<div><phrase 1="$htmlcodeon">$vbphrase[html_code_is_x]</phrase></div>
<hr />
<div><phrase 1="misc.php?$session[sessionurl]do=showrules">$vbphrase[forum_rules_link]</phrase></div>
</div></td>
</tr>
</tbody>
</table>



I assume this: toggle_collapse('forumrules') is the desired part, but how can I define this on entering the page? :erm:

vijayninel
10-23-2009, 05:54 AM
Yes this would be really helpful. :)

testbot
10-23-2009, 12:56 PM
Template: forumrules

change:

<tbody id="collapseobj_forumrules" style="$vbcollapse[collapseobj_forumrules]">


to:

<tbody id="collapseobj_forumrules" style="display: none;">

BENBOBBY
10-27-2009, 10:30 AM
Hi,

Thanks for the reply.

That has indeed hidden it, however the collapse image is incorrect - its displaying the arrow as if it is expanded when it is infact collapsed. Is there any work around for this?

Cheers.

m2006
08-11-2015, 10:14 AM
Hi i need hide collapse_posting_rules on thread on vbulletin4