The Joomla! Extensions Directory ™

Mihai Cazac

Reviews(1)
 
byMihai Cazac, January 31, 2010
Very simple, very useful; no fuss, just code. Thank you!
I have used it for a Java Script embedded in HTML like this:

1. Download and install the plugin.
2. Enter in the Plugins Manager and search for "Content - JIncludes"
3. Enable the plugin
4. Edit the plugin

In the "Parameters" section, fill the fields as follows:

#1 key: YearsPassed
#1 type: HTML (input code)
#1 code:


// get number of years passed from 01 Jan 1991

var today = new Date(); // today
var di = new Date(1991,01,01,0,0,0,0); // 1991

document.write(today.getFullYear() - di.getFullYear());



5. Save
6. Edit an article and put the following text in:

In 1991 I was {{YearsPassed}} years younger.

7. Save the article and view the output page.

Thank you again. I will use this plugin for a lot of things...