ToHeader Joomla plugin
Facts - Php
Friday, 08 August 2008 11:48
Article Index
ToHeader Joomla plugin
Using the ToHeader Plugin
Download the ToHeader Content Plugin
Question
Invalid XML
Mootools.js disabled
All Pages

Why using this plugin

I have a couple of websites containing many forms. At the moment these forms use FacileForms but I would like to use more basic stuff, like javascript combined with Ajax calls.

The javascript/Ajax framework jQuery offers enough functionality to build my forms. So I would like to use jQuery from joomla 1.5.x. I did a search to see what plugins and modules are available. First I found the jxcore plugin. This is a system plugin that can be used from other plugins. I asked how to use this plugin but never got a reply. I guess that this plugin can only be used from joomla php code. This is not what I want, I want to call jQuery functions by typing javascript into the Joomla article content.

From the jQuery website I figured out that all I need is a plugin that can insert some custom javascript code into the html head tag of my joomla pages. I found another plugin that can do this: the Custom Head Tag plugin from www.joomler.net. In the plugin configuration you can enter jQuery javascript and you can include javascript files. In the plugin configuration you can also enter the id's of the articles, categories and sections in which javascript will be inserted into the html head tag. Like the jxcore plugin a system plugin: it can not be directly called from the content of a joomla article.

I tested the Custom Head Tag plugin and it indeed works with jQuery javascript. By calling jQuery from the plugin I was even able to do Ajax calls from Joomla.

I could do my coding with this plugin but what I really want is a plugin including jQuery scripts. Such a plugin would make my forms easier to administer. So I requested the author of the Custom Head Tag plugin to make the enhancement. But then I found out that what I had requested came down to coding a new plugin rather than making just a simple enhancement. So I wrote the plugin myself.