Friday, 25 September 2009 14:53
I thought I'd add this as I'm weary on low level captcha plugins and like replacing it with reCaptcha...
First of all, disable the built-in captcha for PhocaGuestbook:
- Components > Phoca Guestbook
- Select "Items" and click on the "Parameters" icon in the top right
- Scroll down to "Enable Captcha" and set this to "NO"
Time for some hard-coding:
At about line 287 in the file /components/com_phocaguestbook/views/phocaguestbook/tmpl/default.php you should find the following code:
<tr>
<td> </td>
<td colspan="3"><input type="submit" name="save" value="<?php echo JText::_('Submit'); ?>" /> <input type="reset" name="reset" value="<?php echo JText::_('Reset'); ?>" /></td>
</tr>
</table>
Replace this with:
<tr>
<td> </td>
<td colspan="3">
<?php
global $mainframe;
$mainframe->triggerEvent('onCaptchaDisplay');
?>
</td>
</tr>
<tr>
<td> </td>
<td colspan="3"><input type="submit" name="save" value="<?php echo JText::_('Submit'); ?>" /> <input type="reset" name="reset" value="<?php echo JText::_('Reset'); ?>" /></td>
</tr>
</table>
HEY! It's not over yet.
I found that this change causes a silent JavaScript error (as in some browsers will just process the form normally but this needs to be fixed anyway). At about line 11:
var text = tinyMCE.getContent();
Comment this out and insert or replace with:
var text = form.pgbcontent.value;
Works for me...
| < Prev | Next > |
|---|


