Exemplo n.º 1
0
 /**
  * Standard modular run function for symbol hooks. Searches for tasks to perform.
  *
  * @param  array		Symbol parameters
  * @return string		Result
  */
 function run($param)
 {
     require_code('points');
     $member = isset($param[0]) ? intval($param[0]) : get_member();
     $value = strval(total_points($member) - non_overrided__total_points($member));
     return $value;
 }
Exemplo n.º 2
0
/**
 * @license		http://opensource.org/licenses/cpal_1.0 Common Public Attribution License
 * @copyright	ocProducts Ltd
 * @package		group_points
 */
function total_points($member)
{
    $points = non_overrided__total_points($member);
    $totalised_group_points = 0;
    $group_points = get_group_points();
    $groups = $GLOBALS['FORUM_DRIVER']->get_members_groups($member);
    foreach ($groups as $group) {
        $totalised_group_points += isset($group_points[$group]['p_points_one_off']) ? $group_points[$group]['p_points_one_off'] : 0;
    }
    global $TOTAL_POINTS_CACHE;
    $TOTAL_POINTS_CACHE[$member] = $points + $totalised_group_points;
    return $points + $totalised_group_points;
}