Yes, it is possible to use the excellent codeigniter framework on Joomla. In fact, I am surprised that it work pretty well with very little modification. The nightmares lies in the URI routing. Joomla uses the traditional uri query method while CI promote the use of segment based uri. I haven’t solve this issue completely, but we I am very confident that this can be done.
Anyway, below are some of the objectives of this project
- to provide an alternative framework to develop an application for Joomla
- make sure the application can stand on it’s own (running in a standalone mode, without Joomla)
- recode a few key Joomla functions such as user access, some Joomla helper function as CI’s shared library
How to use this
Just use your Joomla installer, and point to this file. Done.
If you notice the component is a little big. Codeigniter is bundled and will automatically be installed if required. For this example, please delete your /codeigniter folder if you have one installed as there is a tiny tweak to index.php file.
- Do take a look at install.ciexample.php to see some rough work on the CI installer.
- Note how the database is automatically configured at install time, so user do not ever have to edit the config file
- Only 1 copy of the application file exist for both standalone and Joomla component
- Joomla component only have 1 single file, that simply call CI’s index.php file
- currently only 1 controller is supported per apps, but this can be easily fixed with some routing rules, will fix this later
- When a different app is installed, it will have it’s own folders (controller/config/views/etc). This makes different apps cleanly separated and will helps avoid conflicts. To remove any apps, just delete the folder