plugins/SpecialAdmin.php
changeset 734 904fbf10f112
parent 716 d9533bb07563
child 731 8e6dbf6882c2
--- a/plugins/SpecialAdmin.php	Mon Sep 29 08:24:26 2008 -0400
+++ b/plugins/SpecialAdmin.php	Sun Nov 09 14:22:03 2008 -0500
@@ -44,8 +44,26 @@
     ));
 }
 
+$plugins->attachHook('session_started', 'SpecialAdmin_theme_init();');
 $plugins->attachHook('common_post', 'SpecialAdmin_include();');
 
+function SpecialAdmin_theme_init()
+{
+  global $db, $session, $paths, $template, $plugins; // Common objects
+  
+  // Admin pages that were too enormous to be in this file were split off into the plugins/admin/ directory in 1.0.1.
+  // Only load these files if we're looking to load the admin panel
+  list($pid, $ns) = RenderMan::strToPageID($paths->get_pageid_from_url());
+  if ( $ns == 'Admin' || ( $pid == 'Administration' && $ns == 'Special' ) )
+  {
+    // Set the theme
+    $session->theme = 'admin';
+    $session->style = 'default';
+    
+    $template->add_header('<script type="text/javascript" src="' . cdnPath . '/includes/clientside/static/admin-menu.js"></script>');
+  }
+}
+
 function SpecialAdmin_include()
 {
   global $db, $session, $paths, $template, $plugins; // Common objects
@@ -66,12 +84,6 @@
     require(ENANO_ROOT . '/plugins/admin/ThemeManager.php');
     require(ENANO_ROOT . '/plugins/admin/PluginManager.php');
     require(ENANO_ROOT . '/plugins/admin/CacheManager.php');
-    
-    // Set the theme
-    $session->theme = 'admin';
-    $session->style = 'default';
-    
-    $template->add_header('<script type="text/javascript" src="' . cdnPath . '/includes/clientside/static/admin-menu.js"></script>');
   }
 }
 
@@ -2093,7 +2105,7 @@
                 onclick: function()
                 {
                   var tigraentry = document.getElementById('i_div0_0').parentNode;
-                  var tigraobj = $(tigraentry);
+                  var tigraobj = $dynano(tigraentry);
                   var div = document.createElement('div');
                   div.style.backgroundColor = '#FFFFFF';
                   domObjChangeOpac(70, div);