}
// Translates the american decimal dot into a german comma
-function TRANSLATE_COMMA($dotted, $cut=true)
-{
+function TRANSLATE_COMMA($dotted, $cut=true) {
global $_CONFIG;
// Default is 3 you can change this in admin area "Misc -> Misc Options"
if (empty($_CONFIG['max_comma'])) $_CONFIG['max_comma'] = "3";
define('MEMBER_SURFBAR_NOTIFY_URL_UNLOCK_SUBJECT', "Ihre URL wurde in die Surfbar aufgenommen");
define('MEMBER_SURFBAR_NOTIFY_URL_REG_SUBJECT', "Ihre URL in der Surfbar wartet auf Freischaltung");
+// URL status
+define('SURFBAR_URL_STATUS_CONFIRMED', "Freigegeben");
+define('SURFBAR_URL_STATUS_LOCKED', "Gesperrt");
+define('SURFBAR_URL_STATUS_PENDING', "Wartend");
+
//
?>
'url' => $url,
'frametester' => FRAMETESTER($url),
'uid' => $uid,
- 'reward' => $reward,
- 'status' => $status
+ 'reward' => TRANSLATE_COMMA($reward),
+ 'status' => SURFBAR_TRANSLATE_STATUS($status)
);
// Insert the URL into database
// Notify the user about the performed action
function SURFBAR_NOTIFY_USER ($messageType, $content) {
// Prepare template name
- $templateName = sprintf("admin_surfbar_%s", $messageType);
+ $templateName = sprintf("member_surfbar_%s", $messageType);
// Prepare subject
$eval = sprintf("\$subject = MEMBER_SURFBAR_NOTIFY_%s_SUBJECT;",
// Send the email
SEND_EMAIL($content['uid'], $subject, $mailText);
}
+// Translate the URL status
+function SURFBAR_TRANSLATE_STATUS ($status) {
+ // Create constant name
+ $constantName = sprintf("SURFBAR_URL_STATUS_%s", strtoupper($status));
+
+ // Set default translated status
+ $statusTranslated = "!".$constantName."!";
+
+ // Generate eval() command
+ if (defined($constantName)) {
+ $eval = "\$statusTranslated = ".$constantName.";";
+ eval($eval);
+ } // END - if
+
+ // Return result
+ return $statusTranslated;
+}
//
?>