echter, ik heb wat problemen:
http://www.muziekforumonline.nl/FFO/statistics.php
Code: Selecteer alles
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
include($phpbb_root_path.'language/lang_' . $board_config['default_lang'] . '/lang_statistics.'.$phpEx);
$total_posts = get_db_stat('postcount');
$total_posts2 = get_db_stat('postcount2');
$total_users = get_db_stat('usercount');
$total_topics = get_db_stat('topiccount');
$total_topics2 = get_db_stat('topiccount2');
$total_posts3 = ($total_posts + $total_posts2);
$total_topics3 = ($total_topics + $total_topics2);
$start_date = create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['board_timezone']);
$boarddays = max(1, round( ( time() - $board_config['board_startdate'] ) / 86400 ));
$posts_per_day = sprintf('%.2f', $total_posts / $boarddays);
$topics_per_day = sprintf('%.2f', $total_topics / $boarddays);
$posts_per_day2 = sprintf('%.2f', $total_posts2 / $boarddays);
$topics_per_day2 = sprintf('%.2f', $total_topics2 / $boarddays);
$posts_per_day3 = sprintf('%.2f', $total_posts3 / $boarddays);
$topics_per_day3 = sprintf('%.2f', $total_topics3 / $boarddays);
$users_per_day = sprintf('%.2f', $total_users / $boarddays);
$template->set_filenames(array(
'body' => 'statistics.tpl')
);
$template->assign_vars(array(
'U_INDEX' => append_sid('index.'.$phpEx),
'L_INDEX' => sprintf($lang['Forum_Index'], $board_config['sitename']),
'L_STATISTIC' => $lang['Statisticpt'],
'L_VALUE' => $lang['Valuept'],
'L_TITLE1' => $lang['title1pt'],
'L_TITLE2' => $lang['title2pt'],
'L_TITLE3' => $lang['title3pt'],
'L_TOTAL_MESSAGES' => $lang['total_messagespt'],
'L_TOTAL_MESSAGES_2' => $lang['total_messages2pt'],
'L_TOTAL_MESSAGES_3' => $lang['total_messages3pt'],
'L_TOTAL_TOPICS' => $lang['total_topicspt'],
'L_TOTAL_TOPICS_2' => $lang['total_topics2pt'],
'L_TOTAL_TOPICS_3' => $lang['total_topics3pt'],
'L_TOTAL_MESSAGES_DAY' => $lang['$posts_per_daypt'],
'L_TOTAL_MESSAGES_DAY_2' => $lang['$posts_per_day2pt'],
'L_TOTAL_MESSAGES_DAY_3' => $lang['$posts_per_day3pt'],
'L_TOTAL_TOPICS_DAY' => $lang['$topics_per_daypt'],
'L_TOTAL_TOPICS_DAY_2' => $lang['$topics_per_day2pt'],
'L_TOTAL_TOPICS_DAY_3' => $lang['$topics_per_day3pt'],
'TOTAL_MESSAGES' => $total_posts,
'TOTAL_MESSAGES2' => $total_posts2,
'TOTAL_MESSAGES3' => $total_posts3,
'TOTAL_TOPICS' => $total_topics,
'TOTAL_TOPICS' => $total_topics2,
'TOTAL_TOPICS' => $total_topics3,
'TOTAL_MESSAGES_DAY' => $posts_per_day,
'TOTAL_MESSAGES_DAY_2' => $posts_per_day2,
'TOTAL_MESSAGES_DAY_3' => $posts_per_day3,
'TOTAL_TOPICS_DAY' => $topics_per_day,
'TOTAL_TOPICS_DAY_2' => $topics_per_day2,
'TOTAL_TOPICS_DAY_3' => $topics_per_day3)
);
$template->pparse('body');
$page_title = $lang['Title'];
include('includes/page_tail.php');
postcount2 en topiccount2 bestaan!
de lang file is lang_statistics.php
deze pagina is licht gebaseerd op de originele statistieken pagina van nivisec (of iemand anders)..