Name: Moderator Control Panel

Version: 1.0.3

Last modified: 05/21/2009 @ 18:30 (GMT)

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

Compatibility: XMB v1.9.8 SP3

Tested On: XMB 1.9.8 SP3

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

Code Updated For 1.9.8 by: WormHole @ XMB Garage

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. A copy is provided with this software package.

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

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

Affected Templates: none

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

Upload modcp.php to your forum directory.

====================================================================================================
=======
Step 2:
=======
=========================
Go To Admin Panel -> Templates
=========================
=============================
Create Template: error_nologinsession2
=============================
=======================
Add Code & 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 class="tablerow">
<td 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 Above:
===============

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

====================================================================================================
=======
Step 4:
=======
=======================
Edit File: include/online.inc.php
=======================
==========
Find Code:
==========

    } else if (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.inc.php
========================
==========
Find Code:
==========

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

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

    <!-- 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 Bottom 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.8, 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!