This will add the ability to give users karma points
- Add positive and negative karma points
- Add comments to the karma you give
- Manage point display (total or separate)
- Hour based waiting period
- Require a certain number of posts before being allowed to give karma points
- Allow admins to give points all the time, no matter if there is a time lag or a post count
- Select who will get the time lag
- Manage all the above options through the admin panel
For enable or disable this MOD go to...
ACP -> Configuration -> Forum -> Karma Settings
Spoiler: [ Show ]
Spoiler: [ Hide ]
##############################################################
## MOD Title: Advanced Karma Mod for Icy Phoenix 1.2.0.27
## MOD Author: Nome < > 162783614
## MOD Author for Icy: ThE KuKa < webmasterATphpbb-es.com > http://www.phpbb-es.com
## MOD Version: 2.5.3
## MOD Description: This will add the ability to give users karma points
## - add positive and negative karma points
## - add comments to the karma you give
## - manage point display (total or separate)
## - hour based waiting period
## - require a certain number of posts before being
## allowed to give karma points
## - allow admins to give points all the time, no matter
## if there is a time lag or a post count
## - select who will get the time lag
## - manage all the above options through the admin panel
##
## Installation Level: Easy
## Installation Time: 10 Minutes
##
## Files To Edit: 11
## adm/admin_board.php
## includes/constants.php
## includes/page_header.php
## includes/usercp_viewprofile.php
## viewtopic.php
## language/lang_english/lang_admin.php
## language/lang_english/lang_main.php
## templates/common/ACP/board_config_body.tpl
## templates/mg_themes/overall_header.tpl
## templates/mg_themes/profile_view_body.tpl
## templates/mg_themes/mg_themes.cfg
## templates/mg_themes/viewtopic_body.tpl
##
## Included Files: 5
## db_update.php
## karma.php
## templates/mg_themes/karma_body.tpl
## templates/mg_themes/images/ice/icon_plus.gif
## templates/mg_themes/images/ice/icon_minus.gif
##
##############################################################
## This MOD is released under the GPL License.
## Intellectual Property is retained by the MOD Author(s) listed above
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]-------------------------------------------
# Or upload to the root folder and run the file db_update.php
CREATE TABLE phpbb_karma_comments (
karma_id mediumint(8) NOT NULL auto_increment,
karma_to mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
karma_from mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
karma_desc char(255) NOT NULL,
karma_date int(11) DEFAULT '0' NOT NULL,
karma_key tinyint(1) DEFAULT '0' NOT NULL,
karma_viewed tinyint(1) DEFAULT '0' NOT NULL,
PRIMARY KEY (karma_id)
);
INSERT INTO `phpbb_config` SET `config_name`='karma_comments', `config_value`='0';
INSERT INTO `phpbb_config` SET `config_name`='karma_comments_obligatory', `config_value`='0';
INSERT INTO `phpbb_config` SET `config_name`='karma_comments_max', `config_value`='3';
INSERT INTO `phpbb_config` SET `config_name`='karma_onoff', `config_value`='1';
INSERT INTO `phpbb_config` SET `config_name`='simple_karma', `config_value`='0';
INSERT INTO `phpbb_config` SET `config_name`='time_between_karma', `config_value`='24';
INSERT INTO `phpbb_config` SET `config_name`='admin_karma', `config_value`='1';
INSERT INTO `phpbb_config` SET `config_name`='min_post_karma', `config_value`='0';
INSERT INTO `phpbb_config` SET `config_name`='lag_karmer', `config_value`='1';
ALTER TABLE `phpbb_users` ADD `karma_plus` MEDIUMINT DEFAULT '0' NOT NULL ;
ALTER TABLE `phpbb_users` ADD `karma_minus` MEDIUMINT DEFAULT '0' NOT NULL ;
ALTER TABLE `phpbb_users` ADD `karma_time` BIGINT DEFAULT '0' NOT NULL ;
#
# NOTE: 'phpbb_' is our $table_prefix
#
#
#-----[ COPY ]------------------------------------------
#
copy karma.php to karma.php
copy templates/mg_themes/karma_body.tpl to templates/mg_themes/karma_body.tpl
copy templates/mg_themes/images/ice/icon_plus.gif to templates/mg_themes/images/ice/icon_plus.gif
copy templates/mg_themes/images/ice/icon_minus.gif to templates/mg_themes/images/ice/icon_plus.gif
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------
#
$avatars_upload_yes = ( $new['allow_avatar_upload'] ) ? 'checked="checked"' : '';
$avatars_upload_no = ( !$new['allow_avatar_upload'] ) ? 'checked="checked"' : '';
#
#-----[ AFTER, ADD ]------------------------------------
#
$simple_karma_yes = ($new['simple_karma']) ? 'checked="checked"' : '';
$simple_karma_no = (!$new['simple_karma']) ? 'checked="checked"' : '';
$admin_karma_yes = ($new['admin_karma']) ? 'checked="checked"' : '';
$admin_karma_no = (!$new['admin_karma']) ? 'checked="checked"' : '';
$lag_karmer_yes = ($new['lag_karmer']) ? 'checked="checked"' : '';
$lag_karmer_no = (!$new['lag_karmer']) ? 'checked="checked"' : '';
$karma_comments_yes = ($new['karma_comments']) ? 'checked="checked"' : '';
$karma_comments_no = (!$new['karma_comments']) ? 'checked="checked"' : '';
$karma_comments_obligatory_yes = ($new['karma_comments_obligatory']) ? 'checked="checked"' : '';
$karma_comments_obligatory_no = (!$new['karma_comments_obligatory']) ? 'checked="checked"' : '';
$karma_onoff_yes = ($new['karma_onoff']) ? 'checked="checked"' : '';
$karma_onoff_no = (!$new['karma_onoff']) ? 'checked="checked"' : '';
#
#-----[ FIND ]------------------------------------------
#
'L_AVATAR_GALLERY_PATH_EXPLAIN' => $lang['Avatar_gallery_path_explain'],
#
#-----[ AFTER, ADD ]------------------------------------
#
'L_KARMA_SETTINGS' => $lang['Karma_Settings'],
'L_SIMPLE_KARMA' => $lang['Simple_Karma'],
'L_SIMPLE_KARMA_EXPLAIN' => $lang['Simple_Karma_explain'],
'L_TIME_BETWEEN_KARMA' => $lang['Time_Between_Karma'],
'L_TIME_BETWEEN_KARMA_EXPLAIN' => $lang['Time_Between_Karma_explain'],
'L_ALLOW_ADMIN_KARMA' => $lang['Allow_Admin_Karma'],
'L_ALLOW_ADMIN_KARMA_EXPLAIN' => $lang['Allow_Admin_Karma_explain'],
'L_MIN_POST_KARMA' => $lang['Min_Post_Karma'],
'L_MIN_POST_KARMA_EXPLAIN' => $lang['Min_Post_Karma_explain'],
'L_LAG_KARMER' => $lang['Lag_Karmer'],
'L_LAG_KARMER_EXPLAIN' => $lang['Lag_Karmer_explain'],
'L_KARMA_COMMENTS' => $lang['Karma_Comments'],
'L_KARMA_COMMENTS_EXPLAIN' => $lang['Karma_Comments_explain'],
'L_KARMA_COMMENTS_OBLIGATORY' => $lang['Karma_Comments_Obligatory'],
'L_KARMA_COMMENTS_OBLIGATORY_EXPLAIN' => $lang['Karma_Comments_Obligatory_explain'],
'L_KARMA_COMMENTS_MAX' => $lang['Karma_Comments_Max'],
'L_KARMA_COMMENTS_MAX_EXPLAIN' => $lang['Karma_Comments_Max_explain'],
'L_KARMA_ONOFF' => $lang['Karma_OnOff'],
'L_KARMA_ONOFF_EXPLAIN' => $lang['Karma_OnOff_explain'],
#
#-----[ FIND ]------------------------------------------
#
'AVATAR_GALLERY_PATH' => $new['avatar_gallery_path'],
#
#-----[ AFTER, ADD ]------------------------------------
#
'SIMPLE_KARMA_YES' => $simple_karma_yes,
'SIMPLE_KARMA_NO' => $simple_karma_no,
'TIME_BETWEEN_KARMA' => $new['time_between_karma'],
'ADMIN_KARMA_YES' => $admin_karma_yes,
'ADMIN_KARMA_NO' => $admin_karma_no,
'MIN_POST_KARMA' => $new['min_post_karma'],
'LAG_KARMER_YES' => $lag_karmer_yes,
'LAG_KARMER_NO' => $lag_karmer_no,
'KARMA_COMMENTS_YES' => $karma_comments_yes,
'KARMA_COMMENTS_NO' => $karma_comments_no,
'KARMA_COMMENTS_OBLIGATORY_YES' => $karma_comments_obligatory_yes,
'KARMA_COMMENTS_OBLIGATORY_NO' => $karma_comments_obligatory_no,
'KARMA_COMMENTS_MAX' => $new['karma_comments_max'],
'KARMA_ONOFF_YES' => $karma_onoff_yes,
'KARMA_ONOFF_NO' => $karma_onoff_no,
#
#-----[ OPEN ]------------------------------------------
#
includes/constants.php
#
#-----[ FIND ]------------------------------------------
#
define('VOTE_USERS_TABLE', $table_prefix . 'vote_voters');
#
#-----[ AFTER, ADD ]------------------------------------
#
define('KARMA_COMMENTS', $table_prefix.'karma_comments');
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
'L_MEMBERLIST' => $lang['Memberlist'],
#
#-----[ AFTER, ADD ]------------------------------------
#
'L_YOUR_KARMA' => $lang['Your_Karma'],
#
#-----[ FIND ]------------------------------------------
#
'U_MEMBERLIST' => append_sid('memberlist.'.$phpEx),
#
#-----[ AFTER, ADD ]------------------------------------
#
'U_YOUR_KARMA' => append_sid('karma.'.$phpEx),
#
#-----[ FIND ]------------------------------------------
#
if ( !empty($userdata['user_popup_pm']) )
{
$template->assign_block_vars('switch_enable_pm_popup', array());
}
#
#-----[ AFTER, ADD ]------------------------------------
#
if ( $board_config['karma_comments'] == 1 && $board_config['karma_onoff'] == 1 && $userdata['session_logged_in'] )
{
$sql = "SELECT COUNT(karma_id) AS karma_num FROM " . KARMA_COMMENTS . " WHERE karma_to = '" . $userdata['user_id'] . "' AND karma_viewed = '0'";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain karma information', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$karma_num = ( $row['karma_num'] ) ? $row['karma_num'] : 0;
$db->sql_freeresult($result);
$template->assign_block_vars('switch_show_karma', array('UNREAD' => (( $karma_num > 0 ) ? sprintf($lang['Unread'], $karma_num) : '' )));
}
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_viewprofile.php
#
#-----[ FIND ]------------------------------------------
#
'INTERESTS' => ( $profiledata['user_interests'] ) ? $profiledata['user_interests'] : ' ',
#
#-----[ AFTER, ADD ]------------------------------------
#
'KARMA' => ( $board_config['simple_karma'] == 1 ) ? $profiledata['karma_plus'] - $profiledata['karma_minus'] : '+' . $profiledata['karma_plus'] . '/-' . $profiledata['karma_minus'],
#
#-----[ FIND ]------------------------------------------
#
'L_INTERESTS' => $lang['Interests'],
#
#-----[ AFTER, ADD ]------------------------------------
#
'L_KARMA' => $lang['Karma'],
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
$message = sprintf($lang['Sorry_auth_read'], $is_auth['auth_read_type']);
message_die(GENERAL_MESSAGE, $message);
}
// End auth check
#
#-----[ AFTER, ADD ]------------------------------------
#
//
// Advanced Karma Mod
//
if ( $userdata['session_logged_in'] && isset($HTTP_GET_VARS['k']) && isset($HTTP_GET_VARS[POST_USERS_URL]) && $board_config['karma_onoff'] == 1 )
{
if ( $HTTP_GET_VARS['k'] == 'p' || $HTTP_GET_VARS['k'] == 'm' )
{
if ( $userdata['user_posts'] >= $board_config['min_post_karma'] || ( $board_config['admin_karma'] == 1 && $userdata['user_level'] == ADMIN ) )
{
$karma_time = $userdata['karma_time'];
if ( $board_config['lag_karmer'] == 0 )
{
$sql = "SELECT karma_time FROM " . USERS_TABLE . " WHERE user_id = '" . intval($HTTP_GET_VARS[POST_USERS_URL]) . "'";
if ($result = $db->sql_query($sql))
{
while ($row = $db->sql_fetchrow($result))
{
$db->sql_freeresult($result);
$karma_time = $row['karma_time'];
}
}
$db->sql_freeresult($result);
}
if ( ( time() - $karma_time > $board_config['time_between_karma'] * 3600 ) || ( ( $board_config['admin_karma'] == 1 ) && ( $userdata['user_level'] == ADMIN ) ) )
{
$sql = ( $HTTP_GET_VARS['k'] == 'p' ) ? "UPDATE " . USERS_TABLE . " SET karma_plus = karma_plus + 1 WHERE user_id = '" . intval($HTTP_GET_VARS[POST_USERS_URL]) . "'" : "UPDATE " . USERS_TABLE . " SET karma_minus = karma_minus + 1 WHERE user_id = '" . intval($HTTP_GET_VARS[POST_USERS_URL]) . "'" ;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update user karma', '', __LINE__, __FILE__, $sql);
}
$sql = ( $board_config['lag_karmer'] == 1 ) ? "UPDATE " . USERS_TABLE . " SET karma_time = '" . time() . "' WHERE user_id = '" . $userdata['user_id'] . "'" : "UPDATE " . USERS_TABLE . " SET karma_time = '" . time() . "' WHERE user_id = '" . intval($HTTP_GET_VARS[POST_USERS_URL]) . "'";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update user karma time', '', __LINE__, __FILE__, $sql);
}
$temp_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $HTTP_GET_VARS[POST_POST_URL] . "&start=" . $start) . "#" . $HTTP_GET_VARS[POST_POST_URL];
header("Location: " . $temp_url);
}
}
}
}
#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_from_flag, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_skype, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_rank2, u.user_rank3, u.user_rank4, u.user_rank5, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile,
#
#-----[ IN-LINE, FIND ]---------------------------------
#
u.user_allowsmile
#
#-----[ IN-LINE AFTER, ADD ]----------------------------
#
, u.karma_plus, u.karma_minus, u.karma_time
#
#-----[ FIND ]------------------------------------------
#
$poster_avatar = user_get_avatar($poster_id, $postrow[$i]['user_avatar'], $postrow[$i]['user_avatar_type'], $postrow[$i]['user_allowavatar']);
#
#-----[ AFTER, ADD ]------------------------------------
#
//
// Advanced Karma Mod
//
$karma = '';
if ( $userdata['session_logged_in'] && $poster_id != ANONYMOUS && $board_config['karma_onoff'] == 1)
{
$karma = '<br />' . $lang['Karma'] . ' ' . ( ( $board_config['simple_karma'] == 1 ) ? $postrow[$i]['karma_plus'] - $postrow[$i]['karma_minus'] : '+' . $postrow[$i]['karma_plus'] . '/-' . $postrow[$i]['karma_minus'] );
if ( $userdata['user_id'] != $poster_id && ( $userdata['user_posts'] >= $board_config['min_post_karma'] || ( $board_config['admin_karma'] == 1 && $userdata['user_level'] == ADMIN ) ) )
{
$karma_time = ( $board_config['lag_karmer'] == 1 ) ? $userdata['karma_time'] : $postrow[$i]['karma_time'];
if ( ( time() - $karma_time > $board_config['time_between_karma'] * 3600 ) || ( ( $board_config['admin_karma'] == 1 ) && ( $userdata['user_level'] == ADMIN ) ) )
{
if ( $board_config['karma_comments'] )
{
$temp_url = append_sid("karma.$phpEx?" . POST_USERS_URL . "=" . $poster_id . "&k=p");
$temp_url .= '"onclick="window.open('' . $temp_url . '', '_phpbbkarma', 'HEIGHT=300,resizable=yes,scrollbars=yes,WIDTH=500');return false;" target="_phpbbkarma';
}
else
{
$temp_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&" . POST_USERS_URL . "=" . $poster_id . "&start=" . $start . "&k=p") . "#" . $postrow[$i]['post_id'];
}
$karma .= ' <a href="' . $temp_url . '"><img src="' . $images['icon_plus'] . '" alt="' . $lang['Karma_Plus'] . '" title="' . $lang['Karma_Plus'] . '" width="11" height="11" border="0" /></a>';
if ( $board_config['karma_comments'] )
{
$temp_url = append_sid("karma.$phpEx?" . POST_USERS_URL . "=" . $poster_id . "&k=m");
$temp_url .= '"onclick="window.open('' . $temp_url . '', '_phpbbkarma', 'HEIGHT=300,resizable=yes,scrollbars=yes,WIDTH=500');return false;" target="_phpbbkarma';
}
else
{
$temp_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&" . POST_USERS_URL . "=" . $poster_id . "&start=" . $start . "&k=m") . "#" . $postrow[$i]['post_id'];
}
$karma .= ' <a href="' . $temp_url . '"><img src="' . $images['icon_minus'] . '" alt="' . $lang['Karma_Minus'] . '" title="' . $lang['Karma_Minus'] . '" width="11" height="11" border="0" /></a>';
}
}
}
#
#-----[ FIND ]------------------------------------------
#
'POSTER_AVATAR' => $poster_avatar,
#
#-----[ AFTER, ADD ]------------------------------------
#
'KARMA' => $karma,
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
# Partial line...
$lang['Login_reset_time_explain'] =
#
#-----[ AFTER, ADD ]------------------------------------
#
//
// Advanced Karma Mod
//
$lang['Karma_Settings'] = 'Karma settings';
$lang['Simple_Karma'] = 'Display simple karma';
$lang['Simple_Karma_explain'] = 'Display a sum of positive and negative karma';
$lang['Time_Between_Karma'] = 'Time between point giving';
$lang['Time_Between_Karma_explain'] = 'A timespan when user can not give karma points (in hours)';
$lang['Allow_Admin_Karma'] = 'Allow admins add karma at any time';
$lang['Allow_Admin_Karma_explain'] = 'This works if there is a sertain period lag set for adding karma';
$lang['Min_Post_Karma'] = 'Minimal number of posts';
$lang['Min_Post_Karma_explain'] = 'Minimal number of posts a person schould have before he is allowed to add karma points';
$lang['Lag_Karmer'] = 'Lag the person who gives karma points';
$lang['Lag_Karmer_explain'] = 'Give time lag to a person who gives karma points. If set to no the person who receives the points will be lagged';
$lang['Karma_Comments'] = 'Allow comments';
$lang['Karma_Comments_explain'] = 'Allow users to post comments when giving karma';
$lang['Karma_Comments_Obligatory'] = 'Users must post comments';
$lang['Karma_Comments_Obligatory_explain'] = 'Users cannot give a karma point without leaving a comment. This works only if comments are on';
$lang['Karma_Comments_Max'] = 'Maximum comments';
$lang['Karma_Comments_Max_explain'] = 'Maximum comments kept in the database for this user';
$lang['Karma_OnOff'] = 'Enable karma mod';
$lang['Karma_OnOff_explain'] = 'Turn karma mod on and off';
#
#-----[ OPEN ]------------------------------------------
# Partial line...
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Please_remove_install_contrib'] =
#
#-----[ AFTER, ADD ]------------------------------------
#
//
// Advanced Karma Mod
//
$lang['Karma'] = 'Karma:';
$lang['Karma_Plus'] = 'Give positive karma';
$lang['Karma_Minus'] = 'Give negative karma';
$lang['Your_Karma'] = 'Comments to your karma';
$lang['Karma_Comment'] = 'Your comment:';
$lang['Must_Comment'] = 'You must leave a comment in order to change karma!';
$lang['Comment_Added'] = 'Your comment was successfully added!';
$lang['Give_Positive'] = 'You want to give positive karma to <b>%s</b>';
$lang['Give_Negative'] = 'You want to give negative karma to <b>%s</b>';
$lang['Positive_Karma'] = 'Positive karma';
$lang['Negative_Karma'] = 'Negative karma';
$lang['Unread'] = ' (<b>%s</b> unread)';
$lang['No_Karma_Yet'] = 'You can't give karma yet!';
#
#-----[ OPEN ]------------------------------------------
#
templates/common/ACP/board_config_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr><th colspan="2">{L_SHOUTBOX_CONFIG}</th></tr>
#
#-----[ BEFORE, ADD ]------------------------------------
#
<tr>
<th class="thHead" colspan="2">{L_KARMA_SETTINGS}</th>
</tr>
<tr>
<td class="row1">{L_KARMA_ONOFF} <br /><span class="gensmall">{L_KARMA_ONOFF_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="karma_onoff" value="1" {KARMA_ONOFF_YES} /> {L_YES} <input type="radio" name="karma_onoff" value="0" {KARMA_ONOFF_NO} /> {L_NO}</td>
</tr>
<tr>
<td class="row1">{L_SIMPLE_KARMA} <br /><span class="gensmall">{L_SIMPLE_KARMA_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="simple_karma" value="1" {SIMPLE_KARMA_YES} /> {L_YES} <input type="radio" name="simple_karma" value="0" {SIMPLE_KARMA_NO} /> {L_NO}</td>
</tr>
<tr>
<td class="row1">{L_TIME_BETWEEN_KARMA} <br /><span class="gensmall">{L_TIME_BETWEEN_KARMA_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="time_between_karma" value="{TIME_BETWEEN_KARMA}" /></td>
</tr>
<tr>
<td class="row1">{L_ALLOW_ADMIN_KARMA} <br /><span class="gensmall">{L_ALLOW_ADMIN_KARMA_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="admin_karma" value="1" {ADMIN_KARMA_YES} /> {L_YES} <input type="radio" name="admin_karma" value="0" {ADMIN_KARMA_NO} /> {L_NO}</td>
</tr>
<tr>
<td class="row1">{L_MIN_POST_KARMA} <br /><span class="gensmall">{L_MIN_POST_KARMA_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="min_post_karma" value="{MIN_POST_KARMA}" /></td>
</tr>
<tr>
<td class="row1">{L_LAG_KARMER} <br /><span class="gensmall">{L_LAG_KARMER_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="lag_karmer" value="1" {LAG_KARMER_YES} /> {L_YES} <input type="radio" name="lag_karmer" value="0" {LAG_KARMER_NO} /> {L_NO}</td>
</tr>
<tr>
<td class="row1">{L_KARMA_COMMENTS} <br /><span class="gensmall">{L_KARMA_COMMENTS_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="karma_comments" value="1" {KARMA_COMMENTS_YES} /> {L_YES} <input type="radio" name="karma_comments" value="0" {KARMA_COMMENTS_NO} /> {L_NO}</td>
</tr>
<tr>
<td class="row1">{L_KARMA_COMMENTS_OBLIGATORY} <br /><span class="gensmall">{L_KARMA_COMMENTS_OBLIGATORY_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="karma_comments_obligatory" value="1" {KARMA_COMMENTS_OBLIGATORY_YES} /> {L_YES} <input type="radio" name="karma_comments_obligatory" value="0" {KARMA_COMMENTS_OBLIGATORY_NO} /> {L_NO}</td>
</tr>
<tr>
<td class="row1">{L_KARMA_COMMENTS_MAX}<br /><span class="gensmall">{L_KARMA_COMMENTS_MAX_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="2" maxlength="2" name="karma_comments_max" value="{KARMA_COMMENTS_MAX}" /></td>
</tr>
#
#-----[ OPEN ]------------------------------------------
#
templates/mg_themes/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
<a href="{FULL_SITE_PATH}{U_INDEX}">{L_INDEX}</a> <img src="{FULL_SITE_PATH}{IMG_MENU_SEP}" alt="" />
#
#-----[ AFTER, ADD ]------------------------------------
#
<!-- BEGIN switch_show_karma -->
<a href="{U_YOUR_KARMA}" onclick="window.open('{U_YOUR_KARMA}', '_phpbbkarma', 'HEIGHT=300,resizable=yes,scrollbars=yes,WIDTH=500');return false;" target="_phpbbkarma" class="mainmenu">{L_YOUR_KARMA}{switch_show_karma.UNREAD}</a> <img src="{FULL_SITE_PATH}{IMG_MENU_SEP}" alt="" />
<!-- END switch_show_karma -->
#
#-----[ OPEN ]------------------------------------------
#
templates/mg_themes/profile_view_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row2" valign="top"><b><span class="genmed">{L_INTERESTS}</span></b></td>
<td class="row1"><span class="genmed">{INTERESTS}</span></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------
#
<tr>
<td class="row2" valign="top"><b><span class="genmed">{L_KARMA}</span></b></td>
<td class="row1"><span class="genmed">{KARMA}</span></td>
</tr>
#
#-----[ OPEN ]------------------------------------------
#
templates/mg_themes/mg_themes.cfg
#
#-----[ FIND ]------------------------------------------
#
$images['voting_graphic_red_right'] = $current_template_images . 'vote_rcap_red.gif';
#
#-----[ AFTER, ADD ]------------------------------------
#
$images['icon_plus'] = $current_template_images . 'icon_plus.gif';
$images['icon_minus'] = $current_template_images . 'icon_minus.gif';
#
#-----[ OPEN ]------------------------------------------
#
templates/mg_themes/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------
#
{postrow.POSTER_POSTS}<br />
#
#-----[ AFTER, ADD ]----------------------------
#
{postrow.KARMA}<br />
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
## MOD Title: Advanced Karma Mod for Icy Phoenix 1.2.0.27
## MOD Author: Nome < > 162783614
## MOD Author for Icy: ThE KuKa < webmasterATphpbb-es.com > http://www.phpbb-es.com
## MOD Version: 2.5.3
## MOD Description: This will add the ability to give users karma points
## - add positive and negative karma points
## - add comments to the karma you give
## - manage point display (total or separate)
## - hour based waiting period
## - require a certain number of posts before being
## allowed to give karma points
## - allow admins to give points all the time, no matter
## if there is a time lag or a post count
## - select who will get the time lag
## - manage all the above options through the admin panel
##
## Installation Level: Easy
## Installation Time: 10 Minutes
##
## Files To Edit: 11
## adm/admin_board.php
## includes/constants.php
## includes/page_header.php
## includes/usercp_viewprofile.php
## viewtopic.php
## language/lang_english/lang_admin.php
## language/lang_english/lang_main.php
## templates/common/ACP/board_config_body.tpl
## templates/mg_themes/overall_header.tpl
## templates/mg_themes/profile_view_body.tpl
## templates/mg_themes/mg_themes.cfg
## templates/mg_themes/viewtopic_body.tpl
##
## Included Files: 5
## db_update.php
## karma.php
## templates/mg_themes/karma_body.tpl
## templates/mg_themes/images/ice/icon_plus.gif
## templates/mg_themes/images/ice/icon_minus.gif
##
##############################################################
## This MOD is released under the GPL License.
## Intellectual Property is retained by the MOD Author(s) listed above
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]-------------------------------------------
# Or upload to the root folder and run the file db_update.php
CREATE TABLE phpbb_karma_comments (
karma_id mediumint(8) NOT NULL auto_increment,
karma_to mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
karma_from mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
karma_desc char(255) NOT NULL,
karma_date int(11) DEFAULT '0' NOT NULL,
karma_key tinyint(1) DEFAULT '0' NOT NULL,
karma_viewed tinyint(1) DEFAULT '0' NOT NULL,
PRIMARY KEY (karma_id)
);
INSERT INTO `phpbb_config` SET `config_name`='karma_comments', `config_value`='0';
INSERT INTO `phpbb_config` SET `config_name`='karma_comments_obligatory', `config_value`='0';
INSERT INTO `phpbb_config` SET `config_name`='karma_comments_max', `config_value`='3';
INSERT INTO `phpbb_config` SET `config_name`='karma_onoff', `config_value`='1';
INSERT INTO `phpbb_config` SET `config_name`='simple_karma', `config_value`='0';
INSERT INTO `phpbb_config` SET `config_name`='time_between_karma', `config_value`='24';
INSERT INTO `phpbb_config` SET `config_name`='admin_karma', `config_value`='1';
INSERT INTO `phpbb_config` SET `config_name`='min_post_karma', `config_value`='0';
INSERT INTO `phpbb_config` SET `config_name`='lag_karmer', `config_value`='1';
ALTER TABLE `phpbb_users` ADD `karma_plus` MEDIUMINT DEFAULT '0' NOT NULL ;
ALTER TABLE `phpbb_users` ADD `karma_minus` MEDIUMINT DEFAULT '0' NOT NULL ;
ALTER TABLE `phpbb_users` ADD `karma_time` BIGINT DEFAULT '0' NOT NULL ;
#
# NOTE: 'phpbb_' is our $table_prefix
#
#
#-----[ COPY ]------------------------------------------
#
copy karma.php to karma.php
copy templates/mg_themes/karma_body.tpl to templates/mg_themes/karma_body.tpl
copy templates/mg_themes/images/ice/icon_plus.gif to templates/mg_themes/images/ice/icon_plus.gif
copy templates/mg_themes/images/ice/icon_minus.gif to templates/mg_themes/images/ice/icon_plus.gif
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------
#
$avatars_upload_yes = ( $new['allow_avatar_upload'] ) ? 'checked="checked"' : '';
$avatars_upload_no = ( !$new['allow_avatar_upload'] ) ? 'checked="checked"' : '';
#
#-----[ AFTER, ADD ]------------------------------------
#
$simple_karma_yes = ($new['simple_karma']) ? 'checked="checked"' : '';
$simple_karma_no = (!$new['simple_karma']) ? 'checked="checked"' : '';
$admin_karma_yes = ($new['admin_karma']) ? 'checked="checked"' : '';
$admin_karma_no = (!$new['admin_karma']) ? 'checked="checked"' : '';
$lag_karmer_yes = ($new['lag_karmer']) ? 'checked="checked"' : '';
$lag_karmer_no = (!$new['lag_karmer']) ? 'checked="checked"' : '';
$karma_comments_yes = ($new['karma_comments']) ? 'checked="checked"' : '';
$karma_comments_no = (!$new['karma_comments']) ? 'checked="checked"' : '';
$karma_comments_obligatory_yes = ($new['karma_comments_obligatory']) ? 'checked="checked"' : '';
$karma_comments_obligatory_no = (!$new['karma_comments_obligatory']) ? 'checked="checked"' : '';
$karma_onoff_yes = ($new['karma_onoff']) ? 'checked="checked"' : '';
$karma_onoff_no = (!$new['karma_onoff']) ? 'checked="checked"' : '';
#
#-----[ FIND ]------------------------------------------
#
'L_AVATAR_GALLERY_PATH_EXPLAIN' => $lang['Avatar_gallery_path_explain'],
#
#-----[ AFTER, ADD ]------------------------------------
#
'L_KARMA_SETTINGS' => $lang['Karma_Settings'],
'L_SIMPLE_KARMA' => $lang['Simple_Karma'],
'L_SIMPLE_KARMA_EXPLAIN' => $lang['Simple_Karma_explain'],
'L_TIME_BETWEEN_KARMA' => $lang['Time_Between_Karma'],
'L_TIME_BETWEEN_KARMA_EXPLAIN' => $lang['Time_Between_Karma_explain'],
'L_ALLOW_ADMIN_KARMA' => $lang['Allow_Admin_Karma'],
'L_ALLOW_ADMIN_KARMA_EXPLAIN' => $lang['Allow_Admin_Karma_explain'],
'L_MIN_POST_KARMA' => $lang['Min_Post_Karma'],
'L_MIN_POST_KARMA_EXPLAIN' => $lang['Min_Post_Karma_explain'],
'L_LAG_KARMER' => $lang['Lag_Karmer'],
'L_LAG_KARMER_EXPLAIN' => $lang['Lag_Karmer_explain'],
'L_KARMA_COMMENTS' => $lang['Karma_Comments'],
'L_KARMA_COMMENTS_EXPLAIN' => $lang['Karma_Comments_explain'],
'L_KARMA_COMMENTS_OBLIGATORY' => $lang['Karma_Comments_Obligatory'],
'L_KARMA_COMMENTS_OBLIGATORY_EXPLAIN' => $lang['Karma_Comments_Obligatory_explain'],
'L_KARMA_COMMENTS_MAX' => $lang['Karma_Comments_Max'],
'L_KARMA_COMMENTS_MAX_EXPLAIN' => $lang['Karma_Comments_Max_explain'],
'L_KARMA_ONOFF' => $lang['Karma_OnOff'],
'L_KARMA_ONOFF_EXPLAIN' => $lang['Karma_OnOff_explain'],
#
#-----[ FIND ]------------------------------------------
#
'AVATAR_GALLERY_PATH' => $new['avatar_gallery_path'],
#
#-----[ AFTER, ADD ]------------------------------------
#
'SIMPLE_KARMA_YES' => $simple_karma_yes,
'SIMPLE_KARMA_NO' => $simple_karma_no,
'TIME_BETWEEN_KARMA' => $new['time_between_karma'],
'ADMIN_KARMA_YES' => $admin_karma_yes,
'ADMIN_KARMA_NO' => $admin_karma_no,
'MIN_POST_KARMA' => $new['min_post_karma'],
'LAG_KARMER_YES' => $lag_karmer_yes,
'LAG_KARMER_NO' => $lag_karmer_no,
'KARMA_COMMENTS_YES' => $karma_comments_yes,
'KARMA_COMMENTS_NO' => $karma_comments_no,
'KARMA_COMMENTS_OBLIGATORY_YES' => $karma_comments_obligatory_yes,
'KARMA_COMMENTS_OBLIGATORY_NO' => $karma_comments_obligatory_no,
'KARMA_COMMENTS_MAX' => $new['karma_comments_max'],
'KARMA_ONOFF_YES' => $karma_onoff_yes,
'KARMA_ONOFF_NO' => $karma_onoff_no,
#
#-----[ OPEN ]------------------------------------------
#
includes/constants.php
#
#-----[ FIND ]------------------------------------------
#
define('VOTE_USERS_TABLE', $table_prefix . 'vote_voters');
#
#-----[ AFTER, ADD ]------------------------------------
#
define('KARMA_COMMENTS', $table_prefix.'karma_comments');
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
'L_MEMBERLIST' => $lang['Memberlist'],
#
#-----[ AFTER, ADD ]------------------------------------
#
'L_YOUR_KARMA' => $lang['Your_Karma'],
#
#-----[ FIND ]------------------------------------------
#
'U_MEMBERLIST' => append_sid('memberlist.'.$phpEx),
#
#-----[ AFTER, ADD ]------------------------------------
#
'U_YOUR_KARMA' => append_sid('karma.'.$phpEx),
#
#-----[ FIND ]------------------------------------------
#
if ( !empty($userdata['user_popup_pm']) )
{
$template->assign_block_vars('switch_enable_pm_popup', array());
}
#
#-----[ AFTER, ADD ]------------------------------------
#
if ( $board_config['karma_comments'] == 1 && $board_config['karma_onoff'] == 1 && $userdata['session_logged_in'] )
{
$sql = "SELECT COUNT(karma_id) AS karma_num FROM " . KARMA_COMMENTS . " WHERE karma_to = '" . $userdata['user_id'] . "' AND karma_viewed = '0'";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain karma information', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$karma_num = ( $row['karma_num'] ) ? $row['karma_num'] : 0;
$db->sql_freeresult($result);
$template->assign_block_vars('switch_show_karma', array('UNREAD' => (( $karma_num > 0 ) ? sprintf($lang['Unread'], $karma_num) : '' )));
}
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_viewprofile.php
#
#-----[ FIND ]------------------------------------------
#
'INTERESTS' => ( $profiledata['user_interests'] ) ? $profiledata['user_interests'] : ' ',
#
#-----[ AFTER, ADD ]------------------------------------
#
'KARMA' => ( $board_config['simple_karma'] == 1 ) ? $profiledata['karma_plus'] - $profiledata['karma_minus'] : '+' . $profiledata['karma_plus'] . '/-' . $profiledata['karma_minus'],
#
#-----[ FIND ]------------------------------------------
#
'L_INTERESTS' => $lang['Interests'],
#
#-----[ AFTER, ADD ]------------------------------------
#
'L_KARMA' => $lang['Karma'],
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
$message = sprintf($lang['Sorry_auth_read'], $is_auth['auth_read_type']);
message_die(GENERAL_MESSAGE, $message);
}
// End auth check
#
#-----[ AFTER, ADD ]------------------------------------
#
//
// Advanced Karma Mod
//
if ( $userdata['session_logged_in'] && isset($HTTP_GET_VARS['k']) && isset($HTTP_GET_VARS[POST_USERS_URL]) && $board_config['karma_onoff'] == 1 )
{
if ( $HTTP_GET_VARS['k'] == 'p' || $HTTP_GET_VARS['k'] == 'm' )
{
if ( $userdata['user_posts'] >= $board_config['min_post_karma'] || ( $board_config['admin_karma'] == 1 && $userdata['user_level'] == ADMIN ) )
{
$karma_time = $userdata['karma_time'];
if ( $board_config['lag_karmer'] == 0 )
{
$sql = "SELECT karma_time FROM " . USERS_TABLE . " WHERE user_id = '" . intval($HTTP_GET_VARS[POST_USERS_URL]) . "'";
if ($result = $db->sql_query($sql))
{
while ($row = $db->sql_fetchrow($result))
{
$db->sql_freeresult($result);
$karma_time = $row['karma_time'];
}
}
$db->sql_freeresult($result);
}
if ( ( time() - $karma_time > $board_config['time_between_karma'] * 3600 ) || ( ( $board_config['admin_karma'] == 1 ) && ( $userdata['user_level'] == ADMIN ) ) )
{
$sql = ( $HTTP_GET_VARS['k'] == 'p' ) ? "UPDATE " . USERS_TABLE . " SET karma_plus = karma_plus + 1 WHERE user_id = '" . intval($HTTP_GET_VARS[POST_USERS_URL]) . "'" : "UPDATE " . USERS_TABLE . " SET karma_minus = karma_minus + 1 WHERE user_id = '" . intval($HTTP_GET_VARS[POST_USERS_URL]) . "'" ;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update user karma', '', __LINE__, __FILE__, $sql);
}
$sql = ( $board_config['lag_karmer'] == 1 ) ? "UPDATE " . USERS_TABLE . " SET karma_time = '" . time() . "' WHERE user_id = '" . $userdata['user_id'] . "'" : "UPDATE " . USERS_TABLE . " SET karma_time = '" . time() . "' WHERE user_id = '" . intval($HTTP_GET_VARS[POST_USERS_URL]) . "'";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update user karma time', '', __LINE__, __FILE__, $sql);
}
$temp_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $HTTP_GET_VARS[POST_POST_URL] . "&start=" . $start) . "#" . $HTTP_GET_VARS[POST_POST_URL];
header("Location: " . $temp_url);
}
}
}
}
#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_from_flag, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_skype, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_rank2, u.user_rank3, u.user_rank4, u.user_rank5, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile,
#
#-----[ IN-LINE, FIND ]---------------------------------
#
u.user_allowsmile
#
#-----[ IN-LINE AFTER, ADD ]----------------------------
#
, u.karma_plus, u.karma_minus, u.karma_time
#
#-----[ FIND ]------------------------------------------
#
$poster_avatar = user_get_avatar($poster_id, $postrow[$i]['user_avatar'], $postrow[$i]['user_avatar_type'], $postrow[$i]['user_allowavatar']);
#
#-----[ AFTER, ADD ]------------------------------------
#
//
// Advanced Karma Mod
//
$karma = '';
if ( $userdata['session_logged_in'] && $poster_id != ANONYMOUS && $board_config['karma_onoff'] == 1)
{
$karma = '<br />' . $lang['Karma'] . ' ' . ( ( $board_config['simple_karma'] == 1 ) ? $postrow[$i]['karma_plus'] - $postrow[$i]['karma_minus'] : '+' . $postrow[$i]['karma_plus'] . '/-' . $postrow[$i]['karma_minus'] );
if ( $userdata['user_id'] != $poster_id && ( $userdata['user_posts'] >= $board_config['min_post_karma'] || ( $board_config['admin_karma'] == 1 && $userdata['user_level'] == ADMIN ) ) )
{
$karma_time = ( $board_config['lag_karmer'] == 1 ) ? $userdata['karma_time'] : $postrow[$i]['karma_time'];
if ( ( time() - $karma_time > $board_config['time_between_karma'] * 3600 ) || ( ( $board_config['admin_karma'] == 1 ) && ( $userdata['user_level'] == ADMIN ) ) )
{
if ( $board_config['karma_comments'] )
{
$temp_url = append_sid("karma.$phpEx?" . POST_USERS_URL . "=" . $poster_id . "&k=p");
$temp_url .= '"onclick="window.open('' . $temp_url . '', '_phpbbkarma', 'HEIGHT=300,resizable=yes,scrollbars=yes,WIDTH=500');return false;" target="_phpbbkarma';
}
else
{
$temp_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&" . POST_USERS_URL . "=" . $poster_id . "&start=" . $start . "&k=p") . "#" . $postrow[$i]['post_id'];
}
$karma .= ' <a href="' . $temp_url . '"><img src="' . $images['icon_plus'] . '" alt="' . $lang['Karma_Plus'] . '" title="' . $lang['Karma_Plus'] . '" width="11" height="11" border="0" /></a>';
if ( $board_config['karma_comments'] )
{
$temp_url = append_sid("karma.$phpEx?" . POST_USERS_URL . "=" . $poster_id . "&k=m");
$temp_url .= '"onclick="window.open('' . $temp_url . '', '_phpbbkarma', 'HEIGHT=300,resizable=yes,scrollbars=yes,WIDTH=500');return false;" target="_phpbbkarma';
}
else
{
$temp_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&" . POST_USERS_URL . "=" . $poster_id . "&start=" . $start . "&k=m") . "#" . $postrow[$i]['post_id'];
}
$karma .= ' <a href="' . $temp_url . '"><img src="' . $images['icon_minus'] . '" alt="' . $lang['Karma_Minus'] . '" title="' . $lang['Karma_Minus'] . '" width="11" height="11" border="0" /></a>';
}
}
}
#
#-----[ FIND ]------------------------------------------
#
'POSTER_AVATAR' => $poster_avatar,
#
#-----[ AFTER, ADD ]------------------------------------
#
'KARMA' => $karma,
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
# Partial line...
$lang['Login_reset_time_explain'] =
#
#-----[ AFTER, ADD ]------------------------------------
#
//
// Advanced Karma Mod
//
$lang['Karma_Settings'] = 'Karma settings';
$lang['Simple_Karma'] = 'Display simple karma';
$lang['Simple_Karma_explain'] = 'Display a sum of positive and negative karma';
$lang['Time_Between_Karma'] = 'Time between point giving';
$lang['Time_Between_Karma_explain'] = 'A timespan when user can not give karma points (in hours)';
$lang['Allow_Admin_Karma'] = 'Allow admins add karma at any time';
$lang['Allow_Admin_Karma_explain'] = 'This works if there is a sertain period lag set for adding karma';
$lang['Min_Post_Karma'] = 'Minimal number of posts';
$lang['Min_Post_Karma_explain'] = 'Minimal number of posts a person schould have before he is allowed to add karma points';
$lang['Lag_Karmer'] = 'Lag the person who gives karma points';
$lang['Lag_Karmer_explain'] = 'Give time lag to a person who gives karma points. If set to no the person who receives the points will be lagged';
$lang['Karma_Comments'] = 'Allow comments';
$lang['Karma_Comments_explain'] = 'Allow users to post comments when giving karma';
$lang['Karma_Comments_Obligatory'] = 'Users must post comments';
$lang['Karma_Comments_Obligatory_explain'] = 'Users cannot give a karma point without leaving a comment. This works only if comments are on';
$lang['Karma_Comments_Max'] = 'Maximum comments';
$lang['Karma_Comments_Max_explain'] = 'Maximum comments kept in the database for this user';
$lang['Karma_OnOff'] = 'Enable karma mod';
$lang['Karma_OnOff_explain'] = 'Turn karma mod on and off';
#
#-----[ OPEN ]------------------------------------------
# Partial line...
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Please_remove_install_contrib'] =
#
#-----[ AFTER, ADD ]------------------------------------
#
//
// Advanced Karma Mod
//
$lang['Karma'] = 'Karma:';
$lang['Karma_Plus'] = 'Give positive karma';
$lang['Karma_Minus'] = 'Give negative karma';
$lang['Your_Karma'] = 'Comments to your karma';
$lang['Karma_Comment'] = 'Your comment:';
$lang['Must_Comment'] = 'You must leave a comment in order to change karma!';
$lang['Comment_Added'] = 'Your comment was successfully added!';
$lang['Give_Positive'] = 'You want to give positive karma to <b>%s</b>';
$lang['Give_Negative'] = 'You want to give negative karma to <b>%s</b>';
$lang['Positive_Karma'] = 'Positive karma';
$lang['Negative_Karma'] = 'Negative karma';
$lang['Unread'] = ' (<b>%s</b> unread)';
$lang['No_Karma_Yet'] = 'You can't give karma yet!';
#
#-----[ OPEN ]------------------------------------------
#
templates/common/ACP/board_config_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr><th colspan="2">{L_SHOUTBOX_CONFIG}</th></tr>
#
#-----[ BEFORE, ADD ]------------------------------------
#
<tr>
<th class="thHead" colspan="2">{L_KARMA_SETTINGS}</th>
</tr>
<tr>
<td class="row1">{L_KARMA_ONOFF} <br /><span class="gensmall">{L_KARMA_ONOFF_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="karma_onoff" value="1" {KARMA_ONOFF_YES} /> {L_YES} <input type="radio" name="karma_onoff" value="0" {KARMA_ONOFF_NO} /> {L_NO}</td>
</tr>
<tr>
<td class="row1">{L_SIMPLE_KARMA} <br /><span class="gensmall">{L_SIMPLE_KARMA_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="simple_karma" value="1" {SIMPLE_KARMA_YES} /> {L_YES} <input type="radio" name="simple_karma" value="0" {SIMPLE_KARMA_NO} /> {L_NO}</td>
</tr>
<tr>
<td class="row1">{L_TIME_BETWEEN_KARMA} <br /><span class="gensmall">{L_TIME_BETWEEN_KARMA_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="time_between_karma" value="{TIME_BETWEEN_KARMA}" /></td>
</tr>
<tr>
<td class="row1">{L_ALLOW_ADMIN_KARMA} <br /><span class="gensmall">{L_ALLOW_ADMIN_KARMA_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="admin_karma" value="1" {ADMIN_KARMA_YES} /> {L_YES} <input type="radio" name="admin_karma" value="0" {ADMIN_KARMA_NO} /> {L_NO}</td>
</tr>
<tr>
<td class="row1">{L_MIN_POST_KARMA} <br /><span class="gensmall">{L_MIN_POST_KARMA_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="min_post_karma" value="{MIN_POST_KARMA}" /></td>
</tr>
<tr>
<td class="row1">{L_LAG_KARMER} <br /><span class="gensmall">{L_LAG_KARMER_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="lag_karmer" value="1" {LAG_KARMER_YES} /> {L_YES} <input type="radio" name="lag_karmer" value="0" {LAG_KARMER_NO} /> {L_NO}</td>
</tr>
<tr>
<td class="row1">{L_KARMA_COMMENTS} <br /><span class="gensmall">{L_KARMA_COMMENTS_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="karma_comments" value="1" {KARMA_COMMENTS_YES} /> {L_YES} <input type="radio" name="karma_comments" value="0" {KARMA_COMMENTS_NO} /> {L_NO}</td>
</tr>
<tr>
<td class="row1">{L_KARMA_COMMENTS_OBLIGATORY} <br /><span class="gensmall">{L_KARMA_COMMENTS_OBLIGATORY_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="karma_comments_obligatory" value="1" {KARMA_COMMENTS_OBLIGATORY_YES} /> {L_YES} <input type="radio" name="karma_comments_obligatory" value="0" {KARMA_COMMENTS_OBLIGATORY_NO} /> {L_NO}</td>
</tr>
<tr>
<td class="row1">{L_KARMA_COMMENTS_MAX}<br /><span class="gensmall">{L_KARMA_COMMENTS_MAX_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="2" maxlength="2" name="karma_comments_max" value="{KARMA_COMMENTS_MAX}" /></td>
</tr>
#
#-----[ OPEN ]------------------------------------------
#
templates/mg_themes/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
<a href="{FULL_SITE_PATH}{U_INDEX}">{L_INDEX}</a> <img src="{FULL_SITE_PATH}{IMG_MENU_SEP}" alt="" />
#
#-----[ AFTER, ADD ]------------------------------------
#
<!-- BEGIN switch_show_karma -->
<a href="{U_YOUR_KARMA}" onclick="window.open('{U_YOUR_KARMA}', '_phpbbkarma', 'HEIGHT=300,resizable=yes,scrollbars=yes,WIDTH=500');return false;" target="_phpbbkarma" class="mainmenu">{L_YOUR_KARMA}{switch_show_karma.UNREAD}</a> <img src="{FULL_SITE_PATH}{IMG_MENU_SEP}" alt="" />
<!-- END switch_show_karma -->
#
#-----[ OPEN ]------------------------------------------
#
templates/mg_themes/profile_view_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row2" valign="top"><b><span class="genmed">{L_INTERESTS}</span></b></td>
<td class="row1"><span class="genmed">{INTERESTS}</span></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------
#
<tr>
<td class="row2" valign="top"><b><span class="genmed">{L_KARMA}</span></b></td>
<td class="row1"><span class="genmed">{KARMA}</span></td>
</tr>
#
#-----[ OPEN ]------------------------------------------
#
templates/mg_themes/mg_themes.cfg
#
#-----[ FIND ]------------------------------------------
#
$images['voting_graphic_red_right'] = $current_template_images . 'vote_rcap_red.gif';
#
#-----[ AFTER, ADD ]------------------------------------
#
$images['icon_plus'] = $current_template_images . 'icon_plus.gif';
$images['icon_minus'] = $current_template_images . 'icon_minus.gif';
#
#-----[ OPEN ]------------------------------------------
#
templates/mg_themes/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------
#
{postrow.POSTER_POSTS}<br />
#
#-----[ AFTER, ADD ]----------------------------
#
{postrow.KARMA}<br />
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Before adding this MOD to your Icy Phoenix, you should Backup all files related to this MOD and DB.
Demo: Testing Icy Site
| Advanced Karma MOD_IP12.rar | ||
| Description: | Advanced Karma Mod for Icy Phoenix 1.2.0.27 | ![]() Download |
| Filename: | Advanced Karma MOD_IP12.rar | |
| Filesize: | 10.85 KB | |
| Downloaded: | 479 Time(s) | |











Sabadell








Georgia

[Censor]
Classified
Toronto
