ich habe in der Modul Konfiguration einen neuen Bereich eingebaut, Namens WCP.
Die "wcp.php" liegt eine Ebene unter dem Forum und heißt index.php.
Inhalt von dieser Index.php ist
Code: Alles auswählen
<?php
// Benötigte Dateien und Variablen von phpBB
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './forum/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
//include_once($phpbb_root_path . 'includes/functions_display.' . $phpEx);
require_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
require_once($phpbb_root_path . 'includes/functions_module.' . $phpEx);
// Session auslesen und Benutzer-Informationen laden
$user->session_begin();
//$user->setup('ucp');
$user->setup('wcp');
$auth->acl($user->data);
/*
* Inhaltsbereich
*/
$id = request_var('i', '');
$mode = request_var('mode', '');
$module = new p_master();
$template->assign_vars(array(
'S_LOGIN_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'),
'ONHOME' => true,
'S_IN_SEARCH' => true,
)
);
// Header und Titel der Seite
page_header($user->lang['TITLE']);
if (!$user->data['is_registered'])
{
if ($user->data['is_bot'])
{
redirect(append_sid("index.$phpEx"));
}
login_box(request_var('redirect', "../index.$phpEx"), $user->lang['LOGIN_EXPLAIN_WCP']);
}
$module->list_modules('wcp');
// Select the active module
$module->set_active($id, $mode);
// Load and execute the relevant module
$module->load_active();
// Assign data to the template engine for the list of modules
$module->assign_tpl_vars(append_sid("index.$phpEx"));
//$template->assign_var('PAGE_TITLE', $module->get_page_title());
// Generate the page, do not display/query online list
$module->display($module->get_page_title(), true);
?>
Kann diese Module auch über den neuen Bereich im ACP unter der Modul-Konfiguration hinzufügen.
Über
Code: Alles auswählen
$module->display($module->get_page_title(), true);
Benötigte Language Datei gibt es selbstverständlich auch. Das erstellen der Navigationslinks aus dem Modulen heraus funktioniert ebenfalls.
Wenn ich nun
Code: Alles auswählen
//$template->assign_var('PAGE_TITLE', $module->get_page_title());
Vielen dank für eure Hilfe im Voraus
Gruß
Tobias