'BEG_RALLYE_NO_ONE_JOINED' => "Niemand nimmt an der Bettel-Rallye dran teil, oder sie ist administrativ deaktiviert worden.",
'ADMIN_BEG_RALLYE_DEACTIVATED' => "Bettel-Rallye nicht aktiviert.",
'ADMIN_EDIT_BEG_RALLYE_NOTIFICATIONS' => "Benachrichtungen per Mail zur Bettel-Rallye",
- 'ADMIN_BEG_RAL_ENABLE_NOTIFY' => "Benachtigen, wenn Bettel-Rallye aktiviert wurde?",
- 'ADMIN_BEG_RAL_DISABLE_NOTIFY' => "Benachtigen, wenn Bettel-Rallye deaktiviert wurde?",
+ 'ADMIN_BEG_RALLYE_ENABLE_NOTIFY' => "Benachtigen, wenn Bettel-Rallye aktiviert wurde?",
+ 'ADMIN_BEG_RALLYE_DISABLE_NOTIFY' => "Benachtigen, wenn Bettel-Rallye deaktiviert wurde?",
'ADMIN_BEG_NOTIFY_BONUS' => "Bonus-Mail mit Anzahl {?POINTS?} aussenden, wenn Bettel-Rallye aktiviert wurde. <div class=\"admin_note\">(0 = Unvergütete Benachrichtigung aussenden; nur in Verbindung mit der Erweiterung <strong>bonus!</strong>)</div>",
'ADMIN_BEG_NEW_MEMBER_NOTIFY' => "Sollen neue Mitglieder mit selber Mail über eine laufende Bettel-Rallye benachrichtigt werden?",
'ADMIN_BEG_NOTIFY_WAIT' => "Wie lange soll die Wartezeit der Bonus-Mail sein?",
'ADMIN_TASK_LIST_BEG_TITLE' => "Es nehmen Mitglieder an der Bettel-Rallye dran teil.",
// Subject lines
- 'BEG_RALLYE_ENABLE_NOTIFY' => "HINWEIS: Eine Bettel-Rallye ist am Laufen.",
- 'BEG_RALLYE_DISABLE_NOTIFY' => "HINWEIS: Eine Bettel-Rallye wurde gestoppt.",
+ 'BEG_RALLYE_ENABLE_SUBJECT' => "HINWEIS: Eine Bettel-Rallye ist am Laufen.",
+ 'BEG_RALLYE_DISABLE_SUBJECT' => "HINWEIS: Eine Bettel-Rallye wurde gestoppt.",
));
// [EOF]
return $GLOBALS['network_translation'][$default];
}
+// Generates an option list of request types
+function generateNetworkRequestTypeOptions ($default = '') {
+ // Do we have cache?
+ if (!isset($GLOBALS['network_request_type'][$default])) {
+ // Generate the list
+ $GLOBALS['network_request_type'][$default] = generateOptionList(
+ '/ARRAY/',
+ array(
+ 'GET',
+ 'POST'
+ ),
+ array(
+ '{--ADMIN_NETWORK_REQUEST_TYPE_GET--}',
+ '{--ADMIN_NETWORK_REQUEST_TYPE_POST--}'
+ ),
+ $default
+ );
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['network_request_type'][$default];
+}
+
// Translates 'translate_name' for e.g. templates
function translateNetworkTranslationName ($name) {
// Get the message id
return getMessage('ADMIN_NETWORK_TYPES_' . strtoupper($type) . '');
}
+// Translates request type
+function translateNetworkRequestType ($name) {
+ // Get the message id
+ return getMessage('ADMIN_NETWORK_REQUEST_TYPE_' . strtoupper($name) . '');
+}
+
//------------------------------------------------------------------------------
// Call-back functions
//------------------------------------------------------------------------------
// Do we have found the network?
if (count($networkData) > 0) {
if (isFormSent('edit')) {
- // Make selection box for network_request_type
- $networkData['network_request_type'] = generateOptionList(
- '/ARRAY/',
- array(
- 'GET',
- 'POST'
- ),
- array(
- '{--ADMIN_NETWORK_REQUEST_TYPE_GET--}',
- '{--ADMIN_NETWORK_REQUEST_TYPE_POST--}'
- ),
- $networkData['network_request_type']
- );
-
// Add row template for editing
$OUT .= loadTemplate('admin_edit_networks_row', true, $networkData);
} elseif (isFormSent('del')) {
- // Translate the request type
- $networkData['network_request_type'] = '{--ADMIN_NETWORK_REQUEST_TYPE_' . $networkData['network_request_type'] . '--}';
-
// Add row template for deleting
$OUT .= loadTemplate('admin_del_networks_row', true, $networkData);
} else {
// Normal notification mails or bonus mails?
$sentBonusMails = ((getConfig('beg_notify_bonus') > 0) && ($mode == 'enable') && (isExtensionActive('bonus')));
- // Generate subject line
- $subject = '{--BEG_RALLYE_' . strtoupper($mode) . '_NOTIFY--}';
-
// Load message body for bonus mails
$message = loadEmailTemplate('beg_enable_notify_body', '', '{PER}userid{PER}');
$receiver = ''; $userids = array();
} else {
// Send normal notification mail to the members
$message = loadEmailTemplate('beg_' . $mode . '_notify', $content, $content['userid']);
- sendEmail($content['email'], $subject, $message);
+ sendEmail($content['email'], '{--BEG_RALLYE_' . strtoupper($mode) . '_SUBJECT--}', $message);
}
} // END - while
$url = 'modules.php?module=index&what=login';
// Insert mail
- addBonusMailToQueue($subject, $message, $receiver, getConfig('beg_notify_bonus'), getConfig('beg_notify_wait'), $url, 0, 'normal', SQL_NUMROWS($result_main));
+ addBonusMailToQueue('{--BEG_RALLYE_' . strtoupper($mode) . '_SUBJECT--}', $message, $receiver, getConfig('beg_notify_bonus'), getConfig('beg_notify_wait'), $url, 0, 'normal', SQL_NUMROWS($result_main));
} // END - if
} // END - if
// Normal notification mails or bonus mails?
$sentBonusMails = ((getConfig('bonus_notify_points') > 0) && ($mode == 'enable') && (isExtensionActive('bonus')));
- // Generate subject line
- $subject = '{--MEMBER_BONUS_RALLYE_' . strtoupper($mode) . '_SUBJECT--}';
-
// Load message body for bonus mails
$message = loadEmailTemplate('bonus_enable_notify_body', '', '{PER}userid{PER}');
$receiver = ''; $userids = array();
} else {
// Send normal notification mail to the members
$message = loadEmailTemplate('bonus_' . $mode . '_notify', $content, $content['userid']);
- sendEmail($content['email'], $subject, $message);
+ sendEmail($content['email'], '{--MEMBER_BONUS_RALLYE_' . strtoupper($mode) . '_SUBJECT--}', $message);
}
} // END - while
$url = 'modules.php?module=index&what=login';
// Insert mail
- addBonusMailToQueue($subject, $message, $receiver, getConfig('bonus_notify_points'), getConfig('bonus_notify_wait'), $url, 0, 'normal', SQL_NUMROWS($result_main));
+ addBonusMailToQueue('{--MEMBER_BONUS_RALLYE_' . strtoupper($mode) . '_SUBJECT--}', $message, $receiver, getConfig('bonus_notify_points'), getConfig('bonus_notify_wait'), $url, 0, 'normal', SQL_NUMROWS($result_main));
} // END - if
} // END - if
// Is the raw userid set?
if (postRequestParameter($userid, $id) > 0) {
- // Generate subject
- $subject = '{--MEMBER_' . strtoupper($subject) . '_' . strtoupper($table) . '_SUBJECT--}';
-
// Load email template
if (!empty($subjectPart)) {
$mail = loadEmailTemplate('member_' . $mode . '_' . strtolower($subjectPart) . '_' . $table, $content);
}
// Send email out
- sendEmail(postRequestParameter($userid, $id), $subject, $mail);
+ sendEmail(postRequestParameter($userid, $id), '{--MEMBER_' . strtoupper($subject) . '_' . strtoupper($table) . '_SUBJECT--}', $mail);
} // END - if
// Generate subject
// Send admin notification out
if (!empty($subjectPart)) {
- sendAdminNotification($subject, 'admin_' . $mode . '_' . strtolower($subjectPart) . '_' . $table, $content, postRequestParameter($userid, $id));
+ sendAdminNotification('{--ADMIN_' . strtoupper($subject) . '_' . strtoupper($table) . '_SUBJECT--}', 'admin_' . $mode . '_' . strtolower($subjectPart) . '_' . $table, $content, postRequestParameter($userid, $id));
} else {
- sendAdminNotification($subject, 'admin_' . $mode . '_' . $table, $content, postRequestParameter($userid, $id));
+ sendAdminNotification('{--ADMIN_' . strtoupper($subject) . '_' . strtoupper($table) . '_SUBJECT--}', 'admin_' . $mode . '_' . $table, $content, postRequestParameter($userid, $id));
}
}
// Set content type
setContentType('text/html');
-// Fix missing module to 'index'
-if (!isGetRequestParameterSet('module')) {
- // Set element
- setGetRequestParameter('module', 'index');
-
- // ... and module
- setModule('index');
-} // END - if
-
// The header file
loadIncludeOnce('inc/header.php');
<td align="right" width="200">{--ADMIN_NETWORK_REQUEST_TYPE--}:</td>
<td>
<select class="admin_select" name="network_request_type" size="1">
- <option value="GET">{--ADMIN_NETWORK_REQUEST_TYPE_GET--}</option>
- <option value="POST">{--ADMIN_NETWORK_REQUEST_TYPE_POST--}</option>
+ {%pipe,generateNetworkRequestTypeOptions%}
</select>
</td>
</tr>
</tr>
<tr>
<td align="right" height="20">
- {--ADMIN_BEG_RAL_ENABLE_NOTIFY--}
+ {--ADMIN_BEG_RALLYE_ENABLE_NOTIFY--}
</td>
<td align="center">
<input type="radio" name="beg_rallye_enable_notify" class="admin_normal" value="Y"$content[rallye_enable_notify_y] /> {--YES--}<br />
</tr>
<tr>
<td align="right" height="20">
- {--ADMIN_BEG_RAL_DISABLE_NOTIFY--}
+ {--ADMIN_BEG_RALLYE_DISABLE_NOTIFY--}
</td>
<td align="center">
<input type="radio" name="beg_rallye_disable_notify" class="admin_normal" value="Y"$content[rallye_disable_notify_y] /> {--YES--}<br />
<tr>
<td class="{%template,ColorSwitch%}" style="padding-left:5px">{--ADMIN_NETWORK_REQUEST_TYPE--}:</td>
<td class="{%template,ColorSwitch%}">
- $content[network_request_type]
+ {%pipe,translateNetworkRequestType=$content[network_request_type]%}
</td>
<td class="{%template,ColorSwitch%}" style="padding-left:5px">{--ADMIN_NETWORK_ROW_SEPERATOR--}:</td>
<td class="{%template,ColorSwitch%}">