diff --git a/e107_admin/emoticon.php b/e107_admin/emoticon.php
index 72776efb1..918f7e08a 100644
--- a/e107_admin/emoticon.php
+++ b/e107_admin/emoticon.php
@@ -1,20 +1,18 @@
db_Count("core", "(*)", "WHERE e107_name = 'emote_default'"))
{ // Set up the default emotes
@@ -38,14 +38,19 @@ if(!$sql->db_Count("core", "(*)", "WHERE e107_name = 'emote_default'"))
// Change the active emote pack
if (isset($_POST['active']))
{
-if ($pref['smiley_activate'] != $_POST['smiley_activate'])
-{
- $pref['smiley_activate'] = $_POST['smiley_activate'];
- $admin_log->log_event($pref['smiley_activate'] ? 'EMOTE_02' : 'EMOTE_03',$pref['emotepack'],E_LOG_INFORMATIVE,'');
- save_prefs();
- $update = true;
- }
- admin_update($update);
+ if ($pref['smiley_activate'] != $_POST['smiley_activate'])
+ {
+ $pref['smiley_activate'] = $_POST['smiley_activate'];
+ $admin_log->log_event($pref['smiley_activate'] ? 'EMOTE_02' : 'EMOTE_03', $pref['emotepack'], E_LOG_INFORMATIVE, '');
+ save_prefs();
+ $update = true;
+ $emessage->add(LAN_UPDATED, E_MESSAGE_SUCCESS);
+ }
+ else
+ {
+ $emessage->add(LAN_NO_CHANGE);
+ }
+
}
@@ -92,7 +97,7 @@ foreach($_POST as $key => $value)
$check = TRUE;
//$check = $emote -> installCheck();
-$check = $emote -> installCheck($one_pack);
+$check = $emote->installCheck($one_pack);
if($check!==FALSE)
{
$emote -> listPacks();
@@ -120,38 +125,68 @@ class emotec
// List available emote packs
function listPacks()
{
- global $ns, $fl, $pref;
-
- $text = "
".EMOLAN_17."
".EMOLAN_18."
+
".EMOLAN_17."
".EMOLAN_18."
".EMOLAN_19." |
@@ -382,7 +432,7 @@ class emotec
-
+
";
@@ -591,5 +641,23 @@ class emotec
}
require_once("footer.php");
+/**
+ * Handle page DOM within the page header
+ *
+ * @return string JS source
+ */
+function headerjs()
+{
+ require_once(e_HANDLER.'js_helper.php');
+ //FIXME - how exactly to auto-call JS lan? This and more should be solved in Stage II.
+ $ret = "
+
+
+ ";
-?>
+ return $ret;
+}
+?>
\ No newline at end of file
diff --git a/e107_admin/header.php b/e107_admin/header.php
index 55447f4fd..ba37d3b74 100644
--- a/e107_admin/header.php
+++ b/e107_admin/header.php
@@ -12,9 +12,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/header.php,v $
-| $Revision: 1.19 $
-| $Date: 2008-11-14 06:01:06 $
-| $Author: e107coders $
+| $Revision: 1.20 $
+| $Date: 2008-12-14 21:01:58 $
+| $Author: secretr $
+---------------------------------------------------------------+
*/
@@ -442,26 +442,43 @@ if (!function_exists("parse_admin")) {
}
function admin_update($update, $type = 'update', $success = false, $failed = false) {
- global $ns;
+ global $e107;
+ require_once(e_HANDLER."message_handler.php");
+ $emessage = &eMessage::getInstance();
+
if (($type == 'update' && $update) || ($type == 'insert' && $update !== false)) {
- $caption = LAN_UPDATE;
- $text = "
".($success ? $success : LAN_UPDATED)."";
- } else if ($type == 'delete' && $update) {
- $caption = LAN_DELETE;
- $text = "
".($success ? $success : LAN_DELETED)."";
- } else if (!mysql_errno()) {
- if ($type == 'update') {
- $caption = LAN_UPDATED_FAILED;
- $text = "
".LAN_NO_CHANGE."
".LAN_TRY_AGAIN."";
- } else if ($type == 'delete') {
- $caption = LAN_DELETE;
- $text = "
".LAN_DELETED_FAILED.".
".LAN_TRY_AGAIN."";
+ //$caption = LAN_UPDATE;
+ //$text = "
".($success ? $success : LAN_UPDATED)."";
+ $emessage->add(($success ? $success : LAN_UPDATED), E_MESSAGE_SUCCESS);
+ }
+ elseif ($type == 'delete' && $update)
+ {
+ //$caption = LAN_DELETE;
+ //$text = "
".($success ? $success : LAN_DELETED)."";
+ $emessage->add(($success ? $success : LAN_DELETED), E_MESSAGE_SUCCESS);
+ }
+ elseif (!mysql_errno())
+ {
+ if ($type == 'update')
+ {
+ //$caption = LAN_UPDATED_FAILED;
+ //$text = "
".LAN_NO_CHANGE."
".LAN_TRY_AGAIN."";
+ $emessage->add(LAN_NO_CHANGE.' '.LAN_TRY_AGAIN, E_MESSAGE_INFO);
+ } elseif ($type == 'delete')
+ {
+ //$caption = LAN_DELETE;
+ //$text = "
".LAN_DELETED_FAILED.".
".LAN_TRY_AGAIN."";
+ $emessage->add(LAN_DELETED_FAILED.' '.LAN_TRY_AGAIN, E_MESSAGE_INFO);
}
- } else {
- $caption = LAN_UPDATED_FAILED;
- $text = "
".($failed ? $failed : LAN_UPDATED_FAILED." - ".LAN_TRY_AGAIN)."".LAN_ERROR." ".mysql_errno().": ".mysql_error();
+ }
+ else
+ {
+ //$caption = LAN_UPDATED_FAILED;
+ $text = ($failed ? $failed : LAN_UPDATED_FAILED." - ".LAN_TRY_AGAIN)."
".LAN_ERROR." ".mysql_errno().": ".mysql_error();
+ $emessage->add($text, E_MESSAGE_ERROR);
}
- $ns -> tablerender($caption, "
".$text."
");
+ //$e107->ns->tablerender($caption, "
".$text."
");
+ echo $emessage->render();
return $update;
}
diff --git a/e107_languages/English/admin/lan_emoticon.php b/e107_languages/English/admin/lan_emoticon.php
index 3da74463e..ffa269ec2 100644
--- a/e107_languages/English/admin/lan_emoticon.php
+++ b/e107_languages/English/admin/lan_emoticon.php
@@ -1,14 +1,12 @@
\ No newline at end of file
diff --git a/e107_languages/English/admin/lan_image.php b/e107_languages/English/admin/lan_image.php
index 4069593ae..93922d25f 100644
--- a/e107_languages/English/admin/lan_image.php
+++ b/e107_languages/English/admin/lan_image.php
@@ -1,9 +1,10 @@