X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Ftemplate-functions.php;h=cc04cdeb79295e04e23299d09355ec1017ca5c49;hb=c1ce3b98c13fabf834d11a847eb2d297ead8d53d;hp=56eb35dc84976691bda8398d795bee11c005783d;hpb=ef93474b89c9e51dd97f4eb79b260630f05216f2;p=mailer.git diff --git a/inc/template-functions.php b/inc/template-functions.php index 56eb35dc84..cc04cdeb79 100644 --- a/inc/template-functions.php +++ b/inc/template-functions.php @@ -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] ?>