This article covers - how to install CiviCRM v2.0 on Joomla 1.5 without Legacy support. It also provides some insight into the way components are organized and accessed through Joomla.
This post is intended as exploratory and to help push things forward towards 1.5 compatibility which is planned for the 2.1 release. Please note that CiviCRM 2.0 is officially NOT COMPATIBLE with Joomla 1.5 and that the CiviCRM team will not provide support for folks trying to run this combination.
For Joomla, CiviCRM is nothing but a component. When the component is loaded from the front end (doesn't require admin login), Joomla looks for a file with the component's name ending in .php file (civicrm.php in this case). Similarly if the component is loaded from the back end (admin area), Joomla looks for a file with the name like admin.componentName.php (admin.civicrm.php in our case).
If you extract the CiviCRM tarball, you can see both the files present in the list:
admin.civicrm.php civicrm/ civicrm.html.php civicrm.php civicrm.xml configure.php install.civicrm.php toolbar.civicrm.php uninstall.civicrm.php
XML component installation files
-
For the most part, XML component installation files for Joomla 1.5 are similar to the ones used in 1.0. For the installation and uninstallation queries, the SQL is now migrated to external files, with the flexibility of including different SQL files for different database types.
And since, CiviCRM handles all the installation and un-installation operations from configure.php, which is called via admin.civicrm.php (in 2.0), limited set of changes are required in civicrm.xml file.
Changes required in civicrm.xml file1. Replace tags <mosinstall> and </mosinstall> with <install> and </install> tags respectively.
2. Add version attribute to <install> tag, for e.g <install type="component" version=”2.0”>
-
The back-end code is now sorted into a separate folder that you can specify in the folder parameter of the <files> tag in the <administration> section.
Security fixes
-
Joomla 1.5 no longer support accessing variables like $mosConfig_absolute_path, $mosConfig_user through global environment, for e.g : include( $mosConfig_absolute_path . '/components/com_yourcomponent/yourcomponent.class.php' );
-
Changes in admin.civicrm.php file
After applying changes, the following lines :
-
Similarly for file configure.php, the following lines:
After having changed these three files - admin.civicrm.php, configure.php and civicrm.xml, we are ready with the package which can be installed on Joomla 1.5, without legacy support. Also make sure variable '$live_site' is set in joomla/configuration.php before you begin with the installation.
Note: All The changes shown, are the minimal set of changes required to install CiviCRM without legacy support. There could be many improvements, most of which is expected to be seen with CiviCRM v2.1.
Comments
I am so psyched, thanks so much for documenting this!
Elin
Thanks for that, worked straight up!
your corrected version of configure.php appears significantly different than the configure.php included in the 2.0.2 zip for Joomla, so I am a little lost on that last correction. Is this for a previous version of 2.0? Thanks!!
Don't think configure.php has gone under any changes in v2.0 sub-revisions (2.0.x).
So should work for any 2.0.x version as long as there hasn't been any changes in the file
Significant changes are result of avoiding the use of global. Check http://dev.joomla.org/component/option,com_jd-wiki/Itemid,31/id,tips:make_secure/ for more details.
I installed on Joomla 1.5.6 the current civiccrm-2.1-beta3 today. All went smooth using the install via upload of the zip file. I have done a very quick looksee of the component home/admin and done a few prelims as shown in install instructions, all seems aok. I am certainly not a developer, just a very avg user yet it installed nicely. This is a very good thing of which you should be proud. I wonder if there is any other tutorial instead of the tutorial videos? My system doesn't show them at all, just a blank screen? hmmm? I would appreciate info on developing civimembers mostly as I begin to learn it.
thanks much,
PapaLion