Analogpoint
09-26-2007, 10:00 PM
This is a dead-simple template hack to make the "Posting rules" or forum rules box take less vertical space. A picture is worth more than 2-3k of my words:
Before & After:
http://www.analogpoint.com/static/images/posting-rules-screenshot.png
To do this, you only have to change 2 lines in the forumrules template. The instructions are below, and also in the attached *.txt file.
Time to install: 18-33 seconds :)
Change the default template:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="180">
<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><phrase 1="$rules[postnew]">$vbphrase[you_may_x_post_new_threads]</phrase></div>
<div><phrase 1="$rules[postreply]">$vbphrase[you_may_x_post_replies]</phrase></div>
<div><phrase 1="$rules[attachment]">$vbphrase[you_may_x_post_attachments]</phrase></div>
<div><phrase 1="$rules[edit]">$vbphrase[you_may_x_edit_your_posts]</phrase></div>
<hr />
</if>
<div><phrase 1="misc.php?$session[sessionurl]do=bbcode" 2="$bbcodeon">$vbphrase[vb_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>
</div></td>
</tr>
</tbody>
</table>
To this:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="180">
<thead>
<tr>
<td class="thead"<if condition="!$show['codeonly']"> colspan="2"</if>>
<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><phrase 1="$rules[postnew]">$vbphrase[you_may_x_post_new_threads]</phrase></div>
<div><phrase 1="$rules[postreply]">$vbphrase[you_may_x_post_replies]</phrase></div>
<div><phrase 1="$rules[attachment]">$vbphrase[you_may_x_post_attachments]</phrase></div>
<div><phrase 1="$rules[edit]">$vbphrase[you_may_x_edit_your_posts]</phrase></div>
</div></td><td class="alt1" nowrap="nowrap"><div class="smallfont">
</if>
<div><phrase 1="misc.php?$session[sessionurl]do=bbcode" 2="$bbcodeon">$vbphrase[vb_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>
</div></td>
</tr>
</tbody>
</table>
Before & After:
http://www.analogpoint.com/static/images/posting-rules-screenshot.png
To do this, you only have to change 2 lines in the forumrules template. The instructions are below, and also in the attached *.txt file.
Time to install: 18-33 seconds :)
Change the default template:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="180">
<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><phrase 1="$rules[postnew]">$vbphrase[you_may_x_post_new_threads]</phrase></div>
<div><phrase 1="$rules[postreply]">$vbphrase[you_may_x_post_replies]</phrase></div>
<div><phrase 1="$rules[attachment]">$vbphrase[you_may_x_post_attachments]</phrase></div>
<div><phrase 1="$rules[edit]">$vbphrase[you_may_x_edit_your_posts]</phrase></div>
<hr />
</if>
<div><phrase 1="misc.php?$session[sessionurl]do=bbcode" 2="$bbcodeon">$vbphrase[vb_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>
</div></td>
</tr>
</tbody>
</table>
To this:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="180">
<thead>
<tr>
<td class="thead"<if condition="!$show['codeonly']"> colspan="2"</if>>
<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><phrase 1="$rules[postnew]">$vbphrase[you_may_x_post_new_threads]</phrase></div>
<div><phrase 1="$rules[postreply]">$vbphrase[you_may_x_post_replies]</phrase></div>
<div><phrase 1="$rules[attachment]">$vbphrase[you_may_x_post_attachments]</phrase></div>
<div><phrase 1="$rules[edit]">$vbphrase[you_may_x_edit_your_posts]</phrase></div>
</div></td><td class="alt1" nowrap="nowrap"><div class="smallfont">
</if>
<div><phrase 1="misc.php?$session[sessionurl]do=bbcode" 2="$bbcodeon">$vbphrase[vb_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>
</div></td>
</tr>
</tbody>
</table>