0

我想将默认的重新验证插件添加到我的 joomla 网站。我写了以下代码:

//php code
JPluginHelper::importPlugin('captcha');
$dispatcher = JDispatcher::getInstance();
$dispatcher->trigger('onInit','dynamic_recaptcha_1');

//html code
 <div id="dynamic_recaptcha_1"></div>

但是什么都没有显示!!我试图找到很多但无法找到解决方案。任何帮助将不胜感激。阈值。

4

3 回答 3

0

Have you enabled the captcha plugin in extensions->plugins? You will also have to fill in the private and public keys in the plugin.

于 2013-06-19T18:03:40.927 回答
0

您可以尝试在表单中添加客户端验证。

http://docs.joomla.org/Client-side_form_validation

例如

JHTML::_('behavior.formvalidation');

<form class="form-validate"> ... </form>

<field name="email" type="text" class="required validate-email" size="30" />

//For radios make sure the class is applied to the options: 

<field name="ThisorThat" type="radio" label="Please say if it was full-time or the part-time equivalent?" >
 <option value="This" class="required">This</option>
 <option value="That" class="required">That</option>
</field>

然后,只要您在全局配置中选择了 ReCaptcha 作为默认验证码,它就会显示出来。

让我知道它是否有效!

于 2013-06-20T14:20:31.040 回答
-1

Joomla 经常使用 MooTools 库。

再次尝试插入

<script src="/media/system/js/mootools-core.js" type="text/javascript"></script>
<script src="/media/jui/js/jquery.min.js" type="text/javascript"></script>
<script src="/media/jui/js/jquery-noconflict.js" type="text/javascript"></script>
<script src="/plugins/captcha/idcaptcha/idcaptcha.js" type="text/javascript"></script>

<div id="dynamic_recaptcha_1"></div>
于 2015-12-16T00:10:44.853 回答