Joomla Javascript in the Frontend

This is for all your Joomla Developers out there. When trying to add Joomla javascript to the frontend like the pop calendar, it only works for the registered users. This is because the code currently only loads joomla.javascript.js for registered users and when joomlaJavascript has been set in the mainframe object. So what do you do then? Add this one liner to your code:

$mainframe->set(‘joomlaJavascript’, 1);

Thats it, now you have the javascript pop calendar in the frontend. Little update on the current calendar installed with Joomla. It is one created by dynarch.com. Joomla currently uses 0.9.2 and with the next release they should be upgrading to 0.9.4 which allows for adding of time allow with the date.

Nonprofit news, strategy, and tactics sent straight to your inbox
Sign up for the Soapbox Engage newsletter




This entry was posted on Tuesday, December 5th, 2006 at 5:56 pm and is filed under CMS, Joomla, Joomla 1.5, open source, quick tips. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

3 Responses to “Joomla Javascript in the Frontend”

  1. chetan says:

    I want to apply validation code of javascript from the front end in joomla. What is the solution of this problem?

  2. wil says:

    a side note

    setting $mainframe->set(’joomlaJavascript’, 1); allows all public users the same access as registered users, which may bring up security issues

  3. Jay says:

    Hello,

    What u mean by “bring up security issues”. Because i just take look in the core and it seems that activating ’joomlaJavascript’ just add a element.

    And the ChangeLog says : 01-Dec-2005 Andrew Eddie + Component may force frontend application to include joomla.javascript.js by: $mainframe->set( ‘joomlaJavascript’, 1 );

    Anyway, thx for the tip ;)

Leave a Reply

You must be logged in to post a comment.