##############################################################
## MOD Title: Advanced Karma Mod - EM Friendly
## MOD Author: Nome < nome@bk.ru > 162783614
## 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
##	admin/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/subSilver/admin/board_config_body.tpl
##	templates/subSilver/overall_header.tpl
##	templates/subSilver/profile_view_body.tpl
##	templates/subSilver/subSilver.cfg
##	templates/subSilver/viewtopic_body.tpl
##
## Included Files: 5
##	db_update.php
##	karma.php
##	templates/subSilver/karma_body.tpl
##	templates/subSilver/images/icon_plus.gif
##	templates/subSilver/images/icon_minus.gif 
##
##############################################################
## Author Notes: The 2.0.0 and above versions differ from 1.x.x
##		 versions by a thousand bytes worth of symbols.
##		 So if you have the 1.x.x version installed you
##		 must delete it! This is an entirely new piece
##		 of code with only the name reminding of the old
##		 mod. Enjoy! And write to me should there be any
##		 problems.
##
##		The 2.5.0 is also very much different from the
##		2.0.0 version. It includes the comments mod.
##		So if you installed the 2.0.0 version you must
##		update it using the update file included.
##
##############################################################
## History
## - 2.5.3 - Fixed a bunch of bugs
## - 2.5.0 - Karma Comments integrated
## - 2.0.0 - Mod reanimated
## - x.x.x - Mod dead and not responding
## - 1.2.2 - Added install/db_update.php (thx to http://www.phpbbhacks.com/forums/db_generator.php)
## - 1.2.1 - Fixed a bug with too powerful moders ;) 
## - 1.2.0 - Fixed a major bug
## - 1.1.0 - Fixed a shop mod compability bug. Thx to E T < etzool@hotmail.com >
## - 1.0.4 - Mod released
##############################################################
## 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 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 ;
#
#-----[ COPY ]------------------------------------------
#
copy root/karma.php to karma.php
copy root/templates/subSilver/karma_body.tpl to templates/subSilver/karma_body.tpl
copy root/templates/subSilver/images/icon_plus.gif to templates/subSilver/images/icon_plus.gif
copy root/templates/subSilver/images/icon_minus.gif to templates/subSilver/images/icon_plus.gif 
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------
#
$avatars_upload_no =
#
#-----[ 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" =>
#
#-----[ 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" => 
#
#-----[ 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' =>
#
#-----[ AFTER, ADD ]------------------------------------
#
	'L_YOUR_KARMA' => $lang['Your_Karma'],
#
#-----[ FIND ]------------------------------------------
#
'U_MEMBERLIST' =>
#
#-----[ AFTER, ADD ]------------------------------------
#
	'U_YOUR_KARMA' => append_sid('karma.'.$phpEx),
#
#-----[ FIND ]------------------------------------------
#
$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' =>
#
#-----[ AFTER, ADD ]------------------------------------
#
	'KARMA' => ( $board_config['simple_karma'] == 1 ) ? $profiledata['karma_plus'] - $profiledata['karma_minus'] :  '+' . $profiledata['karma_plus'] . '/-' . $profiledata['karma_minus'],
#
#-----[ FIND ]------------------------------------------
#
'L_INTERESTS' =>
#
#-----[ AFTER, ADD ]------------------------------------
#
	'L_KARMA' => $lang['Karma'],
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
// 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,
#
#-----[ IN-LINE FIND ]---------------------------------
#
u.user_allowsmile
#
#-----[ IN-LINE AFTER, ADD ]----------------------------
#
, u.karma_plus, u.karma_minus, u.karma_time
#
#-----[ FIND ]------------------------------------------
#
//
// Define the little post icon
#
#-----[ BEFORE, ADD ]------------------------------------
#
	//
	// Advanced Karma Mod
	// 
	$karma = '';
	if ( $userdata['session_logged_in'] && $poster_id != ANONYMOUS && $board_config['karma_onoff'] == 1)
	{
		$karma = '<br />' . $lang['Karma'] . '&nbsp;' . ( ( $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 . "&amp;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'] . "&amp;" . POST_USERS_URL . "=" . $poster_id . "&amp;start=" . $start . "&amp;k=p") . "#" . $postrow[$i]['post_id'];
				}
				$karma .= '&nbsp;<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 . "&amp;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'] . "&amp;" . POST_USERS_URL . "=" . $poster_id . "&amp;start=" . $start . "&amp;k=m") . "#" . $postrow[$i]['post_id'];
				}
				$karma .= '&nbsp;<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' =>
#
#-----[ AFTER, ADD ]------------------------------------
#
		'KARMA' => $karma,
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE, 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 ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE, 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/subSilver/admin/board_config_body.tpl
#
#-----[ FIND ]------------------------------------------
#
{AVATAR_GALLERY_PATH}
#
#-----[ FIND ]------------------------------------------
#
</tr>
#
#-----[ AFTER, 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}&nbsp;&nbsp;<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}&nbsp;&nbsp;<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}&nbsp;&nbsp;<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}&nbsp;&nbsp;<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}&nbsp;&nbsp;<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}&nbsp;&nbsp;<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/subSilver/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
{U_PROFILE}
#
#-----[ FIND ]------------------------------------------
#
</tr>
#
#-----[ AFTER, ADD ]------------------------------------
#
					<!-- BEGIN switch_show_karma -->
					<tr>

						<td align="center"><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"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_YOUR_KARMA}" hspace="3" />{L_YOUR_KARMA}{switch_show_karma.UNREAD}</a></td>
					</tr>
					<!-- END switch_show_karma -->

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/profile_view_body.tpl
#
#-----[ FIND ]------------------------------------------
#
{INTERESTS}
#
#-----[ FIND ]------------------------------------------
#
		</tr>
#
#-----[ AFTER, ADD ]------------------------------------
#
		<tr> 
		  <td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_KARMA}</span></td>
		  <td> <span class="gen">{KARMA}</span></td>
		</tr>

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/subSilver.cfg
#
#-----[ FIND ]------------------------------------------
#
$images['voting_graphic'][4] =
#
#-----[ AFTER, ADD ]------------------------------------
#
$images['icon_plus'] = "$current_template_images/icon_plus.gif";
$images['icon_minus'] = "$current_template_images/icon_minus.gif";

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------
#
{postrow.POSTER_POSTS}
#
#-----[ IN-LINE FIND ]---------------------------------
#
{postrow.POSTER_POSTS}
#
#-----[ IN-LINE AFTER, ADD ]----------------------------
#
{postrow.KARMA}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM