From 83b9addde2c2c88c714246712eb3b393909fcbd0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 12 Sep 2010 21:28:22 +0000 Subject: [PATCH] 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 --- .gitattributes | 1 + inc/expression-functions.php | 28 +++++++++++-------- templates/de/html/admin/admin_header.tpl | 7 +++++ templates/de/html/admin/admin_welcome.tpl | 4 --- .../de/html/admin/admin_welcome_admins.tpl | 4 --- templates/de/html/guest/guest_header.tpl | 4 +++ templates/de/html/member/member_header.tpl | 4 +++ templates/de/html/sponsor/sponsor_header.tpl | 4 +++ 8 files changed, 37 insertions(+), 19 deletions(-) create mode 100644 templates/de/html/admin/admin_header.tpl 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?}
-- 2.39.5