From: Roland Häder <roland@mxchange.org>
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 = '<!-- ['.__FUNCTION__.':'.__LINE__.'] Call-back function doTemplate' . $data['callback']  . ' does not exist. //-->';
+
+	// 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 @@
+<div id="floater">
+	{%template,MessageFloater%}
+</div>
+
+<div align="center">
+	<strong class="big">: : : Willkommen zum Administrationsbereich : : :</strong>
+</div>
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 @@
-<div align="center">
-	<strong class="big">: : : Willkommen zum Administrationsbereich : : :</strong>
-</div>
-
 <div align="center">
 <table border="0" cellspacing="0" cellpadding="0" width="100%">
 	<tr>
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 @@
-<div align="center">
-	<strong class="big">: : : Willkommen zum Administrationsbereich : : :</strong>
-</div>
-
 <div align="center">
 <table border="0" cellspacing="0" cellpadding="0" width="100%">
 	<tr>
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 @@
 <!-- Gast-Tabelle - Anfang //-->
+<div id="floater">
+	{%template,MessageFloater%}
+</div>
+
 <table border="0" cellspacing="0" cellpadding="0" width="100%" class="guest">
 	<tr>
 		<td colspan="3" align="center" valign="top" class="table_header">
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 @@
+<div id="floater">
+	{%template,MessageFloater%}
+</div>
+
 <a name="TOP"></a>
 <table border="0" cellspacing="0" cellpadding="0" width="100%" class="member_main">
 <tr>
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 @@
+<div id="floater">
+	{%template,MessageFloater%}
+</div>
+
 <div class="big">
 	Willkommen zum Sponsorenbereich von {?MAIN_TITLE?}
 </div>