Archive for the ‘Joomla’ tag

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!

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 [...]

Joomla 1.5 Sphinx Search Plugin

I just finished a large chunk of work on my own full-text search plugin for Joomla. It works in conjunction with Sphinx to index and search Joomla content “the right way.” (i.e. not using basic LIKE statements) Edit (Feb. 27, 2010): I just released a beta version of this plugin here: Joomla Sphinx Search Plugin Joomla has been notorious for not being able to sort search results by relevancy and really, it’s not very fast either. Sphinx allows for full-text searching on any type of database table (so you’re not forced to use MyISAM), and can even work with PostgreSQL [...]