- define('_REFS' , $REFS);
- define('_CATS' , $CATS);
- define('_LINKS', $LINKS);
- define('_ADMIN_LINKS', MEMBER_ACTION_LINKS($uid, $DATA['status']));
- $DATA['gender'] = TRANSLATE_GENDER($DATA['gender']);
- $DATA['email_link'] = CREATE_EMAIL_LINK($DATA['email'], "user_data");
- $DATA['status'] = TRANSLATE_STATUS($DATA['status']);
- $DATA['last_online'] = MAKE_DATETIME($DATA['last_online'], "0");
- $DATA['used_points'] = TRANSLATE_COMMA($DATA['used_points']);
- if ($DATA['emails_sent'] > 0) $DATA['emails_sent'] = $BASE."&what=email_details&uid=".$uid."\">".TRANSLATE_COMMA($DATA['emails_sent'])."</a>]";
- $DATA['joined'] = MAKE_DATETIME($DATA['joined'], "0");
- $DATA['last_update'] = MAKE_DATETIME($DATA['last_update'], "0");
- $DATA['last_profile_sent'] = MAKE_DATETIME($DATA['last_profile_sent'], "0");
- $DATA['total'] = TRANSLATE_COMMA(GET_TOTAL_DATA($uid, "user_points", "points"));
- $DATA['locked'] = TRANSLATE_COMMA(GET_TOTAL_DATA($uid, "user_points", "locked_points"));
- $DATA['lock_timestamp'] = MAKE_DATETIME($DATA['lock_timestamp'], "2");
-
- // Is the lock reason not set?
- if (!isset($DATA['lock_reason'])) $DATA['lock_reason'] = "---";
-
- // Nickname inclusion?
- // @TODO Rewrite these to filters
- if (EXT_IS_ACTIVE('nickname')) {
- // Nickname not set or invalid? Then
- if ((empty($DATA['nickname'])) || ($DATA['nickname'] == $uid)) $DATA['nickname'] = "---";
- } else {
- // Extension not found
- $DATA['nickname'] = getMessage('EXT_NICKNAME_404');
- }
-
- // Is the user extension newer?
- if (GET_EXT_VERSION('user') >= '0.3.4') {
- // Then "translate" the number
- $DATA['rand_confirmed'] = TRANSLATE_COMMA($DATA['rand_confirmed']);
+ $content['email_link'] = generateEmailLink($content['email'], 'user_data');
+ $content['last_online'] = generateDateTime($content['last_online'], '2');
+ $content['joined'] = generateDateTime($content['joined'], '2');
+ $content['last_update'] = generateDateTime($content['last_update'], '2');
+ $content['last_profile_sent'] = generateDateTime($content['last_profile_sent'], '2');
+ $content['total_points'] = getTotalPoints($content['userid']);
+ $content['locked_points'] = countSumTotalData($content['userid'], 'user_points', 'locked_points') + countSumTotalData($content['userid'], 'user_points', 'locked_order_points');
+
+ // Prepare array for filter
+ $data = array(
+ 'userid' => $content['userid'],
+ 'points' => 0
+ );
+
+ // Run the filter chain
+ $data = runFilterChain('get_own_points', $data);
+
+ // Add more data
+ $content['own_points'] = $data['points'];
+ $content['lock_timestamp'] = generateDateTime($content['lock_timestamp'], '2');
+
+ // Link to email_details if some are sent
+ if ($content['emails_sent'] > 0) {
+ $content['emails_sent'] = $base . '&what=email_details&userid=' . $content['userid'] . '%}">{%pipe,translateComma=' . $content['emails_sent'] . '%}</a>]';