Pace, are you testing this on your localhost, or on the server itself?
You might have a much more successful time testing it on your localhost... it will show you the errors.






if (empty($user->data))
{
$user->session_begin();
}





'USER_KARMA' => $user_karma, // Dump it out to the template
return array(
$variable = $another_var = $yet_another = $still_more = $im_empty_too = '';*** /phpBB3/memberlist.php Wed Feb 7 20:47:30 2007
--- /phpBB3/memberlist_new.php Thu Feb 15 14:37:03 2007
***************
*** 488,493 ****
--- 488,496 ----
unset($module);
}
+ include_once($phpbb_root_path . 'includes/functions_karma.' . $phpEx);
+ grab_karma_rank($member['user_karma'], $member['user_type']);
+
$template->assign_vars(array(
'POSTS_DAY' => sprintf($user->lang['POST_DAY'], $posts_per_day),
'POSTS_PCT' => sprintf($user->lang['POST_PCT'], $percentage),<?php
function grab_karma_rank($user_karma, $user_level)
{
global $user, $template;
// when we expand this mod for ACP and database control,
// we would probably use regular expressions to determine the values,
// but for now, we can be somewhat static.
$i = $user_karma;
switch ($i)
{
case ($i <= 0):
$karma = $user->lang['karma_negative'][0]; // this would be clean.
break;
case ($i <= -1):
$karma = $user->lang['karma_negative'][1];
break;
case ($i <= -3):
$karma = $user->lang['karma_negative'][2];
break;
// ... repeat until you reach something close to like -20
// which would be "banned"
// then start on the positive case...
case ($i => 1):
$karma = $user->lang['karma_positive'][0];
break;
case ($i => 5):
$karma = $user->lang['karma_positive'][1];
break;
case ($i => 12):
$karma = $user->lang['karma_positive'][2];
break;
// etc... and repeat until you reach something like oh... 100 or so
// which would be Supreme Ruler, or some such thing
}
if ($user_level == USER_FOUNDER)
{
$karma = $user->lang['karma_positive'][20]; // assuming 20 is "Divine"
}
$template->assign_vars(array(
'KARMA_LEVEL' => $karma,
));
return;
}
?><?php
// ... header info
$lang = array_merge($lang, array(
'karma_negative' => array(
'Clean',
'Offender',
'Criminal',
'Felon', // etc...
),
'karma_positive' => array(
'Decent Individual',
'Good Egg',
'Upstanding Citizen',
'Role Model', // etc...
),
?>



Return to phpBB3 Challenges at phpBB Academy
Users browsing this forum: No registered users and 4 guests