Not really sure if this relates to the issue I was/am having with the redraw button not actually redrawing the captcha image.
here is a side by side comparison of the two sections of code and perhaps someone could explain to me how to get the redraw button to function on page. If I have not managed to merge the two sections correctly. My php is still very much at the beginners stage.
line 89 to 96 from the supplied version v2.8
/**
* Generate the HTML output code for the Redraw Captcha image button
*/
function redraw_button($image, $alt = '', $parameters = '', $sec_class = '') {
$redraw = 'onclick="document.getElementById(\'captcha-img\').src=\'' . $this->img_href . '&rand=\'+Math.random();return false;"';
return zen_image_button($image, $alt, $redraw . ' ' . $parameters, $sec_class );
}
From Line 094 the code section pointed out in the above posting
$redraw_button = zen_image_button($image, $alt, $redraw . ' ' . $parameters, $sec_class );
if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes' && strpos($redraw_button, $redraw) === false) {
$redraw_button = str_replace('<span ', '<span ' . $redraw, $redraw_button);
}
return $redraw_button;
The merged code section which I hope works and fixes my issue. :huh: :blink:
* Generate the HTML output code for the Redraw Captcha image button
*/
function redraw_button($image, $alt = '', $parameters = '', $sec_class = '') {
$redraw = 'onclick="document.getElementById(\'captcha-img\').src=\'' . $this->img_href . '&rand=\'+Math.random();return false;"';
return zen_image_button($image, $alt, $redraw . ' ' . $parameters, $sec_class );
if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes' && strpos($redraw_button, $redraw) === false) {
$redraw_button = str_replace('<span ', '<span ' . $redraw, $redraw_button);
}
return $redraw_button;
}
Today I am trying something different. Read the install.txt Read the FAQ Read the forum for answers; Then Install the mod. ;-)
AML Candles