* @ingroup Extensions
*/
+/*
+TODO:
+ * Delete: "Delete"/link CookieCaptcha.i18n.php
+ * Use timestamp in cookie
+ * Version 2: Without apache
+ * Provide sample image?
+ */
+
+/* The idea of this "captcha" is to let the browser download an image that sets a cookie.
+Research showed that spam bots don't load images. You have to setup the cookie e.g. in the apache2
+configuration file. Here is an example where an image that's uploaded with mediawiki is used:
+
+<Directory /var/www/mediawiki/images/d/d0>
+ <Files "MyImage.png">
+ Header append Set-Cookie "mediawiki_token=%t; Path=/; HttpOnly"
+ ExpiresActive On
+ ExpiresDefault "access plus 5 second"
+ </Files>
+</Directory>
+*/
+
+
if ( !defined( 'MEDIAWIKI' ) ) {
exit;
}
$dir = __DIR__;
require_once $dir . '/ConfirmEdit.php';
+
$wgCaptchaClass = 'CookieCaptcha';
+$wgCaptchaCookieName = 'mediawiki_token'; // make it look "realistic". Idea: use $wgCookiePrefix . '_token'
+$wgCaptchaCookieImage = '/mediawiki/images/d/d0/MyImage.png'; // You _have_ to specify an existing image
+$wgCaptchaCookieAlt = ''; // alt attribute for the image
+$wgCaptchaCookieStyle = 'display:none;'; // CSS inline style applied to the image
+
$wgExtensionMessagesFiles['CookieCaptcha'] = $dir . '/CookieCaptcha.i18n.php';
$wgAutoloadClasses['CookieCaptcha'] = $dir . '/CookieCaptcha.class.php';