From: Roland Häder Date: Sun, 12 Sep 2010 21:28:22 +0000 (+0000) Subject: Floater added, admin_header.tpl added, EL code improved: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=83b9addde2c2c88c714246712eb3b393909fcbd0;p=mailer.git Floater added, admin_header.tpl added, EL code improved: - Floater HTML prepared, this will be later moved by the jquery library - admin_header.tpl extracted from admin_welcome.tpl so all areas have a header template - The expression function for template EL code does now tollerate missing call-back functions --- diff --git a/.gitattributes b/.gitattributes index 64c96d3354..4e8cbc6a63 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1137,6 +1137,7 @@ templates/de/html/admin/admin_extensions_text.tpl -text svneol=unset#text/plain templates/de/html/admin/admin_footer.tpl -text svneol=unset#text/plain templates/de/html/admin/admin_form_selection_box.tpl -text svneol=unset#text/plain templates/de/html/admin/admin_guest_menu_status.tpl -text svneol=unset#text/plain +templates/de/html/admin/admin_header.tpl svneol=native#text/plain templates/de/html/admin/admin_import_theme.tpl -text svneol=unset#text/plain templates/de/html/admin/admin_import_theme_none.tpl svneol=native#text/plain templates/de/html/admin/admin_import_theme_row.tpl -text svneol=unset#text/plain diff --git a/inc/expression-functions.php b/inc/expression-functions.php index b3ee099725..e1098bf301 100644 --- a/inc/expression-functions.php +++ b/inc/expression-functions.php @@ -263,19 +263,25 @@ function doExpressionMessage ($data) { // Expression call-back for template functions function doExpressionTemplate ($data) { - // Do the replacement - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'template='.$GLOBALS['current_template']); - $replacer = '{DQUOTE} . doTemplate' . $data['callback'] . "('" . $GLOBALS['current_template'] . "', true"; - - // Is 'value' set? - if (!empty($data['value'])) { - // Then include it as well - $replacer .= ", '" . $data['value'] . "'"; + // Init replacer + $replacer = ''; + + // Is the function there? + if (function_exists($data['callback'])) { + // Do the replacement + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'template='.$GLOBALS['current_template']); + $replacer = '{DQUOTE} . doTemplate' . $data['callback'] . "('" . $GLOBALS['current_template'] . "', true"; + + // Is 'value' set? + if (!empty($data['value'])) { + // Then include it as well + $replacer .= ", '" . $data['value'] . "'"; + } // END - if + + // Replacer is ready + $replacer .= ') . {DQUOTE}'; } // END - if - // Replacer is ready - $replacer .= ') . {DQUOTE}'; - // Replace the code $code = replaceExpressionCode($data, $replacer); diff --git a/templates/de/html/admin/admin_header.tpl b/templates/de/html/admin/admin_header.tpl new file mode 100644 index 0000000000..d6613b0989 --- /dev/null +++ b/templates/de/html/admin/admin_header.tpl @@ -0,0 +1,7 @@ +
+ {%template,MessageFloater%} +
+ +
+ : : : Willkommen zum Administrationsbereich : : : +
diff --git a/templates/de/html/admin/admin_welcome.tpl b/templates/de/html/admin/admin_welcome.tpl index 74251c207a..e9914b79cd 100644 --- a/templates/de/html/admin/admin_welcome.tpl +++ b/templates/de/html/admin/admin_welcome.tpl @@ -1,7 +1,3 @@ -
- : : : Willkommen zum Administrationsbereich : : : -
-
diff --git a/templates/de/html/admin/admin_welcome_admins.tpl b/templates/de/html/admin/admin_welcome_admins.tpl index 8b574d39df..f52cc61a37 100644 --- a/templates/de/html/admin/admin_welcome_admins.tpl +++ b/templates/de/html/admin/admin_welcome_admins.tpl @@ -1,7 +1,3 @@ -
- : : : Willkommen zum Administrationsbereich : : : -
-
diff --git a/templates/de/html/guest/guest_header.tpl b/templates/de/html/guest/guest_header.tpl index ef483cc32f..106908a6a0 100644 --- a/templates/de/html/guest/guest_header.tpl +++ b/templates/de/html/guest/guest_header.tpl @@ -1,4 +1,8 @@ +
+ {%template,MessageFloater%} +
+
diff --git a/templates/de/html/member/member_header.tpl b/templates/de/html/member/member_header.tpl index ec61a8dcb4..1a56aac049 100644 --- a/templates/de/html/member/member_header.tpl +++ b/templates/de/html/member/member_header.tpl @@ -1,3 +1,7 @@ +
+ {%template,MessageFloater%} +
+ diff --git a/templates/de/html/sponsor/sponsor_header.tpl b/templates/de/html/sponsor/sponsor_header.tpl index 1c9460c2e9..740370b346 100644 --- a/templates/de/html/sponsor/sponsor_header.tpl +++ b/templates/de/html/sponsor/sponsor_header.tpl @@ -1,3 +1,7 @@ +
+ {%template,MessageFloater%} +
+
Willkommen zum Sponsorenbereich von {?MAIN_TITLE?}