##############################################################
## MOD Title: How to add new Modules
## MOD Author: kooky < [nospam]
kooky@altern.org > (n/a)
http://www.myphpbb.zaup.org/
## MOD Author: Milkman <
milkman@web-milk.co.uk > (Phill Sparks)
http://www.lsucs.com/
## MOD Description: Explains how to add new modules for the Moderator CP.
## MOD Version: 1.0.5
##
## Installation Level: Easy
## Installation Time: 2 minutes
## Files To Edit: 1
## modcp/admin_xxx.php
## Included Files: N/A
##
## License:
http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check:
http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at
http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## How to, for understanding purpose.
##
## Legend:
## -------
## - name_of_your_file = xxx
## - NAME_OF_YOUR_CATEGORY = CAT
## - NAME_OF_YOUR_MODULE = MOD
##
##############################################################
## MOD History:
##
## 2006/02/01 - Version 1.0.5
## - Updated find 'admin/' and replace with 'modcp/'
##
## 2005/11/26 - Version 1.0.4
## - Updated to match the Moderator CP version 1.1.1
##
## 2005/08/24 - Version 1.0.3 (Milkman)
## - Updated to match the Moderator CP version 1.1.0
##
## 2005/07/25 - Version 1.0.2
## - Updated to match the Moderator CP version 1.0.10
##
## 2004/12/28 - Version 1.0.1
## - Updated to match the Moderator CP version 1.0.7
##
## 2004/09/09 - Version 1.0.0
## - Initial Release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ COPY ]------------------------------------------
#
copy root/admin/admin_xxx.php to modcp/admin_xxx.php
copy root/templates/subSilver/admin/xxx_body.tpl to templates/subSilver/modcp/xxx_body.tpl
#
#-----[ OPEN ]------------------------------------------
#
modcp/admin_xxx.php
#
#-----[ FIND ]------------------------------------------
# each time you have
# $module['CAT']['MOD'] = $filename;
#
$module['CAT']['MOD'] = $filename;
#
#-----[ REPLACE WITH ]------------------------------------------
#
if (check_perms('CAT', 'MOD'))
$modcp_module['CAT']['MOD'] = $filename;
#
#-----[ FIND ]------------------------------------------
#
$phpbb_root_path = './../';
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
#
#-----[ AFTER ADD ]------------------------------------------
# If you have more than one module item you'll need to add
# more of these blocks, and check for the $module too.
#
// Enable/disable the Module
if (!check_perms('CAT', 'MOD'))
{
// End of Activation
$message = $lang['Module_disabled'] . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid('index.' . $phpEx . '?pane=right') . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
}
#
#-----[ FIND ]------------------------------------------
# each time you have admin/ (mostly in link and tpl code)
#
admin/
#
#-----[ REPLACE WITH ]------------------------------------------
#
modcp/
#
#-----[ FIND ]------------------------------------------
# each time you have page_footer_admin
#
include('./page_footer_admin.'.$phpEx);
#
#-----[ REPLACE WITH ]------------------------------------------
#
include('./page_footer_mod.' . $phpEx);
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM