Creating modules
* Page restrictions apply
* Added by Meik Sievertsen, last edited by Meik Sievertsen on Apr 27, 2010 (view change)
Comment:
Introduction
In phpBB3 you can create your own modules for the User, Moderator and Administration Control Panel. This approach has many advantages over creating the complete page from scratch as described in Adding custom pages:
* You can manage the module in the ACP
* You don't have to care about handling authorization
* You get a navigation tree for free
* The UCP/MCP/ACP template already contains things like pagination, breadcrumbs or confirmation messages
The rest of this tutorial describes how to create a MCP module - if you want to create UCP modules, you usually only need to replace all occurrences of "mcp" with "ucp". An ACP module sample can be found below
PoTaP0ff писал(а):но во вкладке Модули он не появляется


print "123";<?php
class acp_mymod_info
{
function module()
{
return array(
'filename' => 'acp_mymod,
'title' => 'ACP_MYMOD',
'version' => '1.0.0',
'modes' => array(
'index' => array('title' => 'ACP_MYMOD', 'auth' => 'acl_a_mymod', 'cat' => array('')),
),
);
}
function install()
{
}
function uninstall()
{
}
}
?>PoTaP0ff писал(а): 'filename' => 'acp_mymod,
'filename' => 'acp_mymod',PoTaP0ff писал(а):'auth' => 'acl_a_mymod' - это я так понял относиться к ролям
PoTaP0ff писал(а):где я должен указать кто может иметь доступ к моду?
PoTaP0ff писал(а):как его едят?
PoTaP0ff писал(а):'cat' => array('')
Здесь вы можете управлять всеми типами модулей. Обратите внимание на то, что администраторский раздел имеет трёхуровневую структуру меню (Категория -> Категория -> Модуль), в результате чего подразделы имеют двухуровневую структуру меню (Категория -> Модуль), которая должна быть сохранена. Также учтите, что вы может заблокировать доступ самому себе, если вы отключите или удалите модули, отвечающие за управление модулями.

Вернуться в Для авторов (phpBB 3.0.x)
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 0