<?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.3.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.2</mod-version>
<installation>
<level>intermediate</level>
<time>600</time>
<target-version>3.0.6</target-version>
</installation>
<history>
<entry>
<date>2009-01-13</date>
<rev-version>0.9.0</rev-version>
<changelog lang="en">
<change>Release Candidate 1</change>
</changelog>
</entry>
<entry>
<date>2009-02-04</date>
<rev-version>0.9.1</rev-version>
<changelog lang="en">
<change>ModX 1.2.2</change>
<change>[Change] antispam/acp_asacp.php renamed to antisam/acp_functions.php</change>
<change>[Change] Timeout limit for checking for a newer version is now 1 second.</change>
<change>[Fix] Spam Words checker not properly counting number of matches of a regex/auto-regex word (#5)</change>
<change>[Fix] Multiple Bugs in One Click Ban Fixed</change>
</changelog>
</entry>
<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>
</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 ($config['asacp_spam_words_pm_action'] && antispam::spam_words(array($subject, $message_parser->message)))
{
$user->add_lang('mods/asacp');
antispam::add_log('LOG_SPAM_PM_DENIED', array($subject, $message_parser->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 ($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');
antispam::add_log('LOG_SPAM_POST_DENIED', array($sc_title, $message_parser->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>