function addTweak($location, $callFunction) { if (!$this->isActive) { return; } if (empty($this->tweakName)) { NanoError('Tweaker Error', 'Tweak Name not specified', true); } global $tweakData; $tweakData[$this->tweakName]['tweaks'][] = array('location' => $location, 'callFunction' => $callFunction); registerTweak($location, $callFunction); }
if ($_GET['action'] == 'addpage') { addpage(); } elseif ($_GET['action'] == 'delete') { doDelete(); } elseif ($_GET['action'] == 'edit') { performEdit(); } elseif ($_GET['action'] == 'showpages') { showpageslist(); } elseif ($_GET['action'] == 'editarea') { doAreaEdit(); } elseif ($_GET['action'] == 'showareas') { nanoadmin_showareas(); } elseif ($_GET['action'] == 'settings') { nanoadmin_showsettings(); } elseif ($_GET['action'] == 'tweakers') { showTweakers(); } elseif (isset($_GET[tweak])) { showTweaksInterface(); } elseif (!isset($_GET['action'])) { $introPage = NANO_ADMIND_DESIGN_BASE . "intro.php"; runTweak('intro-page', array(&$introPage)); require_once $introPage; } } registerTweak('admin-body', 'do_admin_body'); // include the template of the admin area :) /////////////////////////////////////////////////// $adminPageName = NANO_ADMIND_DESIGN_BASE . "admindesign.php"; //debug($adminPageName,0); runTweak('admin-page', array(&$adminPageName)); //debug($adminPageName,1); require_once $adminPageName;