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] Last Created Topics [/name] # Module Directory Name [short_name] last_created_topics [/short_name] # your name [author] Wicher [/author] # your email [email] n/a [/email] # your webpage url [url] http://www.detecties.com/phpbb2018 [/url] # module version [version] 4.1.5 [/version] # required minimum Statistics Mod Version [stats_mod_version] 3.0.1beta3s [/stats_mod_version] # default update time // Leave this at 0 for this module. [update_time] 0 [/update_time] [check_update_site] http://www.detecties.com/phpbb2018 [/check_update_site] # extra info for the user [extra_info] This Module displays the last created topics at your board. [/extra_info] ÌÌÿINFOÿÌÌÿüÌLANGÌüÿÌÌÿLANGÿÌÌÿüÌMODÌüÿstart_module(true); $core->set_content('statistical'); $core->set_view('rows', $core->return_limit); $core->set_view('columns', 4); $core->define_view('set_columns', array( $core->pre_defined('rank'), 'topic' => $lang['Topic'], 'start_date' => $lang['start_date'], 'replies' => $lang['Replies']) ); $core->set_header($lang['module_name']); $core->assign_defined_view('align_rows', array( 'left', 'left', 'left', 'center') ); $core->assign_defined_view('width_rows', array( '20%', '', '', '20%') ); $current_time = time(); if ( $userdata['session_logged_in'] ) { if ($userdata['user_level'] == ADMIN) { $sql = 'SELECT t.topic_id, t.topic_title, t.topic_replies, t.topic_time, u.user_timezone, u.user_dateformat FROM ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u WHERE u.user_id = '.$userdata['user_id'].' ORDER BY topic_time DESC LIMIT ' . $core->return_limit; } else if ($userdata['user_level'] == MOD) { $sql = 'SELECT t.topic_id, t.topic_title, t.topic_replies, t.topic_time, u.user_timezone, u.user_dateformat FROM ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u, ' . FORUMS_TABLE . ' f WHERE (t.topic_status <> 2) AND (t.topic_time < '.$current_time.') AND (f.auth_view <> 2) AND (f.auth_read <> 2) AND (t.forum_id = f.forum_id) AND u.user_id = '.$userdata['user_id'].' ORDER BY t.topic_time DESC LIMIT ' . $core->return_limit; } else if (($userdata['user_level'] != ADMIN)or($userdata['user_level'] != MOD)) { $sql = 'SELECT t.topic_id, t.topic_title, t.topic_replies, t.topic_time, u.user_timezone, u.user_dateformat FROM ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u, ' . FORUMS_TABLE . ' f WHERE t.forum_id = f.forum_id AND f.auth_view < 2 AND f.auth_read < 2 AND (t.topic_status <> 2) AND (t.topic_time < '.$current_time.') AND u.user_id = '.$userdata['user_id'].' ORDER BY t.topic_time DESC LIMIT ' . $core->return_limit; } } else { $sql = 'SELECT t.topic_id, t.topic_title, t.topic_replies, t.topic_time, u.user_timezone, u.user_dateformat FROM ' . FORUMS_TABLE . ' f, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u WHERE (t.forum_id = f.forum_id) AND (f.auth_view < 1) AND (f.auth_read < 1) AND (t.topic_status <> 2) AND (t.topic_time < '.$current_time.') AND u.user_id = 2 ORDER BY t.topic_time DESC LIMIT ' . $core->return_limit; } $result = $core->sql_query($sql, 'Couldn\'t retrieve topic data'); $topic_data = $core->sql_fetchrowset($result); $core->set_data($topic_data); // // Now this one could get a big beast // We will explain the structure, no fear, but not now. :D // $core->define_view('set_rows', array( '$core->pre_defined()', '$core->generate_link(append_sid($phpbb_root_path . \'viewtopic.php?t=\' . $core->data(\'topic_id\')), $core->data(\'topic_title\'), \'target="_blank"\')', 'create_date($core->data(\'user_dateformat\'), $core->data(\'topic_time\'), $core->data(\'user_timezone\'))', '$core->data(\'topic_replies\')' ) ); $core->run_module(); ?>ÌÌÿMODÿÌÌ