============================================================================================================================
Modification Name: Moderator Control Panel

Version: 1.0.3

Last Modified: 01/29/2011

Description: This modification will add a control panel for Moderators.

Compatibility: XMB v1.9.5 SP1

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

MOD History: V1.0.0 (30/05/2005 @ 02:00) - Initial Release.
             V1.0.1 (31/05/2005 @ 07:00) - Fixed minor bug and removed additional features which are not included with core XMB.
             V1.0.2 (07/06/2005 @ 22:55) - Added link to Mod CP from Admin CP.
             V1.0.3 (09/06/2005 @ 23:00) - Fixed link from admin panel.

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

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

Affected Files: header.php, misc.php, include/admin.user.inc.php, lang/English.lang.php

Affected Templates: none

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

Upload the file modcp.php to your forum directory.

============================================================================================================================
=======
Step 2:
=======
===============================
Go To Adminstration Panel --> Templates
===============================
=================================
Create New Template: error_nologinsession2
=================================
========================
Add Code and Submit Changes
========================

<form method="post" action="misc.php?action=login">
<table cellspacing="0" cellpadding="0" border="0" width="$THEME[tablewidth]" align="center">
<tr>
<td bgcolor="$THEME[bordercolor]">
<table border="0" cellspacing="$THEME[borderwidth]" cellpadding="$THEME[tablespace]" width="100%">
<tr>
<td class="category" colspan="2"><font color="$THEME[cattext]"><strong>$lang[nomodcpsession]</strong></font></td>
</tr>
<tr class="tablerow">
<td bgcolor="$THEME[altbg1]" width="22%"><strong>$lang[error]</strong></td>
<td bgcolor="$THEME[altbg2]"><span class="smalltxt"><strong>$lang[nomodcpsession]</strong></span><br />
<span class="smalltxt"><strong>$lang[nomodcpsession2]</strong></span><br />
<span class="smalltxt">$lang[nomodcpsession3]</span><br />
<span class="smalltxt">$lang[nomodcpsession4]</span></td>
</tr>
<tr class="tablerow">
<td bgcolor="$THEME[altbg1]" width="22%">$lang[textusername]</td>
<td bgcolor="$THEME[altbg2]"><input type="text" name="username" size="30" maxlength="40" />  </td>
</tr>
<tr class="tablerow">
<td bgcolor="$THEME[altbg1]">$lang[textpassword]</td>
<td bgcolor="$THEME[altbg2]"><input type="password" name="password" size="25" />  <br />
</td>
</tr>
<tr>
<td class="tablerow" bgcolor="$THEME[altbg2]" align="center" colspan="2"><input type="submit" class="submit" name="loginsubmit" value="$lang[textlogin]" /></td>
</tr>
</table>
</td>
</tr>
</table>
</form>

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

    if (X_ADMIN) {
        $cplink = " - <a href=\"cp.php\">$lang[textcp]</a>";
    }

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

    // Moderator Control Panel Mod Begin
    if (X_STAFF && !X_ADMIN) {
        $cplink = " <a href=\"modcp.php\">$lang[textmodcp] -</a>";
    }
    // Moderator Control Panel Mod End

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

    } elseif (false !== strpos($url, '/cp.php') || false !== strpos($url, '/cp2.php')) {

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

    // Moderator Control Panel Mod Begin
    } elseif (false !== strpos($url, '/modcp.php')) {
        $location = $lang['onlinemodcp'];
    // Moderator Control Panel Mod End

============================================================================================================================
========
Step 5:
========
===========================
Edit File: include/admin.user.inc.php
===========================
==========
Find Code:
==========

    &raquo;&nbsp;<a href="cp2.php?action=modlog"><?php echo $lang['textmodlogs']?></a><br />

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

    <!-- Moderator Control Panel Mod Begin -->
    &raquo;&nbsp;<a href="modcp.php"><?php echo $lang['textmodcp']?></a><br />
    <!-- Moderator Control Panel Mod End -->

============================================================================================================================
========
Step 6:
========
====================
Edit File: English.lang.php
====================
============================
Add Code To End Of File Above  ?>
============================

// Moderator Control Panel Begin
$lang['textmodcp'] = "Moderator Panel";
$lang['onlinemodcp'] = "Using the Moderator Control Panel";
$lang['nomodcpsession'] = "No Moderator Login Session Found.";
$lang['nomodcpsession2'] = "Welcome to the moderator control panel for XMB 1.9, currently running $bbname.";
$lang['nomodcpsession3'] = "Please enter your username and password which currently has Moderator status.";
$lang['nomodcpsession4'] = "If you still have issues logging in, please contact the board <strong><a href=\"mailto:$adminemail?subject=Super Moderator Login Failure At $bbname\">webmaster</a></strong>";
// Moderator Control Panel End

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