-
Notifications
You must be signed in to change notification settings - Fork 0
I want to take my site offline for maintenance rogierb
This is my first attempt to creat a WIKI page so bare with me.
[h2]Overview[/h2]
This approach relies on the build-in hook system.
[h2]Approach[/h2]
[h4]Step one[/h4] First of all we need to enable hooks. If you have already done so, skip to the next step
You have to edit the config.php file to enable hooks. Set the $config['enable_hooks'] to TRUE like so: [code] $config['enable_hooks'] = TRUE; [/code] You can find the file in the application/config folder
[h4]Step two[/h4] To let the system know what hook to use we need to edit hooks.php. This is in the application/config folder aswell
you need to insert the follwing code [code] $hook['pre_system'][] = array( 'class' => 'site_offline_hook', 'function' => 'is_offline', 'filename' => 'site_offline_hook.php', 'filepath' => 'hooks' ); [/code]