Solution: Artisteer & EasyCalcCheck Plus Cause Joomla Display Error

Tech


Joomla!

Joomla is one of the world’ s most popular open source CMS (content management system).

Version: 1.5-2.5
Developer: Open Source Matters, Inc.
Link: http://www.joomla.org


Artisteer

Artisteer is the first and only Web design automation product that instantly creates fantastic looking, unique website templates and blog themes.

Version: 3.x
Developer: Extensoft, Inc.
Link: http://www.artisteer.com


EasyCalcCheck Plus (ECC+)

Protects Joomla! forms and 3rd party extensions by integrating anti-spam services and internal anti-spam checks.

Version: 1.5-14-1, 1.7-3, 2.5-1
Developer: Kubik-Rubik - Viktor Vogel
Link: http://joomla-extensions.kubik-rubik.de/ecc-easycalccheck-plus


Background


For Joomla, one of the most powerful features of ECC+ is that it allows you to easily implement Google Recaptcha security on your contact page's email form. This addition dramatically reduces unwanted spam emails.


Artisteer, ECC Plus, and Google Recaptcha


However, when combined with a Artisteer 3 theme, the Recaptcha input field gets obscured behind the email form submission button. The result is that both the email form and the Recaptcha stop working.


Artisteer, ECC Plus, and Google Recaptcha Broken


Solution


Joomla 1.7-2.5

The solution to this dilemma is quite simple for Joomla 1.7-2.5 users. Important: Always make a backup of your site files and database prior to implementing any significant changes.

1. Login to your Joomla back-end.
2. Go to Administrator>>Extensions>>Plugin Manager>>System - EasyCalcCheck PLUS - ECC+.
3. Click the Additional Information parameter tab.
4. Find the input field labeled Alternative search string (Info).


ECC Plus alternative search string field


5a. Type the following into the field.

{codecitation class="brush:xhtml" width="550px" }

<span class="art-button-wrapper">

{/codecitation}


5b. Please note, the class name prefix "art-" may be different for your theme. Artisteer allows the designer to specify the class name prefixes. "art-" is the default prefix. You may need to change the prefix to match your Artisteer theme.
6. Save your changes.

That should do it. The Google Recaptcha security box and the email form submission button should now behave correctly.

Enjoy success!


Joomla 1.5

For Joomla 1.5 users, the solution is a bit more complicated, but not by much. You will need to edit some code. However, the code edits are equivalent to some simple copy and pastes. Important: Always make a backup of your site files and database prior to implementing any significant changes.

1. FTP into your site.
2. Go to joomla_root_directory/plugins/system/
3. Download the file named easycalccheckplus.php
4. Make a local copy of the file and name it easycalccheckplus-backup.php
5. Open easycalccheckplus.php in your a simple text editor.
6. Find the following block of code, starting around line 899.

{codecitation class="brush:php;first-line:899;" width="550px" }

if ($option == 'com_contact')

{

  // ohne Overrides

  if ($this->params->get('rockettheme'))

  {

    $pattern = '@(<div class="readon">)@';

  }

  else

  {

    $pattern = '@(<button class="button validate" type="submit">)@';

  }

  if (preg_match($pattern, $body, $matches))

  {

    $searchString = $matches[0];

  }

  else // mit Overrides

  {

    $pattern = '@<form[^>]*id="emailForm".*>.*(<[^>]*type="submit".*>).*</form>@isU';

    if (preg_match($pattern, $body, $matches))

    {

      $searchString = $matches[1];

    }

  }

}

{/codecitation}


7. Find the following line in the block, about line 908.

{codecitation class="brush:php;first-line:908;" width="550px" }

$pattern = '@(<button class="button validate" type="submit">)@';

{/codecitation}


8a. Comment out the original line and add the line that follows.

{codecitation class="brush:php;first-line:908;" width="550px" }

//$pattern = '@(<button class="button validate" type="submit">)@';

$pattern = '@(<span class="art-button-wrapper">)@';

{/codecitation}


8b. Please note, the class name prefix "art-" may be different for your theme. Artisteer allows the designer to specify the class name prefixes. "art-" is the default prefix. You may need to change the prefix to match your Artisteer theme.

The resulting code block will look something like the following.

{codecitation class="brush:php;first-line:899;" width="550px" }

if ($option == 'com_contact')

{

  // ohne Overrides

  if ($this->params->get('rockettheme'))

  {

    $pattern = '@(<div class="readon">)@';

  }

  else

  {

    //$pattern = '@(<button class="button validate" type="submit">)@';

    $pattern = '@(<span class="art-button-wrapper">)@';

  }

  if (preg_match($pattern, $body, $matches))

  {

    $searchString = $matches[0];

  }

  else // mit Overrides

  {

    $pattern = '@<form[^>]*id="emailForm".*>.*(<[^>]*type="submit".*>).*</form>@isU';

    if (preg_match($pattern, $body, $matches))

    {

      $searchString = $matches[1];

    }

  }

}

{/codecitation}


9. Save your changes.
10. upload your modified file to its original location on your server(joomla_root_directory/plugins/system/easycalccheckplus.php).

That should fix you up. Both Google Recaptcha and the email form submission button should be working correctly now.

Enjoy success!