Difference between revisions of "How to enable CAPTCHAs on your Dreamhack"

From Dreamwidth Notes
Jump to: navigation, search
m
(it matters where those lines are)
Line 12: Line 12:
 
     );</syntaxhighlight>
 
     );</syntaxhighlight>
  
* Open <code>~/dw/ext/local/etc/config-private.pl</code> and make sure you have the following code:
+
* Open <code>~/dw/ext/local/etc/config-private.pl</code> and make sure you have the following code within the DW:PRIVATE section:
  
 
     <syntaxhighlight lang="perl">%RECAPTCHA = (
 
     <syntaxhighlight lang="perl">%RECAPTCHA = (

Revision as of 16:35, 27 November 2015

  • Open ~/dw/ext/local/etc/config-local.pl and make sure you have the following code:
    # setup recaptcha
    %RECAPTCHA = (
            public_key  => $DW::PRIVATE::RECAPTCHA{public_key},
            private_key => $DW::PRIVATE::RECAPTCHA{private_key},
    );
 
    # setup textcaptcha
    %TEXTCAPTCHA = (
            api_key => $DW::PRIVATE::TEXTCAPTCHA{api_key},
    );
  • Open ~/dw/ext/local/etc/config-private.pl and make sure you have the following code within the DW:PRIVATE section:
%RECAPTCHA = (
        public_key  => "key",
        private_key => "key",
    );
 
    %TEXTCAPTCHA = (
        api_key => "demo",
        timeout => 10,
    );
The 'demo' key works for testing purposes.
  • Edit CAPTCHA settings as you desire at ~/dw/ext/local/etc/config.pl.