Installer script
The installer script file allows you to run code when your component is installed, uninstalled, or updated, and also before and after the component is installed. Create the file /administrator/components/com_folio/script.php
and add the following:
<?php defined('_JEXEC') or die; class com_folioInstallerScript { function install($parent) { $parent->getParent()->setRedirectURL('index.php?option=com_folio'); } function uninstall($parent) { echo '<p>' . JText::_('COM_FOLIO_UNINSTALL_TEXT') . '</p>'; } function update($parent) { echo '<p>' . JText::_('COM_FOLIO_UPDATE_TEXT') . '</p>'; } function preflight($type, $parent) { echo '<p>' . JText::_('COM_FOLIO_PREFLIGHT_' . $type . '_TEXT') . '</p>'; } function postflight($type, $parent) { echo '<p>' . JText::_('COM_FOLIO_POSTFLIGHT_' . $type . '_TEXT') . '</p>'; } }
The
install
function is run when your component...