View Single Post
  #31  
Old 07-29-2011, 04:26 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Sage Knight View Post
I have seen you around and I must say you're truly the Superman of vB. This article will go a long way in helping me understand vB's theme & template system.

I have a question, how can I remove the header content (use the background as a replacement) as if the header content was crystal clear and you can whatever image you have in the background.

I hope I made some sense.
Actually that's not as hard as some think and I've done it in a few styles, then using the background image made the style using it... for example here's a style where I did something similar - http://www.8bitfix.com/content/ now see how I've relocated the toplinks(login/welcome username) to the navbar and adjusted?

From another thread I helped in:

Quote:
Create a new plugin:

AdminCP > Plugins & Products > Add new plugin

Product = vBulletin
Hook Location = process_templates_complete
Title = Login relocated to Navbar
Execution order = 5
Plugin PHP Code:
PHP Code:
vB_Template::preRegister('navbar', array('notification_menubits' => $notification_menubits)); 
Plugin is active = Yes

Now view your site, it should be there however this was a "Basic How 2 Guide" now you'll notice right off the bat it's to the right a bit too much and depending on your screen resolution and/or max width on your site it could flow under the search so you must adjust CSS and more to make it look right for your site and Lynne supplied one of you plus it's posted above some tricks to adjust the toplinks css .

Now you can take all the code within the <div id="toplinks"> <div> and paste into the navbar then move around accordingly, review your header template and it should be something very short now i.e.

Code:
<div class="above_body"> <!-- closing tag is in template navbar -->
<div id="header" class="floatcontainer doc_header">
	<vb:if condition="$stylevar['titleimage']"><div><a name="top" href="{vb:link forumhome}" class="logo-image"><img src="{vb:stylevar titleimage}" alt="{vb:raw vboptions.bbtitle}" /></a></div><vb:else /><div>&nbsp;</div></vb:if>

	<div class="ad_global_header">
		{vb:raw ad_location.global_header1}
		{vb:raw ad_location.global_header2}
	</div>
	<hr />
</div>
^ So as you can see once done your header template will be very "short" . You've now relocated the toplinks to the navbar and either need to adjust them OR you can still do other little things and achieve the same effect namely tellinlg the toplinks css to be so far from the top i.e. change top:0; to top:200px; or something along those lines and not to mention you can use the plugin and leave the login in the header using a conditional then showcase the userinfo when they are logged in somewhere else as well but both must use the appropriate conditionals.

Now for the background use the stylevars and tell it what images to use or simply overwrite it using additional.css *(You still may want to set some of the header stylevars to transparent so basically if it has in #41f3b7 as the color backspace that and type in transparent (only the word no # or anything else) and save over that stylevar.

Paste into additional.css and adjust to suit:

Code:
body {
        background-color: #ffffff;
	background-image: url(images/myimagename.png);
	background-repeat: no-repeat;
	background-position: top;
}
The true body css info is in vbulletin.css however upon upgrading you would overwrite it so best bet is to add your own definition to additional.css.

Original body css from vbulletin.css:

Code:
/* BASIC PAGE ELEMENTS */

body {
	width:{vb:stylevar doc_width};
	min-width:{vb:stylevar doc_minWidth};
	max-width:{vb:stylevar doc_maxWidth};
	margin: {vb:stylevar doc_margin};
	font-size:{vb:stylevar font.fontSize}px;
	color:{vb:stylevar body_color};
	line-height:{vb:stylevar line_height};
}
And there you have it in so many ways and words (lol) so make a *child style of your main style and then test this so your not disturbing your members with style glitches as you tinker along .
Reply With Quote
Благодарность от:
Sage Knight
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01153 seconds
  • Memory Usage 1,798KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_box_bit
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete