============================================================================================================================
Modification Title: Navigation Header Enhancement

Version: 1.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:  2010 Scan a.k.a Chris. All rights reserved.

Compatability: XMB 1.9.5 SP1

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 v3. 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 Administration 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:
==========

        $query = $db->query("SELECT * FROM $table_themes WHERE themeid='$single'");
        $themestuff = $db->fetch_array($query);

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

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

==========
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:
===============

        <!-- Navigation Header Enhancement Mod Begin -->
        <tr bgcolor="<?php echo $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>
        <!-- Navigation Header Enhancement Mod End -->

==========
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:
===============

        <!-- Navigation Header Enhancement Mod Begin -->
        <tr bgcolor="<?php echo $altbg2?>" class="tablerow">
        <td><?php echo $lang['textnavheader']?></td>
        <td><input type="text" name="headerbgnew" value="" /></td>
        </tr>
        <!-- Navigation Header Enhancement Mod End -->

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

headertext='$headertextnew',

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

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

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

headertext,

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

headertext, headerbg,

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

'$headertextnew', '$topnew'

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

'$headertextnew', '$headerbgnew', '$topnew'

============================================================================================================================
=======
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:
===============

// Navigation Header Enhancement Mod Begin
if (false === strpos($headerbg, '.')) {
    $headercss = "background-color: $headerbg;";
} else {
    $headercss = "background-image: url('$imgdir/$headerbg');";
}
// Navigation Header Enhancement Mod End

============================================================================================================================
=======
Step 5:
=======
===============================
Go To Administration 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 Administration Panel --> Templates
===============================
=================
Edit Template: header
=================
==========
Find Code:
==========

<tr>
<td class="navtd">
<table width="100%" cellpadding="0" cellspacing="0">
<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/home.gif" border="0" alt="$sitename" /></font></a></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>

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

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

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