Archive for the ‘Joomla’ Category
Disable Mootools in Joomla 1.6
Disabling Mootools in Joomla 1.5 was actually pretty simple. All you need to to is add the following to your template above your head tag:
getHeadData();
$headers['scripts'] = array();
$this->setHeadData($headers);
// make sure to eliminate any of the following
//JHTML::_('behavior.framework', true);
//JHTML::_('behavior.mootools', true);
?>
In Joomla 1.6 this can remain the same if you adjust a tiny bit of Joomla internals. Specifically we need to modify the setHeadData() function in joomla16/libraries/joomla/document/html/html.php (around line 116).
// original version
$this->_scripts = (isset($data['scripts']) && !empty($data['scripts'])) ?
$data['scripts'] : $this->_scripts;
// updated version ( !empty() replaced with is_arrray() )
$this->_scripts = (isset($data['scripts']) && is_array($data['scripts'])) ?
$data['scripts'] : $this->_scripts;
What this does is allow Joomla to accept an empty value for $headers['scripts'] where it would previously reject it.
Let me know if you have any questions.
Happy coding!
Nginx / Memcached Direct Page Caching
There are a few different approaches to caching; data caching, fragment caching, and full-page caching. But first, here’s the typical model of a web application. User requests a page, and it works through the web server, through several layers, and finally to the database. Data caching takes the place of a database call and can be effective if there are a lot of database requests. You would typically want to do this if you know that a piece of data is very common and unlikely to change. This saves time on one step of the process. Fragment caching is a [...]
Joomla Sphinx Search Plugin
Beware, this is beta quality software. Use at your own risk. As we understand already, Joomla doesn’t have relevant searching. It’s a shame since everything else is designed well, but this is a problem regarding implementation. This article explains how to setup sphinx to index your Joomla articles and use my plugin to search using Joomla. In my own experiments I built a plugin that accomplished this. It works splendidly, and I had all intention of releasing the code to the public, but got distracted. This process is currently unrefined, but it works. I’m a fan of revision anyway, so [...]
Caching in Joomla 1.5 with Fault Tolerance
If you’ve used Joomla before, you may be aware that there are built-in caching features which you can activate to reduce the number of expensive database calls needed to render a page. This feature is also available to your own custom code, whether that be in the form of components, modules, or plugins. The actual mileage for this feature may vary due to the speed of the server and what Joomla decides to cache. Personally I think Joomla’s use of caching, specifically how they use it for articles, leaves something to be desired. The downsides include content that doesn’t get [...]
RSForm submissions too slow!—but easy to fix!
Joomla is a great platform for building web sites and RSForm is a great plugin for Joomla to handle form submissions—but with a recent project we found that RSForms was having some serious trouble with only a moderate amount of data (2,000 submissions). I tried to find the source of the problem and always got to the JOIN statement where it would routinely take 10+ seconds to run one query—add in multiple queries and filters and it would take over a minute just to get 500 or so records from MySQL. I almost gave up hope of finding a solution [...]