if (!empty($data['callback'])) {
//if ($data['callback'] == 'getMemberId') die('<pre>'.encodeEntities(print_r($data, true)).'</pre>');
// If the value is empty, we don't add it
- if (empty($data['value'])) {
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'value[' . gettype($data['value']) . ']=' . $data['value']);
+ if ((empty($data['value'])) && ($data['value'] != '0')) {
// No value is set
$replacer = '{DQUOTE} . ' . $data['extra_func2'] . '(' . $data['extra_func'] . '(' . $data['callback'] . '())) . {DQUOTE}';
} else {
$callback = '';
$extraFunction = '';
$extraFunction2 = '';
- $value = '';
+ $value = null;
// Extract command and call-back
$cmdArray = explode(',', $cmd);
// Getter for message string as a mask
function getMaskedMessage ($messageId, $data) {
- return sprintf(getMessage($messageId), $data);
+ // Construct message
+ $message = sprintf(getMessage($messageId), $data);
+
+ // Return it
+ return $message;
}
// Init messages
// Add messages
function addMessages ($messages) {
+ // Cache current language
+ $currentLanguage = getCurrentLanguage();
+
// Merge both
- $GLOBALS['messages'][getCurrentLanguage()] = merge_array($GLOBALS['messages'][getCurrentLanguage()], $messages);
+ $GLOBALS['messages'][$currentLanguage] = merge_array($GLOBALS['messages'][$currentLanguage], $messages);
// Don't count them if we don't want it
- if (isset($GLOBALS['count'])) return;
+ if (isset($GLOBALS['count'])) {
+ return;
+ } // END - if
// And count them
- if (isset($GLOBALS['msg_count'][getCurrentLanguage()])) {
- $GLOBALS['msg_count'][getCurrentLanguage()] += count($messages);
+ if (isset($GLOBALS['msg_count'][$currentLanguage])) {
+ $GLOBALS['msg_count'][$currentLanguage] += count($messages);
} else {
- $GLOBALS['msg_count'][getCurrentLanguage()] = count($messages);
+ $GLOBALS['msg_count'][$currentLanguage] = count($messages);
}
}
'MEMBER_REFLIST_LIST_TITLE_1' => "Ihre Referals in Ebene <u>",
'MEMBER_REFLIST_LIST_TITLE_2' => "</u> (<u>",
'MEMBER_REFLIST_LIST_TITLE_3' => "%</u>)",
- 'MEMBER_REFLIST_COUNTER' => "In dieser Ebene haben Sie <span class=\"data\">%s</span> Mitglieder geworben.",
+ 'MEMBER_REFLIST_COUNTER' => "In dieser Ebene haben Sie <span class=\"data\">{%%pipe,translateComma=%s%%}</span> Mitglieder geworben.",
'MEMBER_REFLIST_TITLE' => "Referal-Übersicht",
'MEMBER_REFLIST_POINTS' => "Verdienst des Mitgliedes",
'MEMBER_REFLIST_ACTIVITY' => "Mitglied aktiv?",
$cnt = 1;
while ($content = SQL_FETCHARRAY($result)) {
// Prepare data for the template
- $content = array(
- 'cnt' => $cnt,
- 'userid' => $content['userid'],
- 'points' => $content['points'],
- 'last_online' => generateDateTime($content['last_online'], 2)
- );
+ $content['cnt'] = $cnt;
+ $content['last_online'] = generateDateTime($content['last_online'], 2);
// Load row template
$OUT .= loadTemplate('member_bonus_row', true, $content);
$content[rows]
<tr>
<td align="center" class="table_footer" colspan="6">
- <span class="notice">{%message,MEMBER_REFLIST_COUNTER={%pipe,translateComma=$content[counter]%}%}</span>
+ <span class="notice">{%message,MEMBER_REFLIST_COUNTER=$content[counter]%}</span>
</td>
</tr>
</table>
$content[rows]
<tr>
<td align="center" class="table_footer" colspan="6">
- <span class="notice">{%message,MEMBER_REFLIST_COUNTER={%pipe,translateComma=$content[counter]%}%}</span>
+ <span class="notice">{%message,MEMBER_REFLIST_COUNTER=$content[counter]%}</span>
</td>
</tr>
</table>