1
For next version of ShoutBox module I thought I would revisit the use of captcha images for anonymous posts. By rights the image id tag of the captcha image should be unique so there are no conflicts if another instance appears on the same page. For example, the person who reported this had defined the shoutbox block to appear in the Right column on All Pages. Therefore it would appear on the Registration page which also employs captcha. So now we have two instances of captcha but both images have the same id tag, which is the default one provided in the class config file.
I am working with 2.3.3 as I explore this issue. I thought it should be as simple as calling setConfig() but it appears not. Here is what my code looks like in the block.
include_once(XOOPS_ROOT_PATH.'/class/xoopsform/formcaptcha.php');
$shoutcaptcha = new XoopsFormCaptcha();
$result = $shoutcaptcha->setConfig('name','shoutboxcaptcha');
$block['captcha_caption'] = $shoutcaptcha->getCaption();
$block['captcha_render'] = $shoutcaptcha->render();
Calling setConfig appears to have no affect on the config value. Am I overlooking something?