How to use Joomla recaptcha plugin with my custom module?

In order to use joomla default recaptcha plugin follow these steps- 1)Get recaptcha keys from http://www.google.com/recaptcha 2)Set these keys to recaptcha plugin and activate it if it’s not. 3)Put below code where you want to show recaptcha //php code JPluginHelper::importPlugin(‘captcha’); $dispatcher = JDispatcher::getInstance(); $dispatcher->trigger(‘onInit’,’dynamic_recaptcha_1′); //html code inside form tag <div id=”dynamic_recaptcha_1″></div> 4)Put this code where … Read more

Importing jQuery into Joomla

This is the code we use to ensure only 1 copy of jQuery is imported. It simply checks to see if jQuery is already being imported and if not, then we import it 🙂 Joomla 2.5 <?php $app = JFactory::getApplication(); if (!$app->get(‘jquery’)) { $app->set(‘jquery’, true); JFactory::getDocument()->addScript(JUri::root() . ‘templates/template_name/js/jquery.js’); } ?> Joomla 3.x (no conflict mode): … Read more