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)
-   -   vBulletin CMS Widgets - (Scalemotorcars.com) Make Widget set Size with Scrollbar (https://vborg.vbsupport.ru/showthread.php?t=268827)

Scalemotorcars 08-19-2011 10:00 PM

(Scalemotorcars.com) Make Widget set Size with Scrollbar
 
1 Attachment(s)
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. :D

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.... :D

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.... :D

Scalemotorcars 08-20-2011 06:55 PM

No real reason to reserve this but hey everyone else does it so why not...

mitch84 08-21-2011 07:59 AM

thank you, work fine

doctorsexy 08-21-2011 01:52 PM

Fab.. thanks

K4GAP 08-21-2011 03:26 PM

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

Scalemotorcars 08-22-2011 12:45 AM

Quote:

Originally Posted by GaryT (Post 2236190)
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. :D

akademikper 09-25-2012 11:18 AM

Hello, i want to show scroll bar, deleted "overflow-x:hidden;" line but still it isn't showing on safari and chrome.

Toorak Times 03-12-2013 03:02 PM

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


All times are GMT. The time now is 02:10 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.01124 seconds
  • Memory Usage 1,732KB
  • 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
  • (6)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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