views:

741

answers:

3

I'm creating a custom module for displaying VirtueMart categories, but need to disable VirtueMart from loading MooTools because it uses an older version of MooTools than what I need. I've searched everywhere, but I can't seem to find the file or function that will allow me to disable it. Any help would be greatly appreciated.

A: 

The only reference to it in the entire project is in mod_virtuemart_currencies.xml. I'm not 100% familiar with Joomla, but this looks like an installer file for a particular currency module.

I'd suggest removing that module, or updating the reference to the MooTools library it's using inside that XML file (line 30 in the currently available version, inside modules/mod_virtuemart_currencies_1.14.j15/mod_virtuemart_currencies.xml).

zombat
Thanks zombat, but that didn't do the trick, unfortunately. I didn't have that module enabled and deleting it didn't do much. It's not in a module because I don't have any of the modules enabled, so it has to be in the component somewhere.
VirtuosiMedia
A: 

I was able to resolve my issue. My custom module was using JHTML::script() to load my JavaScript files. That particular function has a third parameter that defaults to true that will automatically load MooTools. You can see the documentation here: http://docs.joomla.org/Adding_JavaScript

VirtuosiMedia
A: 

If that doesn't do it, put this in your template and it will remove any of the default scripts that Joomla tries to use. Obviously this might remove things necessary for Virtuemart to work right, but it might solve your problem too.

<?php
$user =& JFactory::getUser();
if ($user->get('guest') == 1) {
    $headers = $this->getHeadData();
    $headers['scripts'] = array();
    $this->setHeadData($headers); 
}
?>
Garrett Bluma