Changeset 885 for trunk/reCaptcha

Show
Ignore:
Timestamp:
07/24/08 06:50:13 (1 month ago)
Author:
fumiakiy
Message:

reCaptcha plugin now supports default templates of 4.0x/4.1x and 4.2.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/reCaptcha/README

    r578 r885  
    665. Go to Blog Settings - Comment. 
    776. Choose reCaptcha as the blog's captcha provider and Save. 
    8 7. Edit Comment Form template, so it renders MTCaptchaFields unconditionally.  In practice, this means replacing these lines 
     8 
     9MT 4.0x/4.1x users follow the step 7 and 8 and skip the step 9. 
     10MT 4.2 users skip the step 7 and 8 and go to step 9. 
     11 
     127. [MT 4.0x/4.1x users only] Edit Comment Form template, so it renders MTCaptchaFields unconditionally.  In practice, this means replacing these lines 
    913    <MTIfNonEmpty tag="MTCaptchaFields"> 
    1014    <MTIfCommentsAccepted><MTIfRegistrationAllowed><MTElse><$MTCaptchaFields$></MTIfRegistrationAllowed></MTIfCommentsAccepted> 
     
    1822    </div> 
    1923    </MTIfNonEmpty> 
    20 8. Edit Javascipt index template, to remove these lines of code which calls delayShowCaptcha: 
     248. [MT 4.0x/4.1x users only] Edit Javascipt index template, to remove these lines of code which calls delayShowCaptcha: 
    2125    <MTIfNonEmpty tag="MTCaptchaFields"> 
    2226    captcha_timer = setInterval('delayShowCaptcha()', 1000); 
     
    2428 
    2529   If your install does not have these lines in JavaScript index template, these lines should be in GlobalJavaScript, which is a global system template. 
    26 9. Rebuild index and individual entry archives. 
    2730 
     319. [MT 4.2 users only] Edit Comments template module so it renders MTCaptchaFields by default.  In practice, this means you replace the line below 
     32    <div id="comments-open-captcha"></div> 
     33to this 
     34    <div id="comments-open-captcha"><$MTCaptchaFields$></div> 
     35 
     3610. Rebuild index and individual entry archives. 
     37 
  • trunk/reCaptcha/lib/reCaptcha.pm

    r882 r885  
    4141</div> 
    4242<script type="text/javascript"> 
    43 var div = document.getElementById("recaptcha_script"); 
    44 if (commenter_name) { 
    45     div.style.display = "none"; 
    46 } else { 
    47     div.style.display = "block"; 
     43if ( typeof(mtCaptchaVisible) != "undefined" ) 
     44    mtCaptchaVisible = true; 
     45else if ( typeof(commenter_name) != "undefined" ) { 
     46    var div = document.getElementById("recaptcha_script"); 
     47    if (commenter_name) 
     48        div.style.display = "none"; 
     49    else 
     50        div.style.display = "block"; 
    4851} 
    4952</script> 
  • trunk/reCaptcha/php/init.reCaptcha.php

    r884 r885  
    4141</div> 
    4242<script type=\"text/javascript\"> 
    43 var div = document.getElementById(\"recaptcha_script\"); 
    44 if (commenter_name) { 
    45     div.style.display = \"none\"; 
    46 } else { 
    47     div.style.display = \"block\"; 
     43if ( typeof(mtCaptchaVisible) != \"undefined\" ) 
     44    mtCaptchaVisible = true; 
     45else if ( typeof(commenter_name) != \"undefined\" ) { 
     46    var div = document.getElementById(\"recaptcha_script\"); 
     47    if (commenter_name) 
     48        div.style.display = \"none\"; 
     49    else 
     50        div.style.display = \"block\"; 
    4851} 
    4952</script> 
  • trunk/reCaptcha/reCaptcha.pl

    r883 r885  
    3434        ['recaptcha_privatekey', { Scope   => 'blog' }], 
    3535    ]), 
    36     version => '0.21', 
     36    version => '0.22', 
    3737}); 
    3838