10 useful Joomla extensions / hacks
Here are 10 Joomla extensions and hacks that I’ve found useful. Some of them are a bit obscure but I have found them all invaluable at different times for making Joomla the flexible content management system I need it to be. I generally wouldn’t use all of these hacks in one website but just knowing what is possible by changing a few lines of code or by installing a free plugin can broaden your scope when designing for Joomla or help you when deciding if Joomla is suitable for a specific project.
1. Remove Mootools 1.1
Included in the core Joomla install and feeling its age a bit is Mootools 1.1. It can come in handy depending on the extensions you are using with your website but more and more I am either finding I don’t need it or worse it is deterring me from using other more powerful Javascript libraries for fear of conflicts.
There are two easy options for removing Mootools 1.1 from the front-end without affecting it’s uses by the admin panel, either through a few lines of PHP in your template file or using a simple Joomla extension.
Option 1
This tip uses a snippet of PHP at the start of the template’s index.php file and came from Highub – web tips. It only removes the Mootools 1.1 library from the front end but they also provide instructions for removing caption.js if you want to go all the way in streamlining your site.
<?php</pre> // Remove auto generated mootool from header $headerstuff = $this->getHeadData(); reset($headerstuff['scripts']); $moo = key($headerstuff['scripts']); unset($headerstuff['scripts'][$moo]); $this->setHeadData($headerstuff); ?><jdoc:include type="head"> <pre>
Option 2: ‘Mootools control’ plugin
This may be a more user friendly method if you are more familiar with the Joomla admin panel than the template files and requires nothing more than a simple plugin to select when and where Mootools 1.1 is implemented. This extension also enables you to change the Mootools file itself if needs be.
Mootools control is a free download from Kinesphere and is the method I have found myself using on a regular basis thanks to its ease of use.
2. Add classes to your menu items
I have needed this hack on a couple of occasions where I have been handed a design to be built in Joomla with a menu system that could only be achieved either by targeting each individual list item with a class selector or at the very least by styling the first and last menu items.
The solution came from Cecil Gupta’s blog in the form of a small adjustment to the mod_mainmenu/default.php overide file . Cecil’s solution only applies the class names to the first and last menu items but I modified it slightly to apply a class name to each specific menu item in order. This is the adapted version and instructions on usage can be found on Cecil’s blog.
</pre>
//NEW CODE STARTS HERE
$children_count = count($node->children());
$children_index = 0;
foreach ($node->children() as $child) {
$child->addAttribute('class', 'nav'.$children_index);
if ($children_index == 0) {
$child->addAttribute('class', 'first nav'.$children_index);
}
if ($children_index == $children_count - 1) {
$child->addAttribute('class', 'last nav'.$children_index);
}
$children_index++;
}
//ENDS HERE
3. All Videos Reloaded (AVR)
One of the reasons I often find myself turning to Joomla is when the client needs to be able to easily add video to their site. The extension All Videos Reloaded is a fork of the popular All Videos project and offers a flexible and powerful solution to adding video to your Joomla website.
4. Readmore Link
This is another case of being handed a design which isn’t possible to achieve with a standard Joomla installation. I had one particular case where the intro text needed to be nothing more than a large image and as such the whole thing needed to be a clickable ‘read more’ link.
The Alternative Readmore Link plugin turns any text or image into the readmore link by simply wrapping it in a pair of tags.
5. Superfish
This is by far my favorite drop down menu script which is now available as a plugin for Joomla 1.5. Superfish uses Jquery 1.2.6 and whilst it does come with an option to run Jquery in Mootools compatibility mode, if possible I would suggest removing Mootools (see tip 1) to avoid clashes and bloated pages.
6. Featured Items module
This may seem a bit of a strange choice seeing as there is a free Featured Articles module that performs a similar task but at only £5 I really liked this commercial version for the added flexibility and hackability which enables it to be used for a far broader variety of uses than the basic Featured Articles module.
The module offers the option to display a short excerpt from articles in a selected category, with link and optional thumbnail image. You can choose the number of characters displayed, the section, category and ID to be displayed, and whether to display a thumbnail image using the module parameters.
7. JoomlaFCK Editor
I install this alternative editor plugin at the beginning of every Joomla site I work on due to it’s rich set of features and easy to use interface. One really useful function that isn’t available in some other popular editors (uh hum… TinyMCE) is the ability to upload images straight from the editor interface rather than having to upload to the media library first. It doesn’t stop there though with bags of customisation options and a snappy, responsive feel. Best of all, it’s free.
8. Pop-up login box
More and more websites seem to be utilising modal windows to display additional information to users and whilst this can pose usability issues one common use of this type of functionality is to display login forms and this handy little hack on the Art of Joomla website enables you to do just that with a small adaptation to default_login.php override file. It uses the built in Mootools 1.1 Javascript library to do most of the work and just needs a few lines of extra code to get it working. If like me you are inclined to remove Mootools altogether to make way for a different library then I found this hack gave me all the clues I needed to achieve a similar effect using Jquery fancybox.
9. Joomla pack
A regular feature of best Joomla extension lists and for good reason, this component for Joomla 1 and 1.5 provides a really easy and powerful way to both backup and restore not only your Joomla databases but the entire install! Having toiled with Mysql dumps and automated database backups in the past discovering JoomlaPack was something of a revolution and an essential part of every Joomla install.
10. Confirm new users
Whilst this hack tampers with core Joomla files which can cause issues when it comes to upgrading your install it can also provide the solution to a problem which in my opinion should have been addressed by Joomla 1.5 from the outset and that is to allow new users to be vetted by the site administrator before becoming active.
This post over at Katipo Developers Blog provides instructions to change the sign up process to send both a acknowledgment email to the new users whilst sending the activation email to the site administrator to either grant or deny membership. It does take a a few steps to achieve this functionality but could be a life saver if required by the client.





