vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Adding image to CMS layout? (https://vborg.vbsupport.ru/showthread.php?t=270065)

Eltu 09-11-2011 08:06 AM

Adding image to CMS layout?
 
I run a forum using vB 4 with CMS, and would like to add an informational banner at the top of the main page, in the form of a png image. As in, a part of the CMS layout and below the normal banner.

I've managed to make the CMS layout work for this (see the dark yellow space above, where I can add a widget):

https://vborg.vbsupport.ru/external/2011/09/53.jpg

But so far, I haven't found a way to actually add a static image to a layout slot instead of a widget. Is this possible?

Eltu

setishock 09-11-2011 09:37 AM

The layout is just for the widgets. Where they get parked on the page.
Pop this in your additional.css and adjust as needed.
Code:

/* Seti added: Background color and image */
.vbcms_content {
        margin:0.5em 0 1em;
        width: 100%;
        float: {vb:stylevar left};
background: #000033;
background-image: url(path/to/your/image);
background-repeat:no-repeat;
background-position:center top;
}

This may not work as it sits but it'll give you a starting point.

Eltu 09-11-2011 09:46 AM

I got the image added and working (thanks! :)) - however, the middle section of the CMS needs to be moved down for it not to overlap - how can I accomplish this?

EDIT: I managed to move the section down - however, I got one last problem - I want the image to be aligned left according to the middle section of my CMS grid - right now, if I align it left it aligns with the very edge of the page, making it overlap with the left widgets. How can I solve this?

Dead Eddie 09-11-2011 10:54 AM

Why not just use a static HTML widget. This is kind of what they're there for...

Eltu 09-11-2011 11:24 AM

1 Attachment(s)
Thanks for the suggestion - I almost solved it now, by making a custom HTML widget containing a simple <img> tag. The only remaining problem I have, is that I wish to move the entire middle section of the CMS page higher up. Right now it's lower down than the widgets on the side, with a lot of empty space above.

I can move it higher up by editing the vbcms_header_margin stylevar, but then my new image widget doesn't get moved, causing everything to overlap. Attaching images describing the issue. The "Next meeting" text is the image I added with the widget, and as you can see there's a lot of blank space above it - I'd like to move the entire middle section up.


All times are GMT. The time now is 03:13 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.01041 seconds
  • Memory Usage 1,718KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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