============================================================================================================================
Modification Name: Admin Control Panel Redirects

Version: 1.0

Description:
This modification will make the admin panel redirect back to the section you are editing.

Compatibility: XMB v1.9.5 SP1

Code Developed By: Adam Clarke (adam@scriptdesign.co.uk - http://www.scriptdesign.co.uk)

Note: Backup all affected files, templates & database's.

Affected Files: cp.php, cp2.php

Affected Templates: None

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

Author Note:
You downloaded this hack from XMBGarage.com, the best source for XMB related downloads.
Please visit http://www.xmbgarage.com/ for support.
============================================================================================================================
=======
Step 1:
=======
==============
Edit File: cp.php
==============
==========
Find Code:
==========

        echo "<tr bgcolor=\"$altbg2\" class=\"ctrtablerow\"><td>$lang[textsettingsupdate]</td></tr>";

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

        echo "<tr bgcolor=\"$altbg2\" class=\"ctrtablerow\"><td>$lang[textsettingsupdate]</td></tr>";
        redirect("cp.php?action=settings", 1.5, X_REDIRECT_JS);

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

            echo '<tr bgcolor="'.$altbg2.'" class="ctrtablerow"><td>'.$lang['textforumupdate'].'</td></tr>';

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

            echo '<tr bgcolor="'.$altbg2.'" class="ctrtablerow"><td>'.$lang['textforumupdate'].'</td></tr>';
            redirect("cp.php?action=forum", 1.5, X_REDIRECT_JS);

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

            echo '<tr bgcolor="'.$altbg2.'" class="tablerow"><td align="center">'.$lang['textforumupdate'].'</td></tr>';

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

            echo '<tr bgcolor="'.$altbg2.'" class="ctrtablerow"><td>'.$lang['textforumupdate'].'</td></tr>';
            redirect("cp.php?action=forum", 1.5, X_REDIRECT_JS);

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

        echo "<tr bgcolor=\"$altbg2\" class=\"tablerow\"><td align=\"center\">$lang[textmodupdate]</td></tr>";

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

        echo "<tr bgcolor=\"$altbg2\" class=\"tablerow\"><td align=\"center\">$lang[textmodupdate]</td></tr>";
        redirect("cp.php?action=mods", 1.5, X_REDIRECT_JS);

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

        echo "<tr bgcolor=\"$altbg2\"><td align=\"center\" class=\"tablerow\">$self[status]</td></tr>";

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

        echo "<tr bgcolor=\"$altbg2\"><td align=\"center\" class=\"tablerow\">$self[status]</td></tr>";
        redirect("cp.php?action=ipban", 1.5, X_REDIRECT_JS);

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

        echo "<tr bgcolor=\"$altbg2\" class=\"tablerow\"><td align=\"center\">$lang[textmembersupdate]</td></tr>";

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

        echo "<tr bgcolor=\"$altbg2\" class=\"tablerow\"><td align=\"center\">$lang[textmembersupdate]</td></tr>";
        redirect("cp.php?action=members", 1.5, X_REDIRECT_JS);

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

        echo "<tr bgcolor=\"$altbg2\" class=\"tablerow\"><td align=\"center\">$lang[textattachmentsupdate]</td></tr>";

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

        echo "<tr bgcolor=\"$altbg2\" class=\"tablerow\"><td align=\"center\">$lang[textattachmentsupdate]</td></tr>";
        redirect("cp2.php?action=attachments", 1.5, X_REDIRECT_JS);

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

        echo "<tr bgcolor=\"$altbg2\" class=\"tablerow\"><td align=\"center\">$lang[censorupdate]</td></tr>";

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

        echo "<tr bgcolor=\"$altbg2\" class=\"tablerow\"><td align=\"center\">$lang[censorupdate]</td></tr>";
        redirect("cp2.php?action=censor", 1.5, X_REDIRECT_JS);

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

        echo "<tr bgcolor=\"$altbg2\" class=\"tablerow\"><td align=\"center\">$lang[forumpruned]</td></tr>";

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

        echo "<tr bgcolor=\"$altbg2\" class=\"tablerow\"><td align=\"center\">$lang[forumpruned]</td></tr>";
        redirect("cp2.php?action=prune", 1.5, X_REDIRECT_JS);

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

        echo '<tr bgcolor="'.$altbg2.'" class="ctrtablerow"><td>'.$lang['rankingsupdate'].'</td></tr>';

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

        echo '<tr bgcolor="'.$altbg2.'" class="ctrtablerow"><td>'.$lang['rankingsupdate'].'</td></tr>';
        redirect("cp2.php?action=ranks", 1.5, X_REDIRECT_JS);

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

        echo '<tr bgcolor="'.$altbg2.'" class="ctrtablerow"><td>'.$lang['restrictedupdate'].'</td></tr>';

        redirect('cp2.php?action=restrictions', 2);

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

        echo '<tr bgcolor="'.$altbg2.'" class="ctrtablerow"><td>'.$lang['restrictedupdate'].'</td></tr>';
        redirect("cp2.php?action=restrictions", 1.5, X_REDIRECT_JS);

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

        echo '<tr bgcolor="'.$altbg2.'" class="ctrtablerow"><td>'.$lang['smilieupdate'].'</td></tr>';

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

        echo '<tr bgcolor="'.$altbg2.'" class="ctrtablerow"><td>'.$lang['smilieupdate'].'</td></tr>';
        redirect("cp2.php?action=smilies", 1.5, X_REDIRECT_JS);

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

        echo "<tr bgcolor=\"$altbg2\" class=\"tablerow\"><td align=\"center\">$lang[templatesupdate]</td></tr>";

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

        echo "<tr bgcolor=\"$altbg2\" class=\"tablerow\"><td align=\"center\">$lang[templatesupdate]</td></tr>";
        redirect("cp2.php?action=templates", 1.5, X_REDIRECT_JS);

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

        echo "<tr bgcolor=\"$altbg2\" class=\"tablerow\"><td align=\"center\">$lang[templatesdelete]</td></tr>";

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

        echo "<tr bgcolor=\"$altbg2\" class=\"tablerow\"><td align=\"center\">$lang[templatesdelete]</td></tr>";
        redirect("cp2.php?action=templates", 1.5, X_REDIRECT_JS);

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

            echo $lang['textthemeimportfail'];
        } else {
            echo $lang['textthemeimportsuccess'];
        }

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

            echo $lang['textthemeimportfail'];
            redirect("cp2.php?action=themes", 1.5, X_REDIRECT_JS);
        } else {
            echo $lang['textthemeimportsuccess'];
            redirect("cp2.php?action=themes", 1.5, X_REDIRECT_JS);
        }

=======================
Find Code (On 3 Occasions):
=======================

        echo '<tr bgcolor="'.$altbg2.'" class="ctrtablerow"><td>'.$lang['themeupdate'].'</td></tr>';

=============================
Replace Code With (On 3 Occasions):
=============================

        echo '<tr bgcolor="'.$altbg2.'" class="ctrtablerow"><td>'.$lang['themeupdate'].'</td></tr>';
        redirect("cp2.php?action=themes", 1.5, X_REDIRECT_JS);

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