Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications

Reply
 
Thread Tools
Collapse the "What's Going On?" Block Details »»
Collapse the "What's Going On?" Block
Version: 1.00, by gezuvor gezuvor is offline
Developer Last Online: Jul 2020 Show Printable Version Email this Page

Category: Forum Home Enhancements - Version: 4.1.x Rating:
Released: 01-29-2012 Last Update: Never Installs: 25
Template Edits
Re-useable Code Translations  
No support by the author.

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!

Screenshots

File Type: jpg mod_wgo_open.jpg (47.9 KB, 0 views)
File Type: jpg mod_wgo_closed.jpg (13.1 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
NoMatt3r

Comments
  #12  
Old 06-04-2012, 07:23 AM
Calystos's Avatar
Calystos Calystos is offline
 
Join Date: Apr 2009
Location: Terra
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If anyone uses the Nexia's Forum Sidebar Everywhere product make sure to also edit the FORUMHOME_NEX_SIDEBAR template too! Else it'll be ignored and the WGO box will use the non-collapsible format.

Confirmed to work on vB v4.2.0, working great, thanks!
Reply With Quote
  #13  
Old 06-04-2012, 11:04 AM
faisaly.com faisaly.com is offline
 
Join Date: Mar 2007
Posts: 226
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works perfect vb4.1.11 thanks for the template edit...
Reply With Quote
  #14  
Old 08-26-2012, 07:36 PM
NTT NTT is offline
 
Join Date: May 2007
Location: Viet Nam
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works perfect vb4.2.0 PL2
Reply With Quote
  #15  
Old 02-19-2013, 10:25 PM
Naijasite's Avatar
Naijasite Naijasite is offline
 
Join Date: Mar 2012
Posts: 281
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how do i make it to collapsed by default during page load. i noticed i have to click on the collapse button before it will collapsed.
Reply With Quote
  #16  
Old 02-25-2013, 05:40 PM
Dorgham's Avatar
Dorgham Dorgham is offline
 
Join Date: May 2012
Location: Egypt
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good job
Reply With Quote
  #17  
Old 04-04-2013, 10:32 PM
Naijasite's Avatar
Naijasite Naijasite is offline
 
Join Date: Mar 2012
Posts: 281
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how do i make it collapse on page load for every user by default?
Reply With Quote
  #18  
Old 04-22-2013, 03:56 AM
VonDoom's Avatar
VonDoom VonDoom is offline
 
Join Date: Dec 2008
Location: USA
Posts: 494
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Naijafinder View Post
how do i make it collapse on page load for every user by default?
+1 for this request.. Im using sidebar blocks to replace most of WGO but i didnt want to remove it permanently so loading it collapsed would be a plus under such circumstances..
Reply With Quote
  #19  
Old 07-31-2013, 08:38 PM
stevieb stevieb is offline
 
Join Date: Apr 2005
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I found the button to collapse too high, so I literally added the following in the additionalcss which aligns it perfect in the middle of the block:

Code:
top:-5px;

Full code (additionalcss)

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;
        top:-5px;
	float: {vb:stylevar right};
	clear: {vb:stylevar left};
}
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:26 PM.


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.04423 seconds
  • Memory Usage 2,311KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (9)post_thanks_box
  • (1)post_thanks_box_bit
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (2)postbit_attachment
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete