From 197174b2e04af2255e07921f0cb1234b6c262d29 Mon Sep 17 00:00:00 2001 From: CaMer0n Date: Tue, 3 May 2011 22:39:51 +0000 Subject: [PATCH] More usersettings template options. --- .../templates/usersettings_template.php | 6 +++ usersettings.php | 44 ++++++++++++------- 2 files changed, 34 insertions(+), 16 deletions(-) diff --git a/e107_themes/templates/usersettings_template.php b/e107_themes/templates/usersettings_template.php index f2fbad325..ad4949ba6 100755 --- a/e107_themes/templates/usersettings_template.php +++ b/e107_themes/templates/usersettings_template.php @@ -96,6 +96,12 @@ $USEREXTENDED_FIELD = " "; $REQUIRED_FIELD = "{FIELDNAME} *"; +// After Saving has occurred. +$USERSETTINGS_MESSAGE = "
{MESSAGE}
"; +$USERSETTINGS_MESSAGE_CAPTION = LAN_OK; + +$USERSETTINGS_EDIT_CAPTION = LAN_USET_39; // 'Update User Settings' + $USERSETTINGS_EDIT = "
diff --git a/usersettings.php b/usersettings.php index 05c663982..253121d6d 100644 --- a/usersettings.php +++ b/usersettings.php @@ -540,8 +540,19 @@ if ($dataToSave && !$promptPassword) { header('Location: index.php'); } - $message = "
".$message.'
'; - $caption = LAN_OK; + + if(isset($USERSETTINGS_MESSAGE)) + { + $message = str_replace("{MESSAGE}",$message,$USERSETTINGS_MESSAGE); + } + else // backwards compatible + { + $message = "
".$message.'
'; + + } + + $caption = (isset($USERSETTINGS_MESSAGE_CAPTION)) ? $USERSETTINGS_MESSAGE_CAPTION : LAN_OK; + } // End - if (!$error)... @@ -661,24 +672,25 @@ if (e_QUERY == "update") $text .= "

".str_replace("*", "*", LAN_USET_9)."
".LAN_USET_10."

"; } -$text .= $tp->parseTemplate($USERSETTINGS_EDIT, true, $usersettings_shortcodes); -$text .= "
"; +$text .= $tp->parseTemplate($USERSETTINGS_EDIT, TRUE, $usersettings_shortcodes); -$text .= " - -
+ +$text .= "
"; -$ns->tablerender(LAN_USET_39, $text); - if(!$adminEdit) - { - require_once (FOOTERF); - } - else - { - require_once(e_ADMIN."footer.php"); - } +$caption = (isset($USERSETTINGS_EDIT_CAPTION)) ? $USERSETTINGS_EDIT_CAPTION : LAN_USET_39; // 'Update User Settings' + +$ns->tablerender($caption, $text); + +if(!$adminEdit) +{ + require_once (FOOTERF); +} +else +{ + require_once(e_ADMIN."footer.php"); +}