Main class
(
includes/acp/acp_foo.php)- Code: Select all
class acp_foo
{
var $u_action;
var $new_config;
function main($id, $mode)
{
global $db, $user, $auth, $template;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
$user->add_lang('mods/foo');
switch($mode)
{
case 'index':
$this->page_title = 'ACP_FOO';
$this->tpl_name = 'acp_foo';
break;
}
}
}
Info Class
(
includes/acp/info/acp_foo.php)- Code: Select all
class acp_foo_info
{
function module()
{
return array(
'filename' => 'acp_foo',
'title' => 'ACP_FOO',
'version' => '1.2.3',
'modes' => array(
'index' => array('title' => 'ACP_FOO_INDEX_TITLE', 'auth' => 'acp_foo_auth', 'cat' => array('')),
),
);
}
function install()
{
}
function uninstall()
{
}
}
Language File
(
language/en/mods/foo.php)- Code: Select all
/**
* DO NOT CHANGE
*/
if (empty($lang) || !is_array($lang))
{
$lang = array();
}
// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
$lang = array_merge($lang, array(
'ACP_FOO_INDEX_TITLE' => 'Foo Index',
));
Sample Style HTML
(
adm/style/acp_foo.html)- Code: Select all
<!-- INCLUDE overall_header.html -->
Hello, World!
<!-- INCLUDE overall_footer.html -->












(the wink means that you are very helpful to me
)

Proud member of the phpBB support team
STG Support team member
STG Moderator team member

