Saturday, March 13, 2010

Workaround for Joomla 1.5 and Mootools 1.2 Integration

Hi folks, I was stuck for some while to make my joomla installation work as required since the backend was still using mootools 1.11 while I was using mootools 1.2 .
This is how I solved it.
Edit the file behavior.php which is located in /libraries/joomla/html/html  ( your path may be different.. search for the file in that case )

Move to line 53

and add the following code in the else block

$a = $_SERVER['PHP_SELF'];
       
        if(strstr($a,'administrator'))       

            JHTML::script('mootools.js', 'media/system/js/', false);

            else JHTML::script('new.mootools.js', 'media/system/js/', false);

What this code is supposed to do is, check the current URL, and if it contains the word administrator, the old version of mootools is loaded,
else the newer version of mootools is loaded.

No comments:

Post a Comment