here is code to blend EasyCaptcha into layout ArtForms.
file:
administrator/components/com_artforms/lib/af.lib.afforms.php
line: 696
EasyCaptcha 1.3 stable
ArtForms v. 2.1 b7.1
joomla 1.0.15
find this code:
case '7': //easycaptcha component
if(file_exists($mosConfig_absolute_path.'/components/com_easycaptcha/class.easycaptcha.php')) {
$html = '<div align="center">';
include_once($mosConfig_absolute_path.'/components/com_easycaptcha/class.easycaptcha.php');
$captcha = new easyCaptcha();
$html .= '<input type="hidden" name="captcha_id" value="'.$captcha->getCaptchaId().'" />
<img src="'.$captcha->getImageUrl().'" alt="'.$captcha->getAltText().'" /><br /><br />
'.ARTF_CAPTCHA_TITLE.': <input type="text" name="captcha_code" class="easycomments_post_input" />';
$html .= '</div>';
replace code with:
case '7': //easycaptcha component
if(file_exists($mosConfig_absolute_path.'/components/com_easycaptcha/class.easycaptcha.php')) {
include_once($mosConfig_absolute_path.'/components/com_easycaptcha/class.easycaptcha.php');
$captcha = new easyCaptcha();
//image on one row
$html = '<div class="clear"></div>';
$html .= '<div style="margin-left:15px;">';
$html .= '<div style="float:left;margin-top:5px;width:100px;">';
$html .= '</div>';
$html .= '<div style="float:left;margin-top:5px;">';
$html .= '<input type="hidden" name="captcha_id" value="'.$captcha->getCaptchaId().'" />';
$html .= '<img src="'.$captcha->getImageUrl().'" alt="'.$captcha->getAltText().'" />';
$html .= '</div>';
$html .= '</div>';
//label and input on next row
$html .= '<div class="clear"></div>';
$html .= '<div style="margin-left:15px;">';
$html .= '<div style="float:left;margin-top:5px;width:100px;">';
$html .= '<div class="affieldname">';
$html .= ARTF_CAPTCHA_TITLE.':';
$html .= '</div>';
$html .= '</div>';
$html .= '<div style="float:left;margin-top:5px;">';
$html .= '<input type="text" name="captcha_code" class="easycomments_post_input" />';
$html .= '</div>';
$html .= '</div>';
$html .= '<div class="clear"></div>';
charing code is good for you!