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] Least Interesting Topics [/name] # Module Directory Name [short_name] least_interesting_topics [/short_name] # your name [author] Wicher JRSweets Original Author (2.x Module): RustyDragon [/author] # your email [email] n/a [/email] # your webpage url [url] http://www.detecties.com/phpbb2018 http://www.jeffrusso.net [/url] # module version [version] 4.1.7 [/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 will show the least intresting topics. [/extra_info] ÌÌÿINFOÿÌÌÿüÌLANGÌüÿÌÌÿLANGÿÌÌÿüÌMODÌüÿstart_module(true); $core->set_content('statistical'); $core->set_view('rows', $core->return_limit); $core->set_view('columns', 3); $core->define_view('set_columns', array( $core->pre_defined('rank'), 'rate' => $lang['Rate'], 'topic' => $lang['Topic']) ); $core->set_header($lang['module_name']); $core->assign_defined_view('align_rows', array( 'left', 'center', 'left') ); $core->assign_defined_view('width_rows', array( '', '20%', '') ); $current_time = time(); if ( $userdata['session_logged_in'] ) { if ($userdata['user_level'] == ADMIN) { $sql = 'SELECT topic_id, forum_id, topic_title, topic_replies, topic_views, round(topic_views/(topic_replies + 1),2) AS k FROM ' . TOPICS_TABLE . ' ORDER BY k ASC LIMIT ' . $core->return_limit; } else if ($userdata['user_level'] == MOD) { $sql = 'SELECT t.topic_id, t.forum_id, t.topic_title, t.topic_replies, t.topic_views, t.topic_views/(t.topic_replies + 1) AS k FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . ' f WHERE (t.topic_status <> 2) AND (t.topic_time < '.$current_time.') AND (t.topic_replies > 0) AND (t.forum_id = f.forum_id) AND (f.auth_view <> 2) AND (f.auth_read <> 2) ORDER BY k ASC LIMIT ' . $core->return_limit; } else if (($userdata['user_level'] != ADMIN)or($userdata['user_level'] != MOD)) { $sql = 'SELECT t.topic_id, t.forum_id, t.topic_title, t.topic_replies, t.topic_views, round(t.topic_views/(t.topic_replies + 1),2) AS k FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . ' f WHERE (t.topic_status <> 2) AND (t.topic_time < '.$current_time.') AND (t.topic_replies > 0) AND (t.forum_id = f.forum_id) AND (f.auth_view < 2) AND (f.auth_read < 2) ORDER BY k ASC LIMIT ' . $core->return_limit; } } else { $sql = 'SELECT t.topic_id, t.forum_id, t.topic_title, t.topic_replies, t.topic_views, round(t.topic_views/(t.topic_replies + 1),2) AS k FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . ' f WHERE (t.topic_status <> 2) AND (t.topic_time < '.$current_time.') AND (t.topic_replies > 0) AND (t.forum_id = f.forum_id) AND (f.auth_view < 1) AND (f.auth_read < 1) ORDER BY k ASC 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->data(\'k\')', '$core->generate_link(append_sid(\'viewtopic.php?t=\' . $core->data(\'topic_id\')), $core->data(\'topic_title\'), \'target="_blank"\')' )); $core->run_module(); ?>ÌÌÿMODÿÌÌ