Header tweaking problem....

Started by drumandstage2, September 12, 2009, 08:47:23 AM

Previous topic - Next topic

drumandstage2

I have three things I'd like to do to my header, and I have serched this site, and can't find any thing that will help that uses the same text I have in my code.

I am using 2.0 RC 1.2, and here are the things I want to happen:

*Center my logo
*Remove the Title from the logo area without taking it out of the amin area
*use a black background to make the logo appear to fill the area

Again, I have searhed for these items independantly, and have not found a solution.

My site is: www.drumandstage.net/forums

I would appreciate any help.

Mark S

#1
To center your logo:

Themes/default/index.template.php

Find:

function template_body_above()


Below this is where your logo info is located.  I've modified mine a bit but the code should be similar for you, if you are using the default theme.

I use 3 static images in my Logo area, so here's my whole section of code:

function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt;

echo '
<div id="mainframe">
<div class="tborder">';
if (empty($modSettings['remove_smfheader_mod']))
{
echo '
<div class="catbg">
<h1>';

if (empty($settings['header_logo_url']))
echo $context['forum_name_html_safe'];
else
echo '<div align="center">
<img src="' . $settings['images_url'] . '/HmPgLogo.jpg" alt="" valign="top" align="center" /> ', '<img src="' . $settings['images_url'] . '/CWVRVHmPgBanner.jpg" alt="" valign="top" align="center" /> ', '<img src="' . $settings['images_url'] . '/VRVhmPgLogo.jpg" alt="" valign="top" align="center" /> </div>';

echo '                           

</h1>
</div>';
}


Look where this is at:

'<div align="center">


That's where you want it and it will center whatever you put in your logo area.  (This topic, BTW, is covered in other posts on this forum.)

The background behind your logo is an image (catbg.jpg) and that is found in themes/default/style.css.  However, if you change this, it will also change numerous other title background areas.  Specifically:

/* This is used for categories, page indexes, and several other areas in the forum.
.catbg and .catbg2 is for boardindex, while .catbg3 is for messageindex and display headers. */
.catbg , tr.catbg td , .catbg3 , tr.catbg3 td


This applies to Hack's Park Shoutbox and Simple Portal blocks as well, unless you re-define their title sections.

If you want to see the affects of changing this:

Find:
/* This is used for categories, page indexes, and several other areas in the forum.
.catbg and .catbg2 is for boardindex, while .catbg3 is for messageindex and display headers. */
.catbg , tr.catbg td , .catbg3 , tr.catbg3 td
{


After that, you will see this or something similar (again, I've modified my theme a lot so it may not be an exact match).

background: url(images/catbg.jpg) #FFEBCD repeat-x;
color: #FBFFDB;
padding-left: 10px;
padding-right: 10px;


Remove the url(images/catbg.jpg) and change #FFEBCD (or whatever color code is there) to #000000

In order to make only the logo background area black, you have to separate the logo area from these other category titles,  and re-difine the name of the logo area.  This will complicate a lot of things as anything that references the logo area will no longer work (like the load routine) and you'll have tons of errors and all kinds of foul-ups.

However, if you use white text or another color which contrasts well against the black title areas, the method I just gave you will work.  I tested it on my forum.  In order to make all the title areas uniform, you will also have to do the same code change for all the code which contains the catbg.jpg image, defined in that code section description.

I clicked on the link to your forum and nothing happened, so I can't project what this would look like if you did it.  However, it does create a striking affect which can be greatly complimented depending on your other forum colors.

As for taking the title out of everything except the admin area, that's another issue altogether but is similar to the scenario I just described regarding making only the logo area background black  because these title areas are used throughout the default theme rather than set up as individual title bars.  It can be done, but it's beyond my coding capability.



H

drumandstage2, do you require any further assistance?
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

Advertisement: