addCode('ACCOUNT_UNCONFIRMED', 0x004);
addCode('UNKNOWN_STATUS' , 0x005);
addCode('NO_MAIL_TYPE' , 0x006);
-addCode('CNTR_FAILED' , 0x008);
+addCode('CNTR_FAILED' , 0x007);
addCode('LOGOUT_DONE' , 0x008);
addCode('LOGOUT_FAILED' , 0x009);
addCode('URL_TLOCK' , 0x00a);
addCode('COOKIES_DISABLED' , 0x012);
addCode('DATA_INVALID' , 0x013);
addCode('POSSIBLE_INVALID' , 0x014);
-addCode('USER_404' , 0x016);
-addCode('STATS_404' , 0x017);
-addCode('ALREADY_CONFIRMED' , 0x018);
-addCode('ERROR_MAILID' , 0x019);
-addCode('EXTENSION_PROBLEM' , 0x01a);
-addCode('MORE_RECEIVERS1' , 0x01b);
-addCode('MORE_RECEIVERS2' , 0x01c);
-addCode('MORE_RECEIVERS3' , 0x01d);
-addCode('INVALID_URL' , 0x01e);
-addCode('MENU_NOT_VALID' , 0x01f);
-addCode('LOGIN_FAILED' , 0x020);
-addCode('BEG_SAME_AS_OWN' , 0x021);
-addCode('UNHANDLED_STATUS' , 0x022);
-addCode('MODULE_MEMBER_ONLY' , 0x023);
-addCode('UNKNOWN_ERROR' , 0x024);
+addCode('USER_404' , 0x015);
+addCode('STATS_404' , 0x016);
+addCode('ALREADY_CONFIRMED' , 0x017);
+addCode('ERROR_MAILID' , 0x018);
+addCode('EXTENSION_PROBLEM' , 0x019);
+addCode('MORE_RECEIVERS1' , 0x01a);
+addCode('MORE_RECEIVERS2' , 0x01b);
+addCode('MORE_RECEIVERS3' , 0x01c);
+addCode('INVALID_URL' , 0x01d);
+addCode('MENU_NOT_VALID' , 0x01e);
+addCode('LOGIN_FAILED' , 0x01f);
+addCode('BEG_SAME_AS_OWN' , 0x020);
+addCode('UNHANDLED_STATUS' , 0x021);
+addCode('MODULE_MEMBER_ONLY' , 0x022);
+addCode('UNKNOWN_ERROR' , 0x023);
// Full version
setConfigEntry('FULL_VERSION', '0.2.1-FINAL');
// We need callback and extra_func: callback is really the call-back function, extra_func is our value
$replacer = $data['extra_func'];
- // Is the extra_func empty and value set?
- if ((empty($replacer)) && (isset($data['value']))) {
- // Then use this
- $replacer = $data['value'];
- } // END - if
-
// Do we have a call-back? Should always be there!
if (!empty($data['callback'])) {
- // Parse it through this function
- $replacer = '{DQUOTE} . ' . $data['extra_func'] . '(' . $data['callback'] . "('" . $replacer . "')) . {DQUOTE}";
+ //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'])) {
+ // No value is set
+ $replacer = '{DQUOTE} . ' . $data['extra_func2'] . '(' . $data['extra_func'] . '(' . $data['callback'] . '())) . {DQUOTE}';
+ } else {
+ // Some value is set
+ $replacer = '{DQUOTE} . ' . $data['extra_func2'] . '(' . $data['extra_func'] . '(' . $data['callback'] . "('" . $data['value'] . "'))) . {DQUOTE}";
+ }
} // END - if
// Replace the config entry
// Replace all matches
foreach ($matches[2] as $key => $cmd) {
// Init replacer/call-back variable
- $replacer = '';
- $callback = '';
- $extraFunction = '';
- $value = '';
+ $replacer = '';
+ $callback = '';
+ $extraFunction = '';
+ $extraFunction2 = '';
+ $value = '';
// Extract command and call-back
$cmdArray = explode(',', $cmd);
if (isset($cmdArray[2])) {
// Also detected
$extraFunction = $cmdArray[2];
- } elseif (isset($matches[4][$key])) {
+ } // END - if
+
+ // Detect extra function 2
+ if (isset($cmdArray[3])) {
+ // Also detected
+ $extraFunction2 = $cmdArray[3];
+ } // END - if
+
+ // And value
+ if (isset($matches[4][$key])) {
// Use this as value
$value = $matches[4][$key];
- }
+ } // END - if
// Construct call-back function name for the command
$commandFunction = 'doExpression' . ucfirst(strtolower($cmd));
if (function_exists($commandFunction)) {
// Prepare $matches, $key, $outputMode, etc.
$data = array(
- 'matches' => $matches,
- 'key' => $key,
- 'mode' => $outputMode,
- 'code' => $code,
- 'callback' => $callback,
- 'extra_func' => $extraFunction,
- 'value' => $value
+ 'matches' => $matches,
+ 'key' => $key,
+ 'mode' => $outputMode,
+ 'code' => $code,
+ 'callback' => $callback,
+ 'extra_func' => $extraFunction,
+ 'extra_func2' => $extraFunction2,
+ 'value' => $value
);
// Call it
if (count($com) < 2) {
// Don't display commatas even if there are none... ;-)
$maxComma = '0';
- }
+ } // END - if
} // END - if
// Debug log
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "dotted={$dotted},maxComma={$maxComma}");
// Translate it now
+ $translated = $dotted;
switch (getLanguage()) {
case 'de': // German language
- $dotted = number_format($dotted, $maxComma, ',', '.');
+ $translated = number_format($dotted, $maxComma, ',', '.');
break;
default: // All others
- $dotted = number_format($dotted, $maxComma, '.', ',');
+ $translated = number_format($dotted, $maxComma, '.', ',');
break;
} // END - switch
// Return translated value
- return $dotted;
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'dotted=' . $dotted . ',translated=' . $translated . ',maxComma=' . $maxComma);
+ return $translated;
}
// Translate Uni*-like gender to human-readable
return $GLOBALS['points_ref'];
}
+// "Getter" for ref_payout
+function getRefPayout () {
+ // Do we have cache?
+ if (!isset($GLOBALS['ref_payout'])) {
+ // Determine it
+ $GLOBALS['ref_payout'] = getConfig('ref_payout');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['ref_payout'];
+}
+
+// "Getter" for surfbar_dynamic_percent
+function getSurfbarDynamicPercent () {
+ // Do we have cache?
+ if (!isset($GLOBALS['surfbar_dynamic_percent'])) {
+ // Determine it
+ $GLOBALS['surfbar_dynamic_percent'] = getConfig('surfbar_dynamic_percent');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['surfbar_dynamic_percent'];
+}
+
+// "Getter" for surfbar_static_reward
+function getSurfbarStaticReward () {
+ // Do we have cache?
+ if (!isset($GLOBALS['surfbar_static_reward'])) {
+ // Determine it
+ $GLOBALS['surfbar_static_reward'] = getConfig('surfbar_static_reward');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['surfbar_static_reward'];
+}
+
+// "Getter" for surfbar_static_time
+function getSurfbarStaticTime () {
+ // Do we have cache?
+ if (!isset($GLOBALS['surfbar_static_time'])) {
+ // Determine it
+ $GLOBALS['surfbar_static_time'] = getConfig('surfbar_static_time');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['surfbar_static_time'];
+}
+
+// "Getter" for online_timeout
+function getOnlineTimeout () {
+ // Do we have cache?
+ if (!isset($GLOBALS['online_timeout'])) {
+ // Determine it
+ $GLOBALS['online_timeout'] = getConfig('online_timeout');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['online_timeout'];
+}
+
// Checks wether proxy configuration is used
function isProxyUsed () {
// Do we have cache?
derzeit die Surfbar nutzenden
<strong>{%pipe,SURFBAR_DETERMINE_TOTAL_ONLINE%}</strong> Mitglieder, die
gesamt in der Surfbar gebuchten
- <strong>{%pipe,translateComma=$content[surfbar_total_urls]%}</strong>
+ <strong>{%pipe,SURFBAR_GET_TOTAL_URLS,translateComma%}</strong>
URLs (ohne von unseren Sponsoren), sowie Ihre gebuchten
- <strong>{%pipe,SURFBAR_GET_TOTAL_USER_URLS%}</strong> URLs werden als
+ <strong>{%pipe,getMemberId,SURFBAR_GET_TOTAL_USER_URLS,translateComma%}</strong> URLs werden als
Berechnungsgrundlage verwendet. Sie erhalten allerdings nur einen
reduzierten Anteil von
<strong>{%config,translateComma=surfbar_dynamic_percent%}%</strong>.