Title: Navigation Header Enhancement v1.0

Author: Scan a.k.a Chris

Description:
This modification enhances the options for your header navigation menu (eg. Search, FAQ, Member List, etc...).
This modification will allow you to use another color or image for the background  in your header navigation menu.

Q.) Why not just allow the normal header color to use images?
A.) You dont want to replace the normal header color with this because it gets used in other places (eg. quote box, code box, etc...).

Copyright:  2006 Scan a.k.a Chris. All rights reserved.

Compatability: XMB 1.9.8 SP3/SP4

Updated for 1.9.8 by: WormHole @ XMB Garage

Install Note: Before adding this modification to your forum you should back up all files related to this modification.

License Note: This modification is released under the GPL License. A copy is provided with this software package.

Author Note:
You downloaded this modification from XMBGarage.com, the #1 source for XMB related downloads.
Please visit http://www.xmbgarage.com/ for support.

=======================================================================================================================================
=======
Step 1:
=======
==============================
Go To Admin Panel --> Insert Raw SQL
==============================

Upload provided file named "SQL.txt" & click "Submit Changes" button.

=======================================================================================================================================
=======
Step 2:
=======
=======================
Edit File: lang/English.lang.php
=======================
==========
Find Code:
==========

$lang['textmyhome'] = "My Home";

===============
Add Code Below:
===============

// Navigation Header Enhancement Mod Begin
$lang['textnavheader'] = "Navigation Header Color (Enter a hex code or an image name):";
// Navigation Header Enhancement Mod End

=======================================================================================================================================
=======
Step 3:
=======

===============
Edit File: cp2.php
===============
==========
Find Code:
==========

        $themestuff = $db->fetch_array($query);

===============
Add Code Below:
===============

        if (false === strpos($themestuff['headerbg'], '.')) {
            $headercode = 'style="background-color: '.$themestuff['headerbg'].'"';
        } else {
            $headercode = 'style="background-image: url(./'.$themestuff['imgdir'].'/'.$themestuff['headerbg'].')"';
        }

==========
Find Code:
==========

        <tr bgcolor="<?php echo $altbg2?>" class="tablerow">
        <td><?php echo $lang['textheadertext']?></td>
        <td><input type="text" name="headertextnew" value="<?php echo $themestuff['headertext']?>" /></td>
        <td bgcolor="<?php echo $themestuff['headertext']?>">&nbsp;</td>
        </tr>

===============
Add Code Below:
===============

        <tr bgcolor="<?php echo $THEME['altbg2']?>" class="tablerow">
        <td><?php echo $lang['textnavheader']?></td>
        <td><input type="text" name="headerbgnew" value="<?php echo $themestuff['headerbg']?>" /></td>
        <td <?php echo $headercode?>>&nbsp;</td>
        </tr>

==========
Find Code:
==========

        <tr bgcolor="<?php echo $altbg2?>" class="tablerow">
        <td><?php echo $lang['textheadertext']?></td>
        <td><input type="text" name="headertextnew" /></td>
        </tr>

===============
Add Code Below:
===============

        <tr bgcolor="<?php echo $THEME['altbg2']?>" class="tablerow">
        <td><?php echo $lang['textnavheader']?></td>
        <td><input type="text" name="headerbgnew" value="" /></td>
        </tr>

=================
Find Code (2 Times):
=================

        $headertextnew = postedVar('headertextnew');

======================
Add Code Below (2 Times):
======================

        $headerbgnew = postedVar('headerbgnew');

==========
Find Code:
==========

        $db->query("UPDATE ".X_PREFIX."themes SET name='$namenew',

==================================
Find Code In-Line Of Above Query Statement
==================================

headertext='$headertextnew',

================
Replace Code With:
================

headertext='$headertextnew', headerbg='$headerbgnew',

==========
Find Code:
==========

$db->query("INSERT INTO ".X_PREFIX."themes (name,

==================================
Find Code In-Line Of Above Query Statement
==================================

headertext,

================
Replace Code With:
================

headertext, headerbg,

===============================================
Find Code In-Line Of Above Query Statement After ) VALUES(
===============================================

'$headertextnew',

================
Replace Code With:
================

'$headertextnew', '$headerbgnew',

=======================================================================================================================================
=======
Step 4:
=======
=================
Edit File: header.php
=================
==========
Find Code:
==========

// Alters certain visibility-variables
if (false === strpos($bgcolor, '.')) {
    $bgcode = "background-color: $bgcolor;";
} else {
    $bgcode = "background-image: url('$imgdir/$bgcolor');";
}

===============
Add Code Below:
===============

if (false === strpos($headerbg, '.')) {
    $headercss = "background-color: $headerbg;";
} else {
    $headercss = "background-image: url('$THEME[imgdir]/$headerbg');";
}

=======================================================================================================================================
=======
Step 5:
=======
==========================
Go To Admin Panel --> Templates
==========================
===============
Edit Template: css
===============
==========
Find Code:
==========

.navtd {
    background-color: $header;
    color: $headertext;
    font-family: $font;
    font-size: 11px;
    table-layout: fixed;
    text-decoration: none;
}

.navtd2 {
    background-color: $header;
    color: $headertext;
    font-family: $font;
    font-size: 9px;
    table-layout: fixed;
    text-decoration: none;
}

============
Replace With:
============

.navtd {
    color: $headertext;
    font-family: $font;
    font-size: 11px;
    text-decoration: none;
}

.navtd2 {
    color: $headertext;
    font-family: $font;
    font-size: 9px;
    text-decoration: none;
}

td.navtd {
    $headercss
    table-layout: fixed;
}

=======================================================================================================================================
=======
Step 5:
=======
==========================
Go To Admin Panel --> Templates
==========================
=================
Edit Template: header
=================
==========
Find Code:
==========

<tr>
<td class="navtd"><font class="navtd">$links $pluglink</font></td>
<td align="right"><a href="$siteurl"><font class="navtd">$lang[backto] <img src="$imgdir/top_home.gif" border="0" alt="$sitename" /></font></a></td>
</tr>

============
Replace With:
============

<tr>
<td><font class="navtd">$links   $pluglink</font></td>
<td align="right"><a href="$siteurl"><font class="navtd">$lang[backto] <img src="$THEME[imgdir]/home.gif" border="0" alt="$sitename" /></font></a></td>
</tr>

=======================================================================================================================================
Enjoy!