Hallo,
Ich habe einen phpbb mod mit diesem können user posts warnen.
Doch jetzt will ich auf der start-seite für die Mods. die anzahl der reports anzeigen.
Dann hab ich das hier gemacht:
Hab es test.php gennant, aufgerufen...ging perfect.
Doch wenn ich jetzt include('test.php') bei der index.php mache kommt nur das hier:
Woran liegt das?
Ich habe einen phpbb mod mit diesem können user posts warnen.
Doch jetzt will ich auf der start-seite für die Mods. die anzahl der reports anzeigen.
Dann hab ich das hier gemacht:
PHP:
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include_once($phpbb_root_path . 'extension.inc');
include_once($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_reputation.' . $phpEx);
include($phpbb_root_path . 'includes/functions_post.' . $phpEx);
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
if ($_GET['lol'] > 0)
{
$userdata2 = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata2);
$forums_auth2 = reputation_auth(AUTH_LIST_ALL, $userdata2);
$forum_ids2 = '';
foreach ($forums_auth2 as $forum_id => $is_auth)
{
if ($is_auth['auth_mod'])
{
$forum_ids2 .= ($forum_ids2 ? ',' : '') . $forum_id;
}
}
if (!$forum_ids2)
{
exit();
}
$result = db_query("SELECT COUNT(report_id) AS num_reports FROM {POST_REPORTS_TABLE} r WHERE forum_id IN (%s)", $forum_ids2);
$total_reports = ($row = $db->sql_fetchrow($result)) ? intval($row['num_reports']) : 0;
$order = input_var('order', 'asc');
switch ($order)
{
case 'date':
$sql_order = ' ORDER BY r.report_id DESC, r.reports_num DESC';
$s_order = 'DATE';
break;
case 'num':
default:
$sql_order = ' ORDER BY r.reports_num DESC, r.report_id DESC';
$s_order = 'NUM';
break;
}
echo $row['num_reports'];
}
?>
Hab es test.php gennant, aufgerufen...ging perfect.
Doch wenn ich jetzt include('test.php') bei der index.php mache kommt nur das hier:
Code:
1Template->loadfile(): No file specified for handle body
Woran liegt das?