Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Align Logo with Header Advert 2 (No Drop) Details »
Align Logo with Header Advert 2 (No Drop)
Mod Version: 1.00, by syrus.xl (Contributor) syrus.xl is offline
Developer Last Online: Apr 2016 I like it Show Printable Version Email this Page

vB Version: 4.0.0 Rating: (6 votes - 4.67 average) Installs: 49
Released: 06 Jan 2010 Last Update: 06 Jan 2010 Downloads: 244
Not Supported Template Edits Code Changes  

I originally coded this for my vBulletin 4.0, but so many people have been asking on vBulletin.com how to do this - so I thought I would release it on here, as well.

What it does:

By default if you add any advertisement to the header, you will find that your header logo is 'pushed' upwards. Many people prefer that logo is aligned with the advert and not placed above. ** See attached screenshot **

DEMO:
http://www.digitalport.co.uk
I have coded this little modification so that if you place an advert in ad area 2 of the header it will appear next to your logo, and will not affect your logo's position whatsoever. It is coded to accept a standard banner size of 468x60 in the header ad 2 section. You can adjust this to suit other banner sizes as required.

In the #logo_main adjust the width and height values to suit your own logo. The margin-top value adjusts the distance between the top of your logo and the top of the toplinks. margin-left I have set to 20px, but you can adjust this to suit where you want the logo to be from the left side.

The best way is to adjust the values gradually if you are not sure about CSS coding.

Installation:

In the vbulletin.css template find:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Add after:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


In the header template find and remove:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


In the header template find and remove:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Replace with this code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Important:

One additional StyleVar you will need to change is the doc_minWidth to around 800px or more depending on your layout width. This will stop the advert div from dropping below your logo in the header, if someone is using a low resolution to view your website.

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	Capture6.JPG
Views:	3691
Size:	73.5 KB
ID:	109285  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #61  
Old 23 Dec 2010, 18:36
mccollin mccollin is offline
 
Join Date: Jul 2003
Real name: Mike
Does anyone know how to get the header ad not to wrap when someone compresses the page width in their browser. I noticed that digitalport.co.uk has a fixed width for every page. I'd rather have a minimum width the page compresses to so that it can be expanded wider, but not go narrower than the width of the header image plus the header ad size.
__________________
Mikey
PDAPhoneHome ... Get Converged! / NortheastFoto ... Get Imaged!
Reply With Quote
  #62  
Old 23 Dec 2010, 18:46
syrus.xl's Avatar
syrus.xl syrus.xl is offline
 
Join Date: Jun 2005
Originally Posted by mccollin View Post
Does anyone know how to get the header ad not to wrap when someone compresses the page width in their browser. I noticed that digitalport.co.uk has a fixed width for every page. I'd rather have a minimum width the page compresses to so that it can be expanded wider, but not go narrower than the width of the header image plus the header ad size.
Simply, set minWidth to what you require. Once the browser width is reduced to this setting it will stop from being fluid and stay at a fixed width.

If you're not using vB4 then you will need to add the definition to your main body styling like this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

HTH.

Last edited by syrus.xl; 23 Dec 2010 at 18:52.
Reply With Quote
  #63  
Old 23 Dec 2010, 19:26
mccollin mccollin is offline
 
Join Date: Jul 2003
Real name: Mike
Perfect, thanks... its the doc_minWidth stylevar.
__________________
Mikey
PDAPhoneHome ... Get Converged! / NortheastFoto ... Get Imaged!
Reply With Quote
  #64  
Old 29 Dec 2010, 10:52
Ocean-Wonders Ocean-Wonders is offline
 
Join Date: Jan 2009
Works great im just having one small issue.

It's moving the welcome bar (Notifications, Profile,Settings,Log out) below the banner.

Can anyone help me out ?
Reply With Quote
  #65  
Old 30 Dec 2010, 16:53
ALBCODERS ALBCODERS is offline
 
Join Date: Apr 2009
Nice ! Thankyou.
Reply With Quote
  #66  
Old 30 Dec 2010, 23:49
oddmud's Avatar
oddmud oddmud is offline
 
Join Date: Oct 2009
Can't find any of the code you've listed here in vB 4.1

Any updates?
__________________
Like Fly Fishing?
www.flyfishbc.com
Reply With Quote
  #67  
Old 31 Dec 2010, 11:03
ALBCODERS ALBCODERS is offline
 
Join Date: Apr 2009
Originally Posted by oddmud View Post
Can't find any of the code you've listed here in vB 4.1

Any updates?
I just tested it on (vBulletin 4.1.0 Beta 1) and works well.

you need to delete this code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and replace with the new code


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

So do not forget to add css codes into vbulletin.css and delete
{vb:raw ad_location.global_header2}
from header template so everything work well as syrus.xl posted.
Reply With Quote
  #68  
Old 06 Jan 2011, 18:00
oddmud's Avatar
oddmud oddmud is offline
 
Join Date: Oct 2009
I'm still getting huge space added around my header logo... any ideas?

http://www.goaliecrease.net/
__________________
Like Fly Fishing?
www.flyfishbc.com

Last edited by oddmud; 06 Jan 2011 at 18:07.
Reply With Quote
  #69  
Old 08 Jan 2011, 22:52
oddmud's Avatar
oddmud oddmud is offline
 
Join Date: Oct 2009
Anyone?!?!
__________________
Like Fly Fishing?
www.flyfishbc.com
Reply With Quote
  #70  
Old 09 Apr 2011, 10:47
katim110 katim110 is offline
 
Join Date: Nov 2010
any updates pleaseee for vb 4.1.3
Reply With Quote
  #71  
Old 22 May 2011, 11:29
BlueCheri's Avatar
BlueCheri BlueCheri is offline
 
Join Date: Jul 2009
I was looking for it, great work.
Reply With Quote
  #72  
Old 22 Aug 2011, 06:36
Alecsmith's Avatar
Alecsmith Alecsmith is offline
 
Join Date: Sep 2009
Real name: Nick
can anyone pls update this for Vb 4.1.5
__________________

Reply With Quote
  #73  
Old 22 Aug 2011, 12:43
syrus.xl's Avatar
syrus.xl syrus.xl is offline
 
Join Date: Jun 2005
Originally Posted by Alecsmith View Post
can anyone pls update this for Vb 4.1.5
All you need to do is set a define for position for the banner ad div. This will ensure it aligns correctly regardless of what updates vBulletin make in the future.

In theory, the position css should also be set for the logo, but it isn't actually required to make it work.
Reply With Quote
  #74  
Old 15 Jan 2012, 09:12
FreakyG'sMom FreakyG'sMom is offline
 
Join Date: Apr 2010
Originally Posted by syrus.xl View Post
All you need to do is set a define for position for the banner ad div. This will ensure it aligns correctly regardless of what updates vBulletin make in the future.

In theory, the position css should also be set for the logo, but it isn't actually required to make it work.
Nope. Doesn't work. Didn't work in 4.1.9. And doesn't work in 4.1.10.
Reply With Quote
  #75  
Old 06 Mar 2013, 00:40
bing11 bing11 is offline
 
Join Date: Feb 2003
thanks
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 17:47.

Layout Options | Width: Wide Color: