Saturday, April 13, 2013

How to fix DJ Image Slider Slides Not Working On Joomla!

PROBLEM
 
Published DJ Image Slider without problem but slide is not functioning.

SOLUTION

Some Joomla! Template disable MooTools to improve the load speed of the website. Unfortunately, there will be some components that are not usable when it is disable and it include DJ Image Slider. Enabling MooTools is easy, we just need to find the script that  restrained it to initiate. In our case, we found it on the templates itself (see the code below).

// unset scripts, put them into /js/template.js.php to minify http requests
unset($doc->_scripts[$this->baseurl.'/media/system/js/mootools-core.js']);
unset($doc->_scripts[$this->baseurl.'/media/system/js/core.js']);
unset($doc->_scripts[$this->baseurl.'/media/system/js/caption.js']);

It is clearly stated that they restrained MooTools in order to minify http requests, meaning, to increase the website speed. To activate the script, we just need to comment out the 3 lines of code above (see the code below).

// unset scripts, put them into /js/template.js.php to minify http requests
//unset($doc->_scripts[$this->baseurl.'/media/system/js/mootools-core.js']);
//unset($doc->_scripts[$this->baseurl.'/media/system/js/core.js']);
//unset($doc->_scripts[$this->baseurl.'/media/system/js/caption.js']);

Now, your DJ Image Slider will function without any problem.