forked from EXreaction/Anti-Spam-ACP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.xml
316 lines (305 loc) · 13.7 KB
/
install.xml
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<?xml-stylesheet type="text/xsl" href="modx.prosilver.en.xsl"?>
<!--For security purposes, please check: http://www.phpbb.com/mods/ for the latest version of this MOD. Although MODs are checked before being allowed in the MODs Database there is no guarantee that there are no security problems within the MOD. No support will be given for MODs not found within the MODs Database which can be found at http://www.phpbb.com/mods/-->
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.2.5.xsd">
<header>
<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
<title lang="en">Anti-Spam ACP</title>
<description lang="en">Prevents spam on your phpBB3 forum.</description>
<author-notes lang="en">PHP versions less than 5.1.0 are not supported. phpBB versions less than 3.0.6 are not supported.
If you will be using the profile field controls you should install the profile switches instructions in the contrib/ folder.
Support by the author is only provided at http://www.lithiumstudios.org
A small fee is required for support by the author unless otherwise specified by the author in the release topic.
Bug reports are accepted and, if confirmed as a bug, you will receive support for fixing the bug for free by the mod author.</author-notes>
<author-group>
<author>
<username>EXreaction</username>
<realname>Nathan Guse</realname>
<homepage>http://www.lithiumstudios.org/</homepage>
<email>[email protected]</email>
</author>
</author-group>
<mod-version>1.0.6-dev</mod-version>
<installation>
<level>intermediate</level>
<time>600</time>
<target-version>3.0.10</target-version>
</installation>
<history>
<entry>
<date>2009-02-20</date>
<rev-version>1.0.0</rev-version>
<changelog lang="en">
<change>[Change] Any profile fields that are required are now required during registration as well. Optionally you may have it show the normal allowed fields during registration as well.</change>
<change>[Change] Added IP Search section to the View Profile page to quickly search any IP Address the user registered or posted with.</change>
<change>[Fix] Stuck in loop when registering with COPPA on (#6)</change>
<change>[Fix] Registration date shows up as "01 jan 1970 01:00" in IP Search (#7)</change>
<change>[Fix] Bad CAPTCHA input during Registration logs incorrectly (#8)</change>
<change>[Fix] Invalid parameters on posting.php/viewtopic.php can cause fatal errors (#10)</change>
<change>[Fix] Bad redirect when selecting No on antispam/index.php (#11)</change>
</changelog>
</entry>
<entry>
<date>2009-04-17</date>
<rev-version>1.0.1</rev-version>
<changelog lang="en">
<change>[Fix] Sending incorrect information to Stop Forum Spam #33</change>
<change>[Fix] Limit the number of IP addresses shown in the user's profile to 4 or 5 #22</change>
<change>[Fix] Forgot to add the language file in ucp_pm_compose and posting #36</change>
<change>[Change] New option to ignore the post count limit for guest posting on the Spam Words check (so it always checks for guests) #37</change>
</changelog>
</entry>
<entry>
<date>2009-11-18</date>
<rev-version>1.0.2</rev-version>
<changelog lang="en">
<change>3.0.6 support</change>
<change>ModX 1.2.3</change>
<change>Multiple bugs fixed</change>
<change>Pre-registration captcha removed</change>
<change>A few sanity checks</change>
</changelog>
</entry>
<entry>
<date>2011-06-18</date>
<rev-version>1.0.3</rev-version>
<changelog lang="en">
<change>URL Encode stopforumspam request #118</change>
<change>Allow pattern modifiers on spam word regular expressions #162</change>
<change>Fix group selected on one click ban settings #163</change>
<change>Fix PHP Notice of Undefined index: PROFILE_SPAM_DENIED #166</change>
<change>Invalid HTML (missing end tag in a lang entry)</change>
<change>Update UMIL</change>
</changelog>
</entry>
<entry>
<date>2011-07-20</date>
<rev-version>1.0.3-pl1</rev-version>
<changelog lang="en">
<change>Link to the wrong language file causing errors</change>
</changelog>
</entry>
<entry>
<date>2012-05-18</date>
<rev-version>1.0.4</rev-version>
<changelog lang="en">
<change>Move a number of functions (Spam and Flag Logs, Flagged User List, IP Search) into the MCP so that moderators may user the functions without needing administrative permissions (see next changes)</change>
<change>Change a_asacp_ban permission to m_asacp_ban (allow moderators to one click ban)</change>
<change>Change a_asacp_user_flag permission to m_asacp_user_flag (allow moderators to flag users and view the flag list)</change>
<change>Enable the Keyword Search in the Spam and Flag Logs</change>
<change>Do not show the One Click Ban link in a user's profile if they are already banned</change>
<change>Display the list of actions to be taken when using the One Click Ban</change>
<change>Require the submission of evidence when submitting to Stop Forum Spam from One Click Ban</change>
<change>Give the option to submit a ban reason and ban reason shown to the user when using the One Click Ban (#112)</change>
<change>Remove the flag on a user's account if their username is banned through the One Click Ban (#165)</change>
<change>Option to deactivate the user when using the One Click Ban (#165)</change>
<change>Fix spam words action on user profiles (#181)</change>
</changelog>
</entry>
<entry>
<date>2012-06-15</date>
<rev-version>1.0.5</rev-version>
<changelog lang="en">
<change>Akismet Integration</change>
<change>Fix the delete all action to delete all log entries for the flag/spam logs</change>
<change>Option to delete the user's blog with the One Click Ban (if the User Blog Mod is installed)</change>
<change>Make sure the acp/mcp module info files exist before attempting to install or update with the database update script</change>
<change>Remove the acp option to always check guest posts for spam words, now always check spam words for guest posts (who would really want it to do otherwise?)</change>
<change>Add link to One Click Ban from viewtopic for easier and faster banning of spammers.</change>
</changelog>
</entry>
<entry>
<date>2012-00-00</date>
<rev-version>1.0.6-dev</rev-version>
<changelog lang="en">
<change>Decode messages before logging them.</change>
<change>Log the queries to Stop Forum Spam that results in an account being blocked from registering.</change>
<change>Fix a MSSQL error #62</change>
</changelog>
</entry>
</history>
<link-group>
<link type="contrib" href="contrib/profile_switches.xml" lang="en">Profile Switches Install [Recommended]</link>
<link type="contrib" href="contrib/profile_switches_subsilver2.xml" lang="en">subsilver2 Profile Switches Install [Recommended]</link>
<link type="template" href="subsilver2.xml" lang="en">subsilver2</link>
</link-group>
</header>
<action-group>
<copy>
<file from="root/*.*" to="*.*" />
</copy>
<open src="includes/ucp/ucp_pm_compose.php">
<edit>
<find><![CDATA[// Store message, sync counters]]></find>
<action type="before-add"><![CDATA[ // START Anti-Spam ACP
if (!sizeof($error) && $config['asacp_spam_words_pm_action'] && antispam::spam_words(array($subject, $message_parser->message)))
{
$user->add_lang('mods/asacp');
$log_message = $message_parser->message;
decode_message($log_message, $message_parser->bbcode_uid);
antispam::add_log('LOG_SPAM_PM_DENIED', array($subject, $log_message));
$error[] = $user->lang['SPAM_DENIED'];
}
if (!sizeof($error) && $config['asacp_akismet_pm_action'] && antispam::akismet($message_parser->message))
{
$user->add_lang('mods/asacp');
$log_message = $message_parser->message;
decode_message($log_message, $message_parser->bbcode_uid);
antispam::add_log('LOG_SPAM_PM_DENIED_AKISMET', array($subject, $log_message));
$error[] = $user->lang['SPAM_DENIED'];
}
if (!sizeof($error) && $submit && $user->data['user_flagged'])
{
antispam::add_log('LOG_SENT_PM', array('pm' => $address_list), 'flag');
}
// END Anti-Spam ACP]]></action>
</edit>
</open>
<open src="includes/ucp/ucp_profile.php">
<edit>
<find><![CDATA[ if (!check_form_key('ucp_profile_info'))
{
$error[] = 'FORM_INVALID';
}]]></find>
<action type="after-add"><![CDATA[ // START Anti-Spam ACP
antispam::ucp_profile($data, $error);
// END Anti-Spam ACP]]></action>
</edit>
<edit>
<find><![CDATA[// Get additional profile fields and assign them to the template block var 'profile_fields']]></find>
<action type="before-add"><![CDATA[ // START Anti-Spam ACP
antispam::ucp_profile_display();
// END Anti-Spam ACP]]></action>
</edit>
<edit>
<find><![CDATA[add_form_key('ucp_sig');]]></find>
<action type="after-add"><![CDATA[ // START Anti-Spam ACP
antispam::ucp_signature($signature, $error);
// END Anti-Spam ACP]]></action>
</edit>
</open>
<open src="includes/ucp/ucp_register.php">
<edit>
<find><![CDATA[include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);]]></find>
<action type="after-add"><![CDATA[ // START Anti-Spam ACP
antispam::ucp_preregister();
// END Anti-Spam ACP]]></action>
</edit>
<edit>
<find><![CDATA[ if (!sizeof($error))
{
$server_url = generate_board_url();]]></find>
<action type="before-add"><![CDATA[ // START Anti-Spam ACP
antispam::ucp_register($data, $error);
// END Anti-Spam ACP]]></action>
</edit>
<edit>
<find><![CDATA[ // Register user...
$user_id = user_add($user_row, $cp_data);]]></find>
<action type="after-add"><![CDATA[ // START Anti-Spam ACP
antispam::ucp_postregister($user_id, $user_row);
// END Anti-Spam ACP]]></action>
</edit>
</open>
<open src="includes/functions.php">
<edit>
<find><![CDATA[// application/xhtml+xml not used because of IE]]></find>
<action type="before-add"><![CDATA[ // START Anti-Spam ACP
antispam::page_header();
// END Anti-Spam ACP]]></action>
</edit>
</open>
<open src="styles/prosilver/template/overall_footer.html">
<edit>
<find><![CDATA[<!-- IF U_ACP --><br /><strong><a href="{U_ACP}">{L_ACP}</a></strong><!-- ENDIF -->]]></find>
<action type="before-add"><![CDATA[ <br />{L_ASACP_CREDITS}]]></action>
</edit>
</open>
<open src="styles/prosilver/template/overall_header.html">
<edit>
<find><![CDATA[ <!-- IF U_RESTORE_PERMISSIONS --> •
<a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a>
<!-- ENDIF -->]]></find>
<action type="after-add"><![CDATA[ <!-- IF U_USER_FLAG_NEW --> •
<a href="{U_USER_FLAG_NEW}" style="color: red; font-weight: bold;">{L_USER_FLAG_NEW}</a>
<!-- ENDIF -->]]></action>
</edit>
</open>
<open src="common.php">
<edit>
<find><![CDATA[?>]]></find>
<action type="before-add"><![CDATA[// START Anti-Spam ACP
require($phpbb_root_path . 'antispam/asacp.' . $phpEx);
// END Anti-Spam ACP]]></action>
</edit>
</open>
<open src="posting.php">
<edit>
<find><![CDATA[// Store message, sync counters]]></find>
<action type="before-add"><![CDATA[ // START Anti-Spam ACP
$sc_title = (empty($post_data['topic_title'])) ? $post_data['post_subject'] : $post_data['topic_title'];
$asacp_is_spam = false;
if (!sizeof($error) && $config['asacp_spam_words_posting_action'] && antispam::spam_words(array($sc_title, $message_parser->message)))
{
switch ($config['asacp_spam_words_posting_action'])
{
case 1 :
$user->add_lang('mods/asacp');
$log_message = $message_parser->message;
decode_message($log_message, $message_parser->bbcode_uid);
antispam::add_log('LOG_SPAM_POST_DENIED', array($sc_title, $log_message));
$error[] = $user->lang['SPAM_DENIED'];
break;
case 2 :
$asacp_is_spam = true;
break;
}
}
if (!sizeof($error) && $config['asacp_akismet_post_action'] && antispam::akismet($message_parser->message))
{
switch ($config['asacp_akismet_post_action'])
{
case 1 :
$user->add_lang('mods/asacp');
$log_message = $message_parser->message;
decode_message($log_message, $message_parser->bbcode_uid);
antispam::add_log('LOG_SPAM_POST_DENIED_AKISMET', array($sc_title, $log_message));
$error[] = $user->lang['SPAM_DENIED'];
break;
case 2 :
$asacp_is_spam = true;
break;
}
}
// END Anti-Spam ACP]]></action>
</edit>
<edit>
<find><![CDATA[$redirect_url = submit_post($mode, $post_data['post_subject'], $post_data['username'], $post_data['topic_type'], $poll, $data, $update_message, ($update_message || $update_subject) ? true : false);]]></find>
<action type="before-add"><![CDATA[ // START Anti-Spam ACP
if ($asacp_is_spam)
{
$data['force_approved_state'] = false;
}
// END Anti-Spam ACP]]></action>
<action type="after-add"><![CDATA[ // START Anti-Spam ACP
antispam::submit_post($mode, $data['post_id']);
// END Anti-Spam ACP]]></action>
</edit>
</open>
<open src="viewtopic.php">
<edit>
<find><![CDATA['search' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx",]]></find>
<action type="after-add"><![CDATA[ // START Anti-Spam ACP
'user_flagged' => $row['user_flagged'] ? true : false,
// END Anti-Spam ACP]]></action>
</edit>
<edit>
<find><![CDATA[$template->assign_block_vars('postrow', $postrow);]]></find>
<action type="after-add"><![CDATA[ // START Anti-Spam ACP
antispam::flagged_output($poster_id, $user_cache[$poster_id], 'postrow.custom_fields', $row['post_id']);
// END Anti-Spam ACP]]></action>
</edit>
</open>
<diy-instructions lang="en">Configure the Anti-Spam Settings in the ACP->.MODS->Anti-Spam</diy-instructions>
</action-group>
</mod>