Jump to content

Captcha types. Add new


newbie LAC

Recommended Posts

Posted

Hello,

applications/core/modules/admin/membersettings/spam.php

			'options'	=> array( 'none' => 'captcha_type_none', 'recaptcha2' => 'captcha_type_recaptcha2', 'recaptcha' => 'captcha_type_recaptcha', 'keycaptcha' => 'captcha_type_keycaptcha' ),

:frantics:

  • 4 weeks later...
Posted
On 28.12.2015 at 11:02 PM, bfarber said:

I've abstracted to a method for the next release to make it simpler to override and add new options.

Hello,

Thank you.

Could you separate form elements and saving form?

Currently I use 

	/**
	 * Show CAPTCHA settings
	 *
	 * @return	string	HTML to display
	 */
	protected function _manageCaptcha()
	{
		$captchaForm = parent::_manageCaptcha();

		$captchaForm->add( new \IPS\Helpers\Form\Text( 'newcaptcha_pub_key', \IPS\Settings::i()->newcaptcha_pub_key, FALSE, array(), NULL, NULL, NULL, 'newcaptcha_pub_key' ) );

		// Added this to save newcaptcha_pub_key setting
		if ( $captchaForm->values() )
		{
			$captchaForm->saveAsSettings();
		}
		
		return $captchaForm;
	}

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...