- Introduced generateDateMonthYearSelectionBox() which is suitable for e.g.
[mailer.git] / inc / template-functions.php
index 5eb84e4339c5ddaa4c7e1ac22445426b55d4a9b7..cc04cdeb79295e04e23299d09355ec1017ca5c49 100644 (file)
@@ -2401,6 +2401,21 @@ function doTemplateMetaFavIcon ($templateName, $clear = FALSE) {
        return $out;
 }
 
+// Helper function to display referral id or hide it depending on settings
+function doTemplateDisplayReferralIdContent ($template, $clear = FALSE) {
+       // Ddisplay the refid or make it editable?
+       if (isDisplayRefidEnabled()) {
+               // Load "hide" form template
+               $out = loadTemplate('guest_register_refid_hide', TRUE);
+       } else {
+               // Load template to enter it
+               $out = loadTemplate('guest_register_refid', TRUE);
+       }
+
+       // Return code
+       return $out;
+}
+
 // "Getter" for template base path
 function getTemplateBasePath ($part) {
        // Is there cache?
@@ -2435,5 +2450,22 @@ function removeDeprecatedComment ($output) {
        return $return;
 }
 
+// Generates a selection box suitable for e.g. birthdays: day, month and year
+function generateDayMonthYearSelectionBox ($day, $month, $year) {
+       // This depends on selected language
+       switch (getLanguage()) {
+               case 'de': // German date format
+                       $content = addSelectionBox('da', $day) . addSelectionBox('mo', $month) . addSelectionBox('ye', $year);
+                       break;
+
+               default: // Default is the US date format... :)
+                       $content = addSelectionBox('mo', $month) . addSelectionBox('da', $day) . addSelectionBox('ye', $year);
+                       break;
+       } // END - switch
+
+       // Return content
+       return $content;
+}
+
 // [EOF]
 ?>