+// Translates the "pool type" into human-readable
+function translatePoolType ($type) {
+ // Return "translation"
+ return sprintf("{--POOL_TYPE_%s--}", strtoupper($type));
+}
+
+// Displays given message in admin_settings_saved template
+function displayMessage ($message, $return = false) {
+ // Load the template
+ return loadTemplate('admin_settings_saved', $return, $message);
+}
+
+//-----------------------------------------------------------------------------
+// Template helper functions for EL
+//-----------------------------------------------------------------------------
+
+// Color-switch helper function
+function doTemplateColorSwitch ($template, $clear = false, $return = true) {
+ // Is it there?
+ if (!isset($GLOBALS['color_switch'][$template])) {
+ // Initialize it
+ initTemplateColorSwitch($template);
+ } elseif ($clear === false) {
+ // Switch color if called from loadTemplate()
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'SWITCH:' . $template);
+ $GLOBALS['color_switch'][$template] = 3 - $GLOBALS['color_switch'][$template];
+ }
+
+ // Return CSS class name
+ if ($return === true) {
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'RETURN:' . $template . '=' . $GLOBALS['color_switch'][$template]);
+ return 'switch_sw' . $GLOBALS['color_switch'][$template];
+ } // END - if
+}
+
+// Helper function for extension registration link
+function doTemplateExtensionRegistrationLink ($template, $dummy, $ext_name) {
+ // Default is all non-productive
+ $OUT = '<em style="cursor:help" class="notice" title="{%message,ADMIN_EXTENSION_IS_NON_PRODUCTIVE_LINK_TITLE=' . $ext_name . '%}">{--ADMIN_EXTENSION_IS_NON_PRODUCTIVE_LINK--}</em>';
+
+ // Is the given extension non-productive?
+ if (isExtensionProductive($ext_name)) {
+ // Productive code
+ $OUT = '<a title="{--ADMIN_REGISTER_EXTENSION_TITLE--}" href="{%url=modules.php?module=admin&what=extensions&reg_ext=' . $ext_name . '%}">{--ADMIN_REGISTER_EXTENSION--}</a>';
+ } // END - if
+
+ // Return code
+ return $OUT;
+}
+
+// Helper function to create bonus mail admin links
+function doTemplateAdminBonusMailLinks ($template, $bonusId) {
+ // Call the inner function
+ return generateAdminMailLinks('bid', $bonusId);
+}
+
+// Helper function to create member mail admin links
+function doTemplateAdminMemberMailLinks ($template, $mailId) {
+ // Call the inner function
+ return generateAdminMailLinks('mid', $mailId);
+}
+