vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Forum Home Enhancements - Collapse the "What's Going On?" Block (https://vborg.vbsupport.ru/showthread.php?t=277787)

gezuvor 01-29-2012 11:00 PM

Collapse the "What's Going On?" Block
 
1 Attachment(s)
Hi all,

I was struggling with a way to add the collapse button to my What's Going On? block and found an Article by cellarius that got me on the right track.

That was a good start, but I am a little OCD and did some additional fiddling to make it as vB-compliant as possible. Once I had it done and tested, I figured I would share with the rest of the community with the expectation that somebody else would want to use it to.

There is one edit to FORUMHOME and some new CSS, but that is it.

I performed this modification on a stock 4.1.10 installation, but it should work on any of the 4.1.x versions. If you have a custom theme/skin, some additional work may be required but the concept is the same...

Anyway, here goes!

In FORUMHOME, look for:
Code:

                <h2 class="blockhead">{vb:rawphrase whats_going_on}</h2>
                <div class="blockbody formcontrols floatcontainer">

Replace with:
Code:

                <h2 class="blockhead">
                <span>{vb:rawphrase whats_going_on}</span>
                <vb:if condition="!$show['collapsable_forums']">
                        <a class="collapse" id="collapse_whats_going_on" href="{vb:raw relpath}#top"><img src="{vb:stylevar imgdir_button}/collapse_40b.png" alt="" /></a>
                </vb:if>
                </h2>
                <div id="whats_going_on" class="blockbody formcontrols floatcontainer">


Open additional.css and add this to the bottom (or where it seems to best fit):
Code:

.wgo_block .blockhead a.collapse {
        position: absolute;
        top: {vb:math {vb:math {vb:math {vb:stylevar padding}+{vb:math  {vb:stylevar mid_fontSize}*{vb:stylevar line_height}}-13}/2}+1};
}

.wgo_block .blockhead a.collapse img {
/* values are based on the image */
        position:absolute;
        {vb:stylevar right}: -{vb:math {vb:stylevar padding} * 0.6};
        display:block;
        width:13px;
        height:13px;
        overflow:hidden;
        float: {vb:stylevar right};
        clear: {vb:stylevar left};
}

That's it, you're done!

I hope this is useful and I welcome feedback!

foudu1030 01-30-2012 06:08 PM

Any screenshot ? :)
Thanks

gezuvor 01-30-2012 06:42 PM

It's pretty basic, but I added some screenshots for you!

foudu1030 01-30-2012 07:49 PM

Thanks, Installed !
(Sorry, but I speak not good english)

prandah 01-30-2012 08:50 PM

installed
work with 4.1.10

abdobasha2004 01-31-2012 09:41 AM

nice idea
but little bit complicated to do

billstelling 02-02-2012 06:41 AM

complicated.. that's funny.. This is an easy template mod.

Great job with this one!

BlueCheri 02-02-2012 06:51 AM

Good work, installed.

Working fine.

Thanx

Taurus1 02-02-2012 08:48 AM

Really great work! Works perfect. Thanks.

alasiri 04-29-2012 04:32 AM

great idea thanks ...


All times are GMT. The time now is 05:36 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.01184 seconds
  • Memory Usage 1,735KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete