forked from CleanTalk/mediawiki-antispam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Antispam.php
108 lines (86 loc) · 2.37 KB
/
Antispam.php
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php
if ( !defined( 'MEDIAWIKI' ) ) {
die;
}
require_once('cleantalk.class.php' );
/**
* cleantalk.org is a cloud antispam service
*
* @see http://stopforumspam.com/faq
* @author Denis Shagimuratov <shagimuratov@cleantalk.org>
* @license GPL v2 or higher
*/
/**
* Access key for cleantalk.org
* @see https://clenatalk.org/register
*/
$wgCTAccessKey = '';
/**
* Check registrations, when there is errors with connection to service
* true - option enabled
* false - option disabled
*/
$wgCTCheckNoConnect = true;
/**
* Cloud URL
*/
$wgCTServerURL = 'http://moderate.cleantalk.org/api2.0';
/**
* Extension agent name and version
*/
$wgCTAgent = 'mediawiki-15';
/**
* Extension name
*/
$wgCTExtName = 'Anti-spam by CleanTalk';
/**
* Field name for JavaScript test
*/
$wgCTHiddenFieldName = 'ct_checkjs';
/**
* Field name for JavaScript test
*/
$wgCTSubmitTimeLabel = 'ct_submit_time';
/**
* Default value for hidden field
*/
$wgCTHiddenFieldDefault = 0;
/**
* Admin notificaction account ID
*/
$wgCTAdminAccountId = 1;
/**
* Admin notificactions interval in seconds
*/
$wgCTAdminNotificaionInteval = 10800;
/**
* Show link to CleanTalk
* Enabling this option places a small link under the comment form that lets others know what anti-spam tool protects your site.
*/
$wgCTShowLink = true;
/**
* Show link to CleanTalk
* Enabling this option places a small link under the comment form that lets others know what anti-spam tool protects your site.
*/
$wgCTSFW = false;
/**
* Extension settings store file
*/
$wgCTDataStoreFile = __DIR__ . '/Antispam.store.dat';
$wgExtensionCredits['antispam'][] = array(
'path' => __FILE__,
'name' => $wgCTExtName,
'author' => 'Denis Shagimuratov',
'url' => 'https://www.mediawiki.org/wiki/Extension:Antispam',
'descriptionmsg' => 'cleantalk-desc',
'version' => '1.5',
);
$wgAutoloadClasses['CTBody'] = __DIR__ . '/Antispam.body.php';
$wgAutoloadClasses['CTHooks'] = __DIR__ . '/Antispam.hooks.php';
$wgHooks['AbortNewAccount'][] = 'CTHooks::onAbortNewAccount';
$wgHooks['UserCreateForm'][] = 'CTHooks::onUserCreateForm';
$wgHooks['EditFilter'][] = 'CTHooks::onEditFilter';
$wgHooks['EditPage::showEditForm:initial'][] = 'CTHooks::onShowEditForm';
// Skip edit test for Administrators
$wgGroupPermissions['sysop']['cleantalk-bypass'] = true;
$wgHooks["SkinAfterBottomScripts"][] = "CTHooks::onSkinAfterBottomScripts";