Correct use of MooTools on your Site

Some of our Joomla! extensions use the MooTools JavaScript framework for effects and browser side functions, those are:

Each extension comes with its own MooTools library containing the required MooTools modules to have the required functional set for that particular extension. The MooTools framework is Component oriented, so some other extensions might leave out MooTools components required by our extensions.

Other Java-Scripts or especially other Framework Libraries may influence MooTools and its functions we use. When using Joomla! Extensions that utilize other JavaScript Frameworks such as Prototype or JQuery our extensions browser side functions may fail. Also JavaScript Errors may occur. Only solution to such is to stay with only one type of JavaScript Framework or refrain from using our extensions.

Use of the Header Image Slideshow Feature, MooBot and the Web-Call-Back Links Plugin with other JavaScript Frameworks than mooTools, especially Prototype or JQuery are mutually exclusive.

All of our extensions have a parameter that allows to set whether to use the MooTools library that comes with the extension, or to use your own implementation of it. In case the MooTools framework is only used for our extensions, use the library that comes with our extensions by using said parameter setting.

Joomla 1.5 for instance may alread load the MooTools framework with the site per default, in such case disable the MooTools library from our extensions using the parameter setting. See the individual extensions documentation for more on that.

In our support history we often come accross issues that are caused by having multiple MooTools libraries with differing component sets loaded on the site. Some other extensions or templates are already including MooTools with it and loading it. However, the version and function set may differ and may create issues with our extensions. Following these rules will help to have a clean site with the correct MooTools library only loaded once while still maintaining full function.

Joomla 1.5.x already has MooTools 1.11 included in its core and is using it with the templates. So when using this Joomla Version, best is to tell our extensions use the MooTools of your template by using the related parameter setting.

Joomla 1.0.x comes without any JavaScript Framework, so the choice here is to either let our extension load MooTools when required, or to implement the library with your template, in case you have more than one extension using it. For that see the following for some tips and directions.

MooTools 1.11 is not offered for download anymore from its homepage at with release of its successor version. So we historically offer these libraries here for download without taking over any responsibility for its correct functions, without any support or related service:
<dirlisting “/home/server/local/service/download/”>

All of our extensions are released for use with MooTools 1.11.

Our extensions are currently generally for MooTools 1.11 only. Except the listed below have been tested and are compatible with MooTools 1.2. You may experience difficulties when using MooTools 1.2 with extensions not listed here.

When upgrading your Joomla! installation to MooTools 1.2, that is currently a inofficial procedure. You may experience difficulties, as all our extensions are currently written for MooTools 1.11.

As long as MooTools 1.11 will be the default JavaScript Framework for Joomla!, our extensions will remain on that version of the JS-Framework. However, all Source Code of the JavaScripts is installed and may get modified by yourself to correct for MooTools 1.2. A good debugging tool for doing that is the Firefox Plugin “FireBug”.

Download MooTools 1.2 or higher from MooTools Homepage selecting all Components and Plugins of CORE and MORE and the type of Compression you prefer.

To allow some level of backwards compatibility, use the following Compatibility Layer, which has received some custom additions for our Joomla! Extensions:
<dirlisting “/home/server/local/service/download/”>

The following of our extensions have been tested and are released for use with the MooTools 1.2 framework using the backwards compatibility layers:

Put the MooTools files into your sites file structure and load MooTools libraries with your template:

When using MooTools 1.11

For Joomla 1.0: Example Template index.php when using MooTools 1.11

  <script type="text/javascript" src="templates/<?php echo $cur_template ?>/js/mootools/mootools.js"></script>

For Joomla 1.5: Example Template index.php when using MooTools 1.11

  <script type="text/javascript" src="templates/<?php echo $this->template ?>/js/mootools/mootools.js"></script>

When using MooTools 1.2

For Joomla 1.0: Example Template index.php when using MooTools 1.2

  <script type="text/javascript" src="templates/<?php echo $cur_template ?>/js/mootools/mootools-1.2.1-core.js"></script>
  <script type="text/javascript" src="templates/<?php echo $cur_template ?>/js/mootools/mootools-1.2-more.js"></script>
  <script type="text/javascript" src="templates/<?php echo $cur_template ?>/js/mootools/mootools-1.2-compat.js"></script>

On Joomla 1.5:
To maintain compatibilty for the Administration Backend of Joomla 1.5, it is advised to use MooTools 1.2 only for the Frontend Pages. For this, there are following alternatives available:

  • See this discussion thread here on more how to modify the Joomla! Core of your installation for the use of MooTools 1.2. When using the core modifications described on said discussion thread, ensure to also add the Compatibility Layer files to the source code modifications. This solution has the drawback that the source code modifications need to be redone on any version upgrade to your Joomla! Core.
  • To keep upwards compatibility for your Joomla! Core the following example shows a alternative, by clearing the Header Buffer from the scripts Joomla! is adding by itself. This is a template based modification, which does work with extensions loading their own Scripts or Stylesheets into the Header Buffer. And by that also transparent and not affected by any version upgrade to your Joomla! Core.

For Joomla 1.5: Example Template index.php when using MooTools 1.2

  <!-- Load MooTools by the template, and at the top before any other scripts -->
    /* --- This removes any Joomla default Scripts from the Header Buffer --- */
    $header = $this->getHeadData();                   // Get the current HEAD buffer
    $header['scripts'] = array();                     // Clear all current 'scripts' entries
    $this->setHeadData($header);                      // Update the HEAD buffer
    /* --- We add the MooTools Framework manually, see below --- */
  <!-- Load MooTools at first -->
  <script type="text/javascript" src="templates/<?php echo $this->template ?>/js/mootools/mootools-1.2.1-core.js"></script>
  <script type="text/javascript" src="templates/<?php echo $this->template ?>/js/mootools/mootools-1.2-more.js"></script>
  <script type="text/javascript" src="templates/<?php echo $this->template ?>/js/mootools/mootools-1.2-compat.js"></script>
  <!-- Now all other scripts from extensions -->
  <jdoc:include type="head" />

Our Extensions provide a setting controlling if the MooTools Framework shall get loaded by the Extension or a existing MooTools library shall get used:

Use this mambots mooTools library for effects

The Extension will load the mooTools library that comes shipped with it automatically.

I have mooTools ... fully loaded in the template

The mooTools library is already loaded with the template and the Extension will use that library for its effects and browser side functions.
Use this route when having MooTools loaded with your template and ensure that the MooTools library loaded with your template includes all available MooTools Components.

Any other extension also loading MooTools for its purpuses now are required to prevent loading its own version of MooTools. Otherwise again multiple versions of MooTools will be loaded on your site. That may get accomplished by:

  • Identifying the extensions also loading MooTools.
  • Modifying their source code to remove the MooTools <script> tag being the best way.
  • Or by removing or renaming other mootools.js from your sites filesystem. This however may leave <script> tags in your site with inaccessible targets.