glFusion Wiki

Site Tools


CAPTCHA Custom Login Integration

If you are using glFusion's custom registration feature, you will need to 'merge' CAPTCHA into your existing Custom Registration implementation.

You will need to modify the custom registration functions in your private/system/lib-custom.php file.

These examples assume you already have custom registration working on your site. If you do not have your custom registration working, please get it working before attempting to integrate CAPTCHA.

Add the following code into the CUSTOM_userForm() function, this should go immediately before the $user_templates→parse('output', 'memberdetail'); line:

     * Check to see if CAPTCHA plugin is installed and enabled
     * if yes, call the function to add the CAPTCHA image.
    if ( function_exists('plugin_templatesetvars_captcha') ) {
        plugin_templatesetvars_captcha('registration', $user_templates);

Edit your custom memberdetail.thtml file and make sure you have the CAPTCHA template variable defined in the template, here is an example:

            <td align="right" style="text-align:left;vertical-align:middle;padding-left:10px;"><b>{EMAIL_CONF}</b><br><small style="color:#676767">{EMAIL_CONF_HELP}</small></td>
            <td align="left" valign="middle"><input type="text" name="email_conf" size="32" maxlength="96" value="{email_conf}"></td>
            <td align="center" colspan="3"><input type="hidden" name="uid" value="{user_id}"><hr><br>
            <input type="hidden" name="mode" value="{postmode}">{submitbutton}</td>
glfusion/captcha/customintegration.txt · Last modified: 2017/01/17 14:48 (external edit)

Page Tools