Title: Quick Theme Changer v1.0

Author: Adam Clarke

Based On: Quick Theme Selection v1.0 By John Briggs

Updated By: John Briggs

Description:
This mod will provide a drop down box in the header and footer to change your theme.
This mod will redirect to the page you were on after changing your theme.

Copyright:  2006 Adam Clarke. All rights reserved.
Copyright:  2006 John Briggs. All rights reserved.

Compatability: XMB 1.9.5 Final

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

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

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

=======================================================================================================================================
=======
Step 1:
=======

=====================
Edit File: header.php
=====================

================================
Add Code At Very Bottom Of File:
================================

// create quick theme changer
if (X_MEMBER && isset($mytheme) && $mytheme != '') {
    $qtc_redirect = $url;
    $qtc_redirect = str_replace('&mytheme='.$mytheme, '', $qtc_redirect);
    $qtc_redirect = str_replace('?mytheme='.$mytheme, '', $qtc_redirect);
    $mytheme = (isset($mytheme) && is_numeric($mytheme)) ? (int) $mytheme : 0;
    $db->query("UPDATE $table_members SET theme='$mytheme' WHERE username='$xmbuser'");
    redirect($qtc_redirect, 0);
}

$quicktheme = '';
if (X_MEMBER) {
    $qtc_url = (strpos($url, '?') === false) ? $url . '?mytheme=' : $url . '&amp;mytheme=';
    $quicktheme = array();
    $quicktheme[] = "<strong><font class=\"smalltxt\"> $lang[quicktheme]</font></strong> <select class=\"smalltxt\" name=\"mytheme\" id=\"mytheme\" onchange=\"if(this.options[this.selectedIndex].value != '') { window.location=('$qtc_url'+this.options[this.selectedIndex].value) }\">";
    $query = $db->query("SELECT themeid, name FROM $table_themes ORDER BY name ASC");
    while ($qtc = $db->fetch_array($query)) {
        if ($theme == $qtc['themeid']) {
            $quicktheme[] = '<option value="'.$qtc['themeid'].'" selected="selected">'.stripslashes($qtc['name']).'</option>';
        } else {
            $quicktheme[] = '<option value="'.$qtc['themeid'].'">'.stripslashes($qtc['name']).'</option>';
        }
    }
    $quicktheme[] = '</select>';
    $quicktheme = implode("\n", $quicktheme);
}

=======================================================================================================================================
=======
Step 2:
=======

================================
Edit File: lang/English.lang.php
================================

================================
Add Code At Very Bottom Of File:
================================

// Quick Theme Changer Mod Begin
$lang['quicktheme'] = "Quick Theme:";
// Quick Theme Changer Mod End

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

=================================================
Go To Administration Panel -> Templates -> header
=================================================

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

<td align="right"><a href="#bottom"><img src="$imgdir/arrow_dw.gif" border="0" alt="$lang[gotobottom]" /></a></td>

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

<td align="right">$quicktheme</td>
<td align="right" width="1"><a href="#bottom"><img src="$imgdir/arrow_dw.gif" border="0" alt="$lang[gotobottom]" /></a></td>

=======================================================================================================================================
=======
Step 4:
=======

=================================================
Go To Administration Panel -> Templates -> footer
=================================================

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

<td align="right" bgcolor="$altbg1" width="2%"><a href="#top"><img src="$imgdir/arrow_up.gif" style="margin-right: 3px" border="0" alt="$lang[gototop]" /></a></td>

===============
Add Code Above:
===============

<td class="tablerow" align="right" bgcolor="$altbg1">$quicktheme&nbsp;</td>

=======================================================================================================================================