if (!class_exists('shSEFConfig')) { if (is_readable($sef_config_class)) { include JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_sh404sef' . DS . 'shSEFConfig.class.php'; require_once $sef_config_class; } else { JError::RaiseError(500, COM_SH404SEF_NOREAD . "( {$sef_config_class} )<br />" . COM_SH404SEF_CHK_PERMS); } } $sefConfig = new shSEFConfig(); // instal module $source = $this->parent->getPath('source'); $status = shInstallModule('mod_sh404sef_cpicon', $source); // install plugins $status = shInstallPluginGroup('system'); $status = shInstallPluginGroup('sh404sefcore'); $status = shInstallPluginGroup('sh404sefextplugins'); // now we insert the 404 error page into the database // from version 1.5.5, the default content of 404 page has been largely modified // to make use of the similar urls plugin (and potentially others) // so we want to make sure people will have the new version of the 404 error page shUpdateErrorPage(); // apply various DB updates shUpdateDBStructure(); // message // decide on help file language $lang =& JFactory::getLanguage(); $languageName = $lang->get('backwardlang', 'english'); $basePath = JPATH_ROOT . '/administrator/components/com_sh404sef/language/%s.postinstall.php'; // fall back to english if language readme does not exist jimport('joomla.filesystem.file'); if (!JFile::exists(sprintf($basePath, $languageName))) {
$result = JFile::copy($oldCustomConfigFile, JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_sh404sef' . DS . 'custom.sef.php'); } $sef_config_class = JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_sh404sef' . DS . 'sh404sef.class.php'; // Make sure class was loaded. if (!class_exists('SEFConfig')) { // V 1.2.4.T was wrong variable name $SEFConfig_class instead of $sef_config_class if (is_readable($sef_config_class)) { require_once $sef_config_class; } else { JError::RaiseError(500, COM_SH404SEF_NOREAD . "( {$sef_config_class} )<br />" . COM_SH404SEF_CHK_PERMS); } } $sefConfig = new SEFConfig(); // install plugins $status = shInstallPluginGroup('system'); $status = shInstallPluginGroup('sh404sefcore'); // now we insert the 404 error page into the database // from version 1.5.5, the default content of 404 page has been largely modified // to make use of the similar urls plugin (and potentially others) // so we want to make sure people will have the new version of the 404 error page shUpdateErrorPage(); // apply various DB updates shUpdateDBStructure(); // message if (file_exists(JPATH_ROOT . DS . 'plugins' . DS . 'system' . DS . 'shsef.php')) { // success ! echo '<div style="text-align: justify;">'; echo '<h1>sh404SEF installed succesfully! Please read the following</h1>'; echo 'If it is the first time you use sh404SEF, it has been installed but is <strong>disabled</strong> right now. You must first edit sh404SEF configuration (from the <a href="index.php?option=com_sh404sef" >sh404SEF Components</a> menu item of Joomla backend), <strong>enable it and save</strong> before it will become active. Before you do so, please read the next paragraphs which have important information for you. If you are upgrading from a previous version of sh404SEF, then all your settings have been preserved, the component is activated and you can start browsing your site frontpage right away.'; echo '<br /><br />'; echo '<strong><font color="red">IMPORTANT</font></strong> : sh404SEF can operate under two modes : <strong><font color="red">WITH</font></strong> or <strong><font color="red">WITHOUT .htaccess</font></strong> file. The default setting is now to work <strong>without .htaccess file</strong>. I recommend you use it if you are not familiar with web servers, as it is generally difficult to find the right content for a .htaccess file.<br /><br />';