3.0.0MPAKÿüÌINFOÌüÿ# # This file contains Installation Informations. # This file does not include Installation Instructions for the normal User. # Please do not edit this file if you are not the Module Author. # # Please read the provided install.txt for Informations on how to install this Module. # # Module Name [name] Top Posters this Week [/name] # Module Directory Name [short_name] top_posters_week [/short_name] # your name [author] Acyd Burn Wicher [/author] # your email [email] --- [/email] # your webpage url [url] http://www.detecties.com/phpbb2018 [/url] # module version [version] 3.0.0 [/version] # required minimum Statistics Mod Version [stats_mod_version] 3.0.1beta3s [/stats_mod_version] # default update time [update_time] update_time_from top_posters 360 [/update_time] [check_update_site] http://www.detecties.com/phpbb2018 [/check_update_site] # extra info for the user [extra_info] No extra info. [/extra_info] ÌÌÿINFOÿÌÌÿüÌLANGÌüÿÌÌÿLANGÿÌÌÿüÌMODÌüÿstart_module(true); $core->set_content('bars'); $core->set_view('rows', $core->return_limit); $core->set_view('columns', 5); $core->define_view('set_columns', array( $core->pre_defined('rank'), 'username' => $lang['Username'], 'posts' => $lang['Posts'], $core->pre_defined('percent'), $core->pre_defined('graph')) ); $content->percentage_sign = TRUE; // $board_config['board_timezone'] // Use local time offset $current_time = 0; $minutes = array(); $hour_now = 0; $dato = 0; $time_today = 0; $time_thisweek = 0; $current_time = time(); $minutes = date('is', $current_time); $hour_now = $current_time - (60*(intval($minutes[0]).intval($minutes[1]))) - (intval($minutes[2]).intval($minutes[3])); $dato = date('H', $current_time); $time_today = $hour_now - (3600 * intval($dato)); $time_thisweek = $time_today - ((date('w', $time_today)-1) * 86400); //$l_this_day = create_date('D', $time_today, $board_config['board_timezone']); //$l_this_week = create_date('D', $time_thisweek, $board_config['board_timezone']); $l_this_day = date('D', $time_today); $l_this_week = date('D', $time_thisweek); $core->set_header($lang['module_name'] . ' [' . $l_this_week . ' - ' . $l_this_day . ']'); $core->assign_defined_view('align_rows', array( 'left', 'left', 'center', 'center', 'left') ); if ($time_thisweek > $time_today) { $time_thisweek -= 604800; } $sql = "SELECT u.user_id, u.username, count(u.user_id) as user_posts FROM " . USERS_TABLE . " u, " . POSTS_TABLE . " p WHERE (u.user_id = p.poster_id) AND (p.post_time > '" . intval($time_thisweek) . "') AND (u.user_id <> " . ANONYMOUS . ") GROUP BY u.user_id, u.username ORDER BY user_posts DESC LIMIT " . $core->return_limit; $result = $core->sql_query($sql, 'Couldn\'t retrieve topposters data'); $user_count = $core->sql_numrows($result); $user_data = $core->sql_fetchrowset($result); $total_posts_thisweek = 0; for ($i = 0; $i < $user_count; $i++) { $total_posts_thisweek += intval($user_data[$i]['user_posts']); } $content->init_math('user_posts', $user_data[0]['user_posts'], $total_posts_thisweek); $core->set_data($user_data); $core->define_view('set_rows', array( '$core->pre_defined()', '$core->generate_link(append_sid($phpbb_root_path . \'profile.php?mode=viewprofile&u=\' . $core->data(\'user_id\')), $core->data(\'username\'), \'target="_blank"\')', '$core->data(\'user_posts\')', '$core->pre_defined()', '$core->pre_defined()') ); $core->run_module(); ?>ÌÌÿMODÿÌÌ