Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
(Scalemotorcars.com) Make Widget set Size with Scrollbar Details »»
(Scalemotorcars.com) Make Widget set Size with Scrollbar
Version: 1.00, by Scalemotorcars Scalemotorcars is offline
Developer Last Online: Aug 2022 Show Printable Version Email this Page

Category: vBulletin CMS Widgets - Version: 4.1.4 Rating:
Released: 08-19-2011 Last Update: Never Installs: 14
Template Edits
Re-useable Code Code Changes Translations  
No support by the author.

I just released a custom grid that has a place for 4 columns in the middle of the page.

You can see that mod here.....

Live Demo..........

Well as most of you know, widgets don't come in a set size and it left all kinds of empty space on my homepage. NOT GOOD....

All I did was adapted a little CSS and a few quick template edits. You will need to adjust your code to fit your site. Just take note of the XXX and replace it with your size. You can also add width if you like.

Lets start....

You have 2 choices. One, add the below code to the end of additional.css OR to the bottom of widget.css. Its up to you.

Code:
.widget_content_custom {
	color: {vb:stylevar sidebar_content_color};
	-moz-border-radius:{vb:stylevar border_radius};
	-webkit-border-radius: {vb:stylevar border_radius};
	border-radius: {vb:stylevar border_radius};
	background:{vb:stylevar sidebar_content_background};
	border:{vb:stylevar sidebar_content_border};
	_background-image: none;
	padding:{vb:stylevar vbcms_widget_content_padding};
	height:xxxpx;
	overflow:auto;
        overflow-x:hidden;
        position:relative;
}
If you want to add a width, Find this line in the code above.

Code:
height:xxxpx;
Add right below it. (Again, add your actual size where you see XXX)

Code:
width:xxxpx;
Please take special note of these 2 lines below.

Code:
        overflow-x:hidden;
        position:relative;
(Overflow-x:hidden) actually hides the horizontal scrollbar in browsers that support it. If you want the horizontal scrollbar to show then remove that line. If you want to hide the vertical scrollbar then replace it with overflow-y:hidden. Just note that you will not be able to scroll in the direction of the hidden bar.

Now for (position:relitive), leave this in the code or you'll have issues with your avatars popping over the edge of the widget.

Last part of this mod.

In the widget templates you want to adjust, find this line of code. NOTE: Not all widgets use it so your kind of stuck with the ones that do. At least until someone figures a way around it.

Find this line in the template.
Code:
cms_widget_content widget_content
Replace with this line.
Code:
cms_widget_content widget_content_custom
That's it. Just repeat the last edit with each widget you want to adjust....

FYI. This is not supported so please feel free to hack away and add or change the code accordingly to your needs. Enjoy

If you use it please click install. Thanks....

Screenshots

File Type: jpg widget-resize.jpg (98.5 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
4 благодарности(ей) от:
eTiKeT?, fariborz khan, LOGECT, mitch84

Comments
  #2  
Old 08-20-2011, 06:55 PM
Scalemotorcars's Avatar
Scalemotorcars Scalemotorcars is offline
 
Join Date: Mar 2006
Location: NC
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No real reason to reserve this but hey everyone else does it so why not...
Reply With Quote
  #3  
Old 08-21-2011, 07:59 AM
mitch84 mitch84 is offline
 
Join Date: Mar 2008
Location: france
Posts: 516
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you, work fine
Reply With Quote
  #4  
Old 08-21-2011, 01:52 PM
doctorsexy's Avatar
doctorsexy doctorsexy is offline
 
Join Date: Mar 2011
Location: earth
Posts: 383
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fab.. thanks
Reply With Quote
  #5  
Old 08-21-2011, 03:26 PM
K4GAP K4GAP is offline
 
Join Date: Mar 2008
Posts: 1,255
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is that your site (the demo site) ?

I've tried twice to register and both times it said I was a spammer. I promise I'm not
Reply With Quote
  #6  
Old 08-22-2011, 12:45 AM
Scalemotorcars's Avatar
Scalemotorcars Scalemotorcars is offline
 
Join Date: Mar 2006
Location: NC
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GaryT View Post
Is that your site (the demo site) ?

I've tried twice to register and both times it said I was a spammer. I promise I'm not
Yes thats mine.

Try another user ID. I use StopForumSpam so you may want to look into why its kicking you out.
Reply With Quote
  #7  
Old 09-25-2012, 11:18 AM
akademikper akademikper is offline
 
Join Date: Aug 2011
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello, i want to show scroll bar, deleted "overflow-x:hidden;" line but still it isn't showing on safari and chrome.
Reply With Quote
  #8  
Old 03-12-2013, 03:02 PM
Toorak Times's Avatar
Toorak Times Toorak Times is offline
 
Join Date: Jan 2011
Posts: 436
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've got your grid working on 4.2pl3, thanks, very excited, will this widget work there too ?
Reply With Quote
Reply


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 01:38 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07206 seconds
  • Memory Usage 2,294KB
  • Queries Executed 22 (?)
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
  • (6)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
  • (8)post_thanks_box
  • (4)post_thanks_box_bit
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (1)postbit_attachment
  • (8)postbit_onlinestatus
  • (8)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete