]> git.mxchange.org Git - mailer.git/blobdiff - inc/template-functions.php
First batch of removal of the headers needed for revision-functions.php
[mailer.git] / inc / template-functions.php
index 56eb35dc84976691bda8398d795bee11c005783d..cc04cdeb79295e04e23299d09355ec1017ca5c49 100644 (file)
@@ -1931,7 +1931,8 @@ function generateCacheFqfn ($prefix, $template) {
        if (!isset($GLOBALS['template_cache_fqfn'][$prefix][$template])) {
                // Generate the FQFN
                $GLOBALS['template_cache_fqfn'][$prefix][$template] = sprintf(
-                       '%s_compiled/%s/%s.tpl%s',
+                       '%s%s_compiled/%s/%s%s',
+                       getPath(),
                        getCachePath(),
                        $prefix,
                        $template,
@@ -2400,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?
@@ -2434,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]
 ?>