Verfasst: 03.09.2007 17:00
Hm, sollte doch möglich sein... 

includes/acp/info/acp_dr2o_news_add.phpParse error: parse error, unexpected T_LNUMBER in D:\Programme\xampp\htdocs\dr2o\team\includes\functions_module.php(328) : eval()'d code on line 1
Parse error: parse error, unexpected T_LNUMBER in D:\Programme\xampp\htdocs\dr2o\team\includes\functions_module.php(328) : eval()'d code on line 1
[phpBB Debug] PHP Notice: in file /adm/index.php on line 149: Cannot modify header information - headers already sent by (output started at /includes/functions_module.php(328) : eval()'d code:1)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 151: Cannot modify header information - headers already sent by (output started at /includes/functions_module.php(328) : eval()'d code:1)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 152: Cannot modify header information - headers already sent by (output started at /includes/functions_module.php(328) : eval()'d code:1)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 153: Cannot modify header information - headers already sent by (output started at /includes/functions_module.php(328) : eval()'d code:1)
Code: Alles auswählen
<?php
/**
* @package module_install
*/
class acp_dr2o_news_add_info
{
function module()
{
return array(
'filename' => 'acp_dr2o_news_add',
'title' => 'DR2o News Hinzufuegen',
'version' => '1.0.0',
'modes' => array(
'add_news' => array('title' => 'News Hinzufuegen', 'auth' => 'acl_a_dr2o_news_add', 'cat' => array('ACP_GENERAL_TASKS')),
),
);
}
function install()
{
}
function uninstall()
{
}
}
?>
Code: Alles auswählen
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
/**
* @package acp
*/
class acp_dr2o_news_add
{
var $u_action;
function main($id, $mode)
{
global $db, $user, $auth, $template;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
$user->add_lang('acp/board');
// Set up the page
$this->tpl_name = 'acp_dr2o_news_add'; //name der templatedatei
$this->page_title = 'DR2o News Hinzufuegen';
// Set up general vars
$submit = isset($_POST['submit']) ? true : false; //prüfung ob formular abgesendet
//begin des eigentlichen scripts
$testvariable = 'hallo welt, ich bin ein test.';
if ($mode == 'add_news')
{
//irgendwas
}
//ende des eigentlichen scripts
if ($submit) //wenn formular abgesendet
{
trigger_error(sprintf($user->$testvariable, $greeter, $hello) . adm_back_link($this->u_action), E_USER_WARNING);
}
else
{
$template->assign_vars(array(
'S_test' => $testvariable,
'S_SUBMIT' => $this->u_action)
);
}
}
}
?>
Hier fehlt ein bisschen was, neben den Default-locations vor allem das Recht, welches die Betrachtung ermöglichen soll. Ich bin mir nicht ganz sicher wie das System darauf reagiert, wenn der Eintrag undefiniert ist. Wenn du den Zugang generell erlauben willst, dann solltest du den Eintrag nicht weg, sondern leer lassen.nickvergessen hat geschrieben:...
acp_links_info.phpCode: Alles auswählen
... 'index'=> array('title' => 'ACP_AUTOMATION'),
Code: Alles auswählen
array('title' => 'UCP_MAIN_FRONT', 'auth' => '', 'cat' => array('UCP_MAIN')),
Code: Alles auswählen
preg_match('#(?:acl_([a-z_]+)(,\$id)?)|(?:\$id)|(?:aclf_([a-z_]+))|(?:cfg_([a-z_]+))|(?:request_([a-z_]+))#', $token)
Code: Alles auswählen
eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z0-9_]+)(,\$id)?#', '#\$id#', '#aclf_([a-z0-9_]+)#', '#cfg_([a-z0-9_]+)#', '#request_([a-z0-9_]+)#'), array('(int) $auth->acl_get(\'\\1\'\\2)', '(int) $forum_id', '(int) $auth->acl_getf_global(\'\\1\')', '(int) $config[\'\\1\']', '!empty($_REQUEST[\'\\1\'])'), $module_auth) . ');');