Mcp/info

The mcp/info/ directory is used to contain the install, uninstall and title information for modes of modules installed in the Moderator Control Panel

Example Info Page
An example of a file within this directory should follow similar suit to this: /**
 * @author Original Author author@example.com
 * @package mcp
 * @version $Id: $
 * @copyright (c) Original Author Group
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License

/** class mcp_page_name_info {	function module {		return array(			'filename'	=> 'mcp_page_name',			'title'		=> 'MCP_PAGE_TITLE',			'version'	=> '1.2.3',			'modes'		=> array( 'mode1'		=> array('title' => 'MCP_PAGE_MODE_ONE_TITLE', 'auth' => 'acl_m_,$id', 'cat' => array('MCP_PAGE_TITLE')), 'mode2'		=> array('title' => 'MCP_PAGE_MODE_TWO_TITLE', 'auth' => 'acl_m_,$id', 'cat' => array('MCP_PAGE_TITLE')), ),		);	}
 * @package module_install

function install {	}

function uninstall {	} }

Filename
'filename' => 'mcp_page_name', Filename is the name of the file this info file is used for.

Title
'title' => 'MCP_PAGE_TITLE', Title

Version
See Version Numbering

Modes
Every module can have multiple submodes (the mode will be passed as parameter to ). Every submode is represented as an associative array with the keys 'title', 'auth' and 'cat' which are described below.

Title
array('title' => 'MCP_PAGE_MODE_ONE_TITLE', As you might guess, this is the title of the mode which will be displayed in the navigation tree. You can (and should!) use language constants here. The language constants should be defined in acp/common.php, mcp.php and ucp.php depending on what kind of module you're creating.

Authenthication/Conditional Display
The 'auth' value is responsible for whom/when the module is displayed in the navigation tree. You can use the following elements:
 * , && and ||
 * operators that work like in php, e.g (a && b) || c


 * acl_foo
 * evaluates to, i.e. module is shown if user has global permission foo


 * acl_foo,$id
 * evaluates to, i.e. module is shown if user has permission foo in the current forum (only useful for mcp modules)


 * $id
 * evaluates to, i.e. module is shown if a forum_id is available (only useful for mcp modules)


 * aclf_foo
 * evaluates to, i.e. module is shown if user has permission foo in at least one forum


 * cfg_foo
 * evaluates to, i.e. module is shown if the board configuration value 'foo' is a nonzero integer


 * request_foo (latest cvs only)
 * evaluates to, i.e. module is shown if a request parameter 'foo' exists (useful for "edit item" pages)

Category
'cat' => array('MCP_PAGE_TITLE')), The parent category this mode will be placed in. Note: This value is only used when you install a new phpBB and only works if the category is one of those defined in install.php. In other words, if your module is meant to be installed in its own category or it is not available during the installation, you can omit this information because it won't be used anyway.

Functions
Leave the module, install, and uninstall functions in place. These are necessary for installing and managing the modules by the admin.