[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/extensions/ConfirmEdit/ -> QuestyCaptcha.php (source)

   1  <?php
   2  /**
   3   * A question-based captcha plugin.
   4   *
   5   * Copyright (C) 2009 Benjamin Lees <[email protected]>
   6   * http://www.mediawiki.org/
   7   *
   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.
  12   *
  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.
  17   *
  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
  22   *
  23   * @file
  24   * @ingroup Extensions
  25   */
  26  
  27  if ( !defined( 'MEDIAWIKI' ) ) {
  28      exit;
  29  }
  30  
  31  $dir = __DIR__;
  32  require_once $dir . '/ConfirmEdit.php';
  33  $wgCaptchaClass = 'QuestyCaptcha';
  34  
  35  global $wgCaptchaQuestions;
  36  $wgCaptchaQuestions = array();
  37  
  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' ) );
  44  
  45  $wgMessagesDirs['QuestyCaptcha'] = __DIR__ . '/i18n/questy';
  46  $wgExtensionMessagesFiles['QuestyCaptcha'] = $dir . '/QuestyCaptcha.i18n.php';
  47  $wgAutoloadClasses['QuestyCaptcha'] = $dir . '/QuestyCaptcha.class.php';


Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1