summaryrefslogtreecommitdiff
path: root/extensions/FunnyQuestion/FunnyQuestion.php
blob: 5dcc367c94464a983b28248459b465c1feb2da88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php

$wgExtensionCredits['other'][] = array(
	'name' => 'FunnyQuestion',
	'version' => '2.0',
	'description' => 'Challenge-response authentication',
	'author' => 'Pierre Schmitz',
	'url' => 'https://www.archlinux.de'
);

$wgFunnyQuestions = array(
	'en' => array("What is the Ultimate Answer to the Ultimate Question of Life, The Universe, and Everything?" => "42"),
	'de' => array("Was ist die ultimaative Antwort nach dem Leben, dem Universum und dem ganzen Rest?" => "42")
);
$wgFunnyQuestionHash = '';
$wgFunnyQuestionTimeout = 3600;
$wgFunnyQuestionWait = 2;

$wgAutoloadClasses['FunnyQuestion'] = dirname(__FILE__) . '/FunnyQuestion.body.php';
$wgExtensionMessagesFiles['FunnyQuestion'] = dirname( __FILE__ ) . '/FunnyQuestion.i18n.php';

if ($wgGroupPermissions['*']['edit']) {
	$wgHooks['EditPage::showEditForm:fields'][] = 'FunnyQuestion::addFunnyQuestionToEditPage';
	$wgHooks['EditFilter'][] = 'FunnyQuestion::checkFunnyQuestionOnEditPage';
}

if ($wgGroupPermissions['*']['createaccount'] && (empty($wgAuth) || $wgAuth->canCreateAccounts())) {
	$wgHooks['UserCreateForm'][] = 'FunnyQuestion::addFunnyQuestionToUserCreateForm';
	$wgHooks['AbortNewAccount'][] = 'FunnyQuestion::checkFunnyQuestionOnAbortNewAccount';
}

?>