3 * A question-based captcha plugin.
5 * Copyright (C) 2009 Benjamin Lees <emufarmers@gmail.com>
6 * http://www.mediawiki.org/
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 * http://www.gnu.org/copyleft/gpl.html
27 if ( !defined( 'MEDIAWIKI' ) ) {
32 require_once $dir . '/ConfirmEdit.php';
33 $wgCaptchaClass = 'QuestyCaptcha';
35 global $wgCaptchaQuestions;
36 $wgCaptchaQuestions = array();
38 // Add your questions in LocalSettings.php using this format
39 // $wgCaptchaQuestions[] = array( 'question' => "A question?", 'answer' => "An answer!" );
40 // $wgCaptchaQuestions[] = array( 'question' => 'How much wood would a woodchuck chuck if a woodchuck could chuck wood?', 'answer' => 'as much wood as...' );
41 // $wgCaptchaQuestions[] = array( 'question' => "What is this wiki's name?", 'answer' => "$wgSitename" );
42 // You can also provide several acceptable answers to a given question (the answers shall be in lowercase):
43 // $wgCaptchaQuestions[] = array( 'question' => "2 + 2 ?", 'answer' => array( '4', 'four' ) );
45 $wgExtensionMessagesFiles['QuestyCaptcha'] = $dir . '/QuestyCaptcha.i18n.php';
46 $wgAutoloadClasses['QuestyCaptcha'] = $dir . '/QuestyCaptcha.class.php';