root/trunk/reCaptcha/reCaptcha.pl @ 885

Revision 885, 1.5 kB (checked in by fumiakiy, 16 months ago)

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

RevLine 
[577]1# Movable Type (r) Open Source (C) 2005-2008 Six Apart, Ltd.
2# This program is distributed under the terms of the
3# GNU General Public License, version 2.
4#
5# $Id: reCaptcha.pl 1174 2008-01-08 21:02:50Z bchoate $
6
7# reCaptcha plugin for Movable Type
8# Author: Six Apart (http://www.sixapart.com)
9# Released under the Artistic and GPLv2 License
10
11package MT::Plugin::reCaptcha;
12
13use strict;
14use warnings;
15
16use MT;
17use base qw(MT::Plugin);
18
19my $plugin = MT::Plugin::reCaptcha->new({
20    description => 'CAPTCHA plugin powered by reCaptcha.  Follow the instruction specified in README to use reCaptcha on your published blog.',
21    name => 'reCaptcha',
22    author_name => 'Six Apart, Ltd.',
23    author_link => 'http://www.movabletype.com/',
24        blog_config_template => <<TMPL,
25<dl>
26<dt>reCaptcha public key</dt>
27<dd><input name="recaptcha_publickey" size="40" value="<mt:var name="recaptcha_publickey">" /></dd>
28<dt>reCaptcha private key</dt>
29<dd><input name="recaptcha_privatekey" size="40" value="<mt:var name="recaptcha_privatekey">" /></dd>
30</dl>
31TMPL
32    settings => new MT::PluginSettings([
33        ['recaptcha_publickey', { Scope   => 'blog' }],
34        ['recaptcha_privatekey', { Scope   => 'blog' }],
35    ]),
[885]36    version => '0.22',
[577]37});
38
39MT->add_plugin($plugin);
40sub instance { $plugin }
41
42sub init_registry {
43    my $plugin = shift;
44    $plugin->registry({
45        'captcha_providers' => {
46            'sixapart_rc' => {
47                'label' => 'reCaptcha',
48                                'class' => 'reCaptcha',
49            },
50        },
51    });
52}
53
541;
Note: See TracBrowser for help on using the browser.