Error! '.$result->getMessage().' '; } if( !is_callable( array( $database, 'loadNextRow' ))) { $database->setQuery( "SELECT id FROM #__components WHERE admin_menu_link = 'option=com_extplorer'" ); $id = $database->loadResult(); //add new admin menu images $database->setQuery( "UPDATE #__components SET admin_menu_img = '../administrator/components/com_extplorer/images/x_icon.png', admin_menu_link = 'option=com_extplorer' WHERE id=$id"); $database->query(); } } } if(!class_exists ( 'com_extplorerInstallerScript' )){ class com_extplorerInstallerScript { /** * Called on installation * * @param JAdapterInstance $adapter The object responsible for running this script * * @return boolean True on success */ public function install( $adapter){ $adminpath = JPATH_SITE.'/administrator/components/com_extplorer'; com_install($adminpath); $version = new JVersion; if($version->isCompatible('3.0')) rename($adminpath.'/extplorer.j30.php', $adminpath.'/extplorer.php'); return true; } /** * Called on update * * @param JAdapterInstance $adapter The object responsible for running this script * * @return boolean True on success */ public function update( $adapter) { return true; } /** * Called on uninstallation * * @param JAdapterInstance $adapter The object responsible for running this script */ public function uninstall( $adapter) { return true; } function preflight($type, $parent) { // $parent is the class calling this method // $type is the type of change (install, update or discover_install) } /** * method to run after an install/update/uninstall method * * @return void */ function postflight($type, $parent) { $db = jfactory::getdbo(); $db->setQuery( "UPDATE `#__menu` SET link='index.php?option=com_extplorer&tmpl=component' WHERE link = 'index.php?option=com_extplorer'" ); $db->query(); } } }