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]
Advanced Karma
[/name]
# Module Directory Name
[short_name]
advanced_karma
[/short_name]
# your name
[author]
Wicher
Original author: ComradeF
[/author]
# your email
[email]
N/A
...
[/email]
# your webpage url
[url]
http://www.detecties.com/phpbb2018
[/url]
# module version
[version]
3.0.1
[/version]
# required minimum Statistics Mod Version
[stats_mod_version]
3.0.1
[/stats_mod_version]
# default update time
[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 Karma points users gave to one and other.
Requires Advanced Karma Mod: http://siava.ru/forum/topic168.html
[/extra_info]
ÌÌÿINFOÿÌÌÿüÌLANGÌüÿInstalleer de Mod (http://siava.ru/forum/topic168.html) of deactiveer deze module.';
// [/lang_dutch]
// [lang_english]
$lang['module_name'] = 'Karma Points';
$lang['High'] = 'Positive';
$lang['Low'] = 'Negative';
$lang['Error_message'] = 'The Advanced Karma Mod have to be installed in order to see the Karma Points.
Install the Mod (http://siava.ru/forum/topic168.html) or deactivate this module.';
// [/lang_english]
// [lang_german]
$lang['module_name'] = 'Karmapunkte';
$lang['High'] = 'Positiv';
$lang['Low'] = 'Negativ';
$lang['Error_message'] = 'Der Advanced Karma Mod müssen angebracht werden, um die Karma-Punkte zu sehen.
Bringen Sie den Mod an (http://siava.ru/forum/topic168.html) oder entaktivieren Sie dieses Modul.';
// [/lang_german]
?>ÌÌÿLANGÿÌÌÿüÌMODÌüÿstart_module(true);
$core->set_content('statistical');
$core->set_view('rows', $core->return_limit);
$core->set_view('columns', 7);
$core->define_view('set_columns', array(
$core->pre_defined('rank'),
'date' => $lang['High'],
'user' => $lang['name'],
'empty' => ' ',
$core->pre_defined('rank'),
'date2' => $lang['Low'],
'user2' => $lang['name'])
);
$core->set_header($lang['module_name']);
$core->assign_defined_view('align_rows', array(
'left',
'center',
'left',
'center',
'left',
'center',
'left')
);
$core->assign_defined_view('width_rows', array(
'10%',
'10%',
'10%',
'40%',
'10%',
'10%',
'10%')
);
// check if mod installed
$sql = "SELECT karma_plus FROM " . USERS_TABLE . " ORDER BY karma_plus DESC LIMIT 1";
if (!$result = $db->sql_query($sql))
{
$there=0;
}
else
{
$there=1;
}
if ($there == 0)
{
message_die(GENERAL_MESSAGE, $lang['Error_message']);
}
// ------------------------- BEGIN HIGH KARMA-------------------------
$sql = 'SELECT user_id, username, karma_plus
FROM ' . USERS_TABLE . '
WHERE (user_id <> ' . ANONYMOUS . ' )
ORDER BY karma_plus DESC
LIMIT ' . $core->return_limit;
$result = $core->sql_query($sql, 'Shit, that didn\'t work');
$user_count_high = $core->sql_numrows($result);
$user_data_high = $core->sql_fetchrowset($result);
// ------------------------- END HIGH KARMA-------------------------
// ------------------------- BEGIN LOW KARMA-------------------------
$sql = 'SELECT user_id, username, karma_minus
FROM ' . USERS_TABLE . '
WHERE (user_id <> ' . ANONYMOUS . ' )
ORDER BY karma_minus DESC
LIMIT ' . $core->return_limit;
$result = $core->sql_query($sql, 'Shit, that didn\'t work');
$user_count_low = $core->sql_numrows($result);
$user_data_low = $core->sql_fetchrowset($result);
// ------------------------- END LOW KARMA-------------------------
if ($user_count_high >= $user_count_low)
{
$usercount = $user_count_high;
}
else
{
$usercount = $user_count_low;
}
$karmadata = array();
for ($i = 0; $i < $usercount; $i++)
{
$karmadata[] = array('username_high' => $user_data_high[$i]['username'],
'user_id_high' => $user_data_high[$i]['user_id'],
'user_karma_plus' => '+'.$user_data_high[$i]['karma_plus'],
'divider' => '

',
'username_low' => $user_data_low[$i]['username'],
'user_id_low' => $user_data_low[$i]['user_id'],
'user_karma_minus' => '-'.$user_data_low[$i]['karma_minus']
);
}
$core->set_data($karmadata);
$core->define_view('set_rows', array(
'$core->pre_defined()',
'$core->data(\'user_karma_plus\')',
'$core->generate_link(append_sid($phpbb_root_path . \'profile.php?mode=viewprofile&u=\' . $core->data(\'user_id_high\')), $core->data(\'username_high\'), \'target="_blank"\')',
'$core->data(\'divider\')',
'$core->pre_defined()',
'$core->data(\'user_karma_minus\')',
'$core->generate_link(append_sid($phpbb_root_path . \'profile.php?mode=viewprofile&u=\' . $core->data(\'user_id_low\')), $core->data(\'username_low\'), \'target="_blank"\')')
);
$core->run_module();
?>ÌÌÿMODÿÌÌ