Math for all, but question on account creation?

Jump to: navigation, search

I have editing disabled for anons and would like to use MathCaptcha as default but QuestyCaptcha on account creation. Is there a solution?

Subfader19:00, 31 August 2011

I don't believe so, other than with some custom coding.

Yaron Koren19:27, 31 August 2011
 

Copy ConfirmEditHooks.php to ConfirmEditQuestyHooks.php, and edit the following:

  • class ConfirmEditHooks to class ConfirmEditQuestyHooks
  • Replace the function getInstance() with:
   static function getInstance() {
                static $captcha = false;
                if ( !$captcha ) { 
                        $captcha =  new QuestyCaptcha;
                } 
                return $captcha;
        }
  • Remove the line class CaptchaSpecialPage extends UnlistedSpecialPage { and everything below
  • In ConfirmEdit.php change the hooks you wish to be handled with QuestyCaptcha to ConfirmEditQuestyHooks (where it says 'ConfirmEditHooks::...' change to 'ConfirmEditQuestyHooks::...'). In your case, seem to be UserCreateForm and AbortNewAccount
Platonides17:05, 1 September 2011

Thanks a lot!

Subfader16:12, 10 September 2011
 
 
Personal tools

Variants
Actions
Navigation
Support
Download
Development
Communication
Toolbox