11-Jul-2011, 10:59 PM
Greets,
I was asked to install this for a client. On tests we could not get the captcha code to work. I went into includes/template/form and changed this:
To this:
As I believe the paths were wrong. Instead of paths to the URL it was showing paths from root. Now the captcha image shows. However there is another problem which I have not investigated yet and that it the captcha never accepts the entry, it always says it is incorrect.
Please confirm the above. Thanks.
I was asked to install this for a client. On tests we could not get the captcha code to work. I went into includes/template/form and changed this:
Code:
echo '
<img id="siimage" style="float: left;" src="' . $path_to_comments_folder . 'captcha/securimage_show.php?sid='.md5(uniqid(time())).'" alt="Captcha" title="' . CMTX_TITLE_CAPTCHA_IMAGE . '" />
<a href="' . $path_to_comments_folder . 'captcha/securimage_play.php" title="' . CMTX_TITLE_CAPTCHA_AUDIO . '"><img src="' . $settings->url_to_comments_folder . 'captcha/images/audio_icon.gif" alt="Audio" style="vertical-align: top;" onclick="this.blur()" /></a><br />
<a href="#" title="' . CMTX_TITLE_CAPTCHA_REFRESH . '" onclick="document.getElementById(\'siimage\').src = \'' . $path_to_comments_folder . 'captcha/securimage_show.php?sid=\' + Math.random(); return false"><img src="' . $settings->url_to_comments_folder . 'captcha/images/refresh.gif" alt="Refresh" style="vertical-align: bottom;" onclick="this.blur()" /></a>';
To this:
Code:
echo ' <img id="siimage" style="float: left;" src="' . $settings->url_to_comments_folder . 'captcha/securimage_show.php?sid='.md5(uniqid(time())).'" alt="Captcha" title="' . CMTX_TITLE_CAPTCHA_IMAGE . '" />
<a href="' . $settings->url_to_comments_folder . 'captcha/securimage_play.php" title="' . CMTX_TITLE_CAPTCHA_AUDIO . '"><img src="' . $settings->url_to_comments_folder . 'captcha/images/audio_icon.gif" alt="Audio" style="vertical-align: top;" onclick="this.blur()" /></a><br />
<a href="#" title="' . CMTX_TITLE_CAPTCHA_REFRESH . '" onclick="document.getElementById(\'siimage\').src = \'' . $settings->url_to_comments_folder . 'captcha/securimage_show.php?sid=\' + Math.random(); return false"><img src="' . $settings->url_to_comments_folder . 'captcha/images/refresh.gif" alt="Refresh" style="vertical-align: bottom;" onclick="this.blur()" /></a>';
As I believe the paths were wrong. Instead of paths to the URL it was showing paths from root. Now the captcha image shows. However there is another problem which I have not investigated yet and that it the captcha never accepts the entry, it always says it is incorrect.
Please confirm the above. Thanks.