[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * Experimental image-based captcha plugin, using images generated by an 4 * external tool. 5 * 6 * Copyright (C) 2005, 2006 Brion Vibber <[email protected]> 7 * http://www.mediawiki.org/ 8 * 9 * This program is free software; you can redistribute it and/or modify 10 * it under the terms of the GNU General Public License as published by 11 * the Free Software Foundation; either version 2 of the License, or 12 * (at your option) any later version. 13 * 14 * This program is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU General Public License for more details. 18 * 19 * You should have received a copy of the GNU General Public License along 20 * with this program; if not, write to the Free Software Foundation, Inc., 21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 22 * http://www.gnu.org/copyleft/gpl.html 23 * 24 * @file 25 * @ingroup Extensions 26 */ 27 28 if ( !defined( 'MEDIAWIKI' ) ) { 29 exit; 30 } 31 32 $dir = __DIR__; 33 require_once $dir . '/ConfirmEdit.php'; 34 $wgCaptchaClass = 'FancyCaptcha'; 35 36 /** 37 * The name of a file backend ($wgFileBackends) to be used for storing files. 38 * Defaults to FSFileBackend using $wgCaptchaDirectory as a base path. 39 */ 40 $wgCaptchaFileBackend = ''; 41 42 global $wgCaptchaDirectory; 43 $wgCaptchaDirectory = "$wgUploadDirectory/captcha"; // bad default :D 44 45 global $wgCaptchaDirectoryLevels; 46 $wgCaptchaDirectoryLevels = 0; // To break into subdirectories 47 48 global $wgCaptchaSecret; 49 $wgCaptchaSecret = "CHANGE_THIS_SECRET!"; 50 51 /** 52 * By default the FancyCaptcha rotates among all available captchas. 53 * Setting $wgCaptchaDeleteOnSolve to true will delete the captcha 54 * files when they are correctly solved. Thus the user will need 55 * something like a cron creating new thumbnails to avoid drying up. 56 */ 57 $wgCaptchaDeleteOnSolve = false; 58 59 $wgMessagesDirs['FancyCaptcha'] = __DIR__ . '/i18n/fancy'; 60 $wgExtensionMessagesFiles['FancyCaptcha'] = $dir . '/FancyCaptcha.i18n.php'; 61 $wgAutoloadClasses['FancyCaptcha'] = $dir . '/FancyCaptcha.class.php'; 62 63 $wgResourceModules['ext.confirmEdit.fancyCaptcha.styles'] = array( 64 'localBasePath' => $dir . '/resources', 65 'remoteExtPath' => 'ConfirmEdit/resources', 66 'targets' => array( 'mobile', 'desktop' ), 67 'styles' => 'ext.confirmEdit.fancyCaptcha.css', 68 ); 69 70 $wgResourceModules['ext.confirmEdit.fancyCaptcha'] = array( 71 'localBasePath' => $dir . '/resources', 72 'remoteExtPath' => 'ConfirmEdit/resources', 73 'scripts' => 'ext.confirmEdit.fancyCaptcha.js', 74 'dependencies' => 'mediawiki.api', 75 ); 76 77 // FIXME: remove, add mobile target to ext.confirmEdit.fancyCaptcha and update 78 // MobileFrontend accordingly when bug 57629 is resolved 79 $wgResourceModules['ext.confirmEdit.fancyCaptchaMobile'] = array( 80 'localBasePath' => $dir . '/resources', 81 'remoteExtPath' => 'ConfirmEdit/resources', 82 'scripts' => 'ext.confirmEdit.fancyCaptcha.js', 83 'targets' => array( 'mobile', 'desktop' ), 84 'dependencies' => 'mobile.startup', 85 ); 86 87 $wgAutoloadClasses['ApiFancyCaptchaReload'] = $dir . '/ApiFancyCaptchaReload.php'; 88 $wgAPIModules['fancycaptchareload'] = 'ApiFancyCaptchaReload';
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |