vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   How to add ad banner to header? (https://vborg.vbsupport.ru/showthread.php?t=189725)

RedTrinity 09-01-2008 12:07 PM

How to add ad banner to header?
 
Hi guys,

I am just after some advice/support on how to add ad banner code to the header of the new forum template I am currently setting up?

The code I want to add for the rotating banner is the following...

Code:

<if condition="!is_member_of($bbuserinfo, 109)">
                $GLOBALS[bannerads]
</if>


The template is here: http://www.theparentingsanctuary.com...ms/?styleid=30

I simply want to have it centered in the middle of the header, between the logo on the left and the member info/login on the right. Have tried doing it myself numerous times tonight but to no avail, seems to be conflicting with the logo image a lot.

Thanks in advance for the help :)

--------------- Added [DATE]1220314902[/DATE] at [TIME]1220314902[/TIME] ---------------

Wow, no help with this one?

mikesz 09-02-2008 10:55 PM

Probably need to add some CSS code to be able to place the banner on the header.

For example if you were putting a text line in the header you might use something like :

Two different ways to place text on that skin header:

.mytext {
position: absolute; top: 46px; right: 140px;
height: 37px;
padding-right: 25px;
color: #FF0000;
font-size: 16px;
font-weight: bold;
}

.mytext {
position: relative;
top: -70px; left: 330px;
color: #0000FF;
font-size: 16px;
font-weight: bold;
}

In the header template:

Add:

<div class="mytext"> This is the text I want to display in the header!</div>

You should be able to easily adapt something like this for your banner display.

HTH,

mikesz

RedTrinity 09-03-2008 08:38 AM

Hi Mikesz,

Thanks so much for your help :)

I just tried your 2 suggested code variations and unfortunately I am having the same issue I have been experiencing with my own attempted ones previously - and that is apparent conflict with the logo:

https://vborg.vbsupport.ru/external/2008/09/76.jpg

From there, using one of your 2 suggestions or my own, I can get the ad banner centered on the same line/level it appears above in the screenshot. But just can't seem to get it to appear further up, so its exactly between the logo and member login info :confused:

Any further suggestions or help would really be appreciated!

Cheers,

Nikki.

RedTrinity 09-07-2008 05:24 AM

No-one can help? :(

Attitude5ire 09-07-2008 08:36 AM

You dont really need use positioning in ur DIV structure.
I would prolly edit your header template seems a bit clattered.
just divide into 3 divs one for logo one for ads one for Login.
float the login to right, logo to left and your Ad will remain in center.
Another way could be table 3 cells.

iadventure 03-06-2010 10:25 PM

what would the code look like to accomplish this?

princeedward 03-07-2010 05:40 AM

go acp > additional.css template and add this:
Code:

.ad_global_header {
float:right;
position:absolute;
top:40px;
right:40px;

}



Now place the Ads HTML code in the ad_global_header2 template :

Admin CP -> Styles & Templates -> Style Manager -> Edit Templates -> Ad Location Templates -> ad_global_header2

Note:
Try to adjust the (red) for right and top values as needed for the placement.

hope it help you all...

best regards

:p:up:

danyol1706 11-14-2010 11:40 PM

1 Attachment(s)
Quote:

Originally Posted by princeedward (Post 1998892)
go acp > additional.css template and add this:
Code:

.ad_global_header {
float:right;
position:absolute;
top:40px;
right:40px;

}



Now place the Ads HTML code in the ad_global_header2 template :

Admin CP -> Styles & Templates -> Style Manager -> Edit Templates -> Ad Location Templates -> ad_global_header2

Note:
Try to adjust the (red) for right and top values as needed for the placement.

hope it help you all...

best regards

:p:up:

I added above code to additional.css in vB 4.0.8, but it just ignores the code completely and I still cannot get the banner to load right under the login info. I used the "Advertising>Add New Add>Global>Header 2" slot for a test 480x60 banner ad (see attached image).

As seen in the image, my banner is stuck in the middle of the header, along the top.

osras1 07-18-2014 07:47 PM

I am looking to have my logo on the left with 2 vertical rotating banners on the right side(instead of horizontal) example http://www.reef2reef.com is there a special code ?

ozzy47 07-18-2014 10:32 PM

Quote:

Originally Posted by osras1 (Post 2507363)
I am looking to have my logo on the left with 2 vertical rotating banners on the right side(instead of horizontal) example http://www.reef2reef.com is there a special code ?

This thread is over six years old.

Please start your own thread with all relevant information.


All times are GMT. The time now is 10:23 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.02266 seconds
  • Memory Usage 1,736KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete