How to Fix ReCAPTCHA Positioning Error in Joomla

Adding a captcha to a form is very easy with Google ReCAPTCHA. It only takes a few lines of code after you register your domain on the ReCAPTCHA site.

The problem that I discovered is that the captcha appears in Joomla at the very top of the page when it is used on a form. Its being positioned there with CSS in the joomla.css in the templates/css folder. You can modify the code to position it use relative instead of absolute references, or better still just comment out the line and position the captcha in your HTML page.

Search for recaptcha_widget_div in joomla.css and you’ll find something similar to the following code:

/* Compatibility */
#recaptcha_widget_div {position: absolute;top: -140px;}

Comment out the recapthca_widget_div line and the captcha will appear where you define it.

Adding an Adobe Edge Animation to Joomla

Once you’ve created your masterpiece in Adobe Edge Animate, you might want to use it with your Joomla site. The problem is that Joomla uses Mootools and it uses $ as a shortcut which jQuery (the JavaScript framework in Edge) uses as well.

The first option is modify all the shortcuts in the Edge animation and fix the links so that it will work. If you need to modify the animation at a later date in Edge, you will have to repeat this process again which is not a good use of your time.

An easier solution is to copy the Edge animation to your Joomla site (such as in the images folder) and use Joomla’s Wrapper module to display it. If you need to incorporate the animation in a module, embed it with an iframe:

<iframe width=”550” height=”400” frameborder=”0” src=”http://www.domain.com/images/animation/”>
</frame>

where animation is the folder containing your Edge Animation files.

How to Create a Loop in Adobe Edge Animate

There is no built-in function in Adobe Edge Animate (Preview 7) to create a loop to repeat an animation. This is useful for ads that need to repeat content.

You can create a loop using JavaScript with the following steps:

  1. Move the timeline marker to the end of the animation (see below).
  2. Insert a trigger (press Timeline on menu bar and select Insert Trigger).
  3. Enter this.play (0); below function(sym, e).

Adding a loop to an animated in Adobe Edge Animate.

You can’t preview the looping in Edge Animate, but it does work in a web browser.

How to Manually Install a Template in Joomla 2.5

You may occasionally run into a situation where you cannot install a template in your Joomla 2.5 site with Upload Package File in the Extension Manager. When this problem occurred in  Joomla 1.5, it was easy to fix because all that you had to do was upload your template into the templates folder and then you can set it as your default site theme. In Joomla 2.5, copying the template into this folder isn’t enough because you need to create entries in the database to recognize it.

The stored procedure below will add the appropriate entries to jos_extensions and jos_template_styles in your database. The prefix (jos_) for your tables is probably different so you’ll need to modify the script to match the actual value.

———-[ createtemplate.sql ] ————————————

DELIMITER //

CREATE PROCEDURE CreateTemplate (IN sTemplateName VARCHAR (255))
  BEGIN
    INSERT INTO jos_extensions (name, type, element, client_id, enabled, access, protected, manifest_cache, params, checked_out, checked_out_time, ordering, state)
      VALUES (sTemplateName, ‘template’, sTemplateName, 0, 1, 1, 0, ‘{}’, ‘{}’, 0, ’0000-00-00 00:00:00′, 0, 0);

    INSERT INTO jos_template_styles (template, client_id, home, title, params)
      VALUES (sTemplateName, 0, 0, sTemplateName, ‘{}’);
  END //

DELIMITER ;

———-[ createtemplate.sql ] ————————————

After you run the script, a stored procedure will be created in your database and you can run the following query to install your template:

         CALL CreateTemplate (‘my_template’);

where my_template is the name of the template that you are installing.

You can download the SQL script here.