vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Mini Mods - Minify the "Posting Rules" box (https://vborg.vbsupport.ru/showthread.php?t=158891)

Analogpoint 09-26-2007 10:00 PM

Minify the "Posting Rules" box
 
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/im...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:
Code:

<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:
Code:

<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>


killerkraft 09-27-2007 05:19 PM

Thank's for the simple ideia.

Great job.

KK

Magnumutz 09-27-2007 05:35 PM

Nice one, thanks. Installed.

But i think the right title for this would be "Minimize" or "Resize"...

muratksk 09-27-2007 08:28 PM

thanks you.installed :)

Hornstar 09-28-2007 06:13 AM

Thanks, it works great, and saves a bit of useless white space :)

ps. you have an extra > in your instructions
Code:

td class="thead"<if condition="!$show['codeonly']"> colspan="2"</if>>

Analogpoint 09-28-2007 01:46 PM

Quote:

Originally Posted by hornstar1337 (Post 1348784)
Thanks, it works great, and saves a bit of useless white space :)

Thanks.

Quote:

Originally Posted by hornstar1337 (Post 1348784)
ps. you have an extra > in your instructions

The very last > is actually the end of the <td> tag. I put the conditional inside the tag.

Magnumutz 09-28-2007 07:17 PM

Bah, vBSEO makes it look like the normal thing :P

chkdgate 10-07-2007 07:21 PM

Nice little mod. Thanks.

Wheezy 10-11-2007 05:42 AM

Thanks for sharing! Installed.

Saviour 11-05-2007 03:42 AM

Ya know...it's the simple things in life that makes one happy...

Great Mod...short, but Great! Clicks "Installed".

DDIG 11-09-2007 03:05 PM

Very nice and simple. I clicked 'installed'.

dvbusuario 11-10-2007 02:30 AM

Nice, thanks.

youradhere4222 11-10-2007 03:08 PM

I've already totally removed it. ;)

Mecho 02-07-2009 10:03 PM

i have tried this , but here is the result :

Any idea ?

Dingo14 02-11-2009 08:49 AM

Quote:

Originally Posted by Mecho (Post 1737364)
i have tried this , but here is the result :



Any idea ?

just do the edits don't change the whole template I had the same problem when i just did the edits all was good

Mecho 02-12-2009 06:26 AM

Quote:

Originally Posted by Dingo14 (Post 1740612)
just do the edits don't change the whole template I had the same problem when i just did the edits all was good

thanks mate .

SOLVED.

thompson 02-12-2009 11:15 AM

thanks.

is it possible to let only registered see the box ?

letsjoy 08-02-2011 06:52 PM

Anything similar for vb 4 ?
Thanks


All times are GMT. The time now is 03:28 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01139 seconds
  • Memory Usage 1,757KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (18)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete