Version Notes
Checked 1.8.1.0 compatibility
Download this release
Release Info
Developer | Hussey Coding |
Extension | HusseyCoding_SpamFilter |
Version | 1.0.3 |
Comparing to | |
See all releases |
Version 1.0.3
- app/code/community/HusseyCoding/Common/etc/system.xml +9 -0
- app/code/community/HusseyCoding/SpamFilter/Helper/Data.php +8 -0
- app/code/community/HusseyCoding/SpamFilter/Model/AdminNotificationInbox.php +19 -0
- app/code/community/HusseyCoding/SpamFilter/etc/adminhtml.xml +25 -0
- app/code/community/HusseyCoding/SpamFilter/etc/config.xml +29 -0
- app/code/community/HusseyCoding/SpamFilter/etc/system.xml +35 -0
- app/etc/modules/HusseyCoding_Common.xml +9 -0
- app/etc/modules/HusseyCoding_SpamFilter.xml +9 -0
- package.xml +22 -0
app/code/community/HusseyCoding/Common/etc/system.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<husseycoding translate="label">
|
5 |
+
<label>Hussey Coding</label>
|
6 |
+
<sort_order>500</sort_order>
|
7 |
+
</husseycoding>
|
8 |
+
</tabs>
|
9 |
+
</config>
|
app/code/community/HusseyCoding/SpamFilter/Helper/Data.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class HusseyCoding_SpamFilter_Helper_Data extends Mage_Core_Helper_Abstract
|
3 |
+
{
|
4 |
+
public function isEnabled()
|
5 |
+
{
|
6 |
+
return (bool) Mage::getStoreConfig('spamfilter/spamfilter/enabled');
|
7 |
+
}
|
8 |
+
}
|
app/code/community/HusseyCoding/SpamFilter/Model/AdminNotificationInbox.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class HusseyCoding_SpamFilter_Model_AdminNotificationInbox extends Mage_AdminNotification_Model_Inbox
|
3 |
+
{
|
4 |
+
public function parse(array $data)
|
5 |
+
{
|
6 |
+
if (Mage::helper('spamfilter')->isEnabled()):
|
7 |
+
$backtrace = debug_backtrace();
|
8 |
+
array_shift($backtrace);
|
9 |
+
foreach ($backtrace as $back):
|
10 |
+
$class = $back['class'];
|
11 |
+
if (!preg_match('/^Mage_.*/', $class) && $class != 'Mage'):
|
12 |
+
return;
|
13 |
+
endif;
|
14 |
+
endforeach;
|
15 |
+
endif;
|
16 |
+
|
17 |
+
return parent::parse($data);
|
18 |
+
}
|
19 |
+
}
|
app/code/community/HusseyCoding/SpamFilter/etc/adminhtml.xml
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<acl>
|
4 |
+
<resources>
|
5 |
+
<all>
|
6 |
+
<title>Allow Everything</title>
|
7 |
+
</all>
|
8 |
+
<admin>
|
9 |
+
<children>
|
10 |
+
<system>
|
11 |
+
<children>
|
12 |
+
<config>
|
13 |
+
<children>
|
14 |
+
<spamfilter module="spamfilter">
|
15 |
+
<title>Spam Filter</title>
|
16 |
+
</spamfilter>
|
17 |
+
</children>
|
18 |
+
</config>
|
19 |
+
</children>
|
20 |
+
</system>
|
21 |
+
</children>
|
22 |
+
</admin>
|
23 |
+
</resources>
|
24 |
+
</acl>
|
25 |
+
</config>
|
app/code/community/HusseyCoding/SpamFilter/etc/config.xml
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<HusseyCoding_SpamFilter>
|
5 |
+
<version>1.0.3</version>
|
6 |
+
</HusseyCoding_SpamFilter>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<helpers>
|
10 |
+
<spamfilter>
|
11 |
+
<class>HusseyCoding_SpamFilter_Helper</class>
|
12 |
+
</spamfilter>
|
13 |
+
</helpers>
|
14 |
+
<models>
|
15 |
+
<adminnotification>
|
16 |
+
<rewrite>
|
17 |
+
<inbox>HusseyCoding_SpamFilter_Model_AdminNotificationInbox</inbox>
|
18 |
+
</rewrite>
|
19 |
+
</adminnotification>
|
20 |
+
</models>
|
21 |
+
</global>
|
22 |
+
<default>
|
23 |
+
<spamfilter>
|
24 |
+
<spamfilter>
|
25 |
+
<enabled>0</enabled>
|
26 |
+
</spamfilter>
|
27 |
+
</spamfilter>
|
28 |
+
</default>
|
29 |
+
</config>
|
app/code/community/HusseyCoding/SpamFilter/etc/system.xml
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<sections>
|
4 |
+
<spamfilter translate="label" module="spamfilter">
|
5 |
+
<label>Spam Filter</label>
|
6 |
+
<tab>husseycoding</tab>
|
7 |
+
<frontend_type>text</frontend_type>
|
8 |
+
<sort_order>1</sort_order>
|
9 |
+
<show_in_default>1</show_in_default>
|
10 |
+
<show_in_website>1</show_in_website>
|
11 |
+
<show_in_store>1</show_in_store>
|
12 |
+
<groups>
|
13 |
+
<spamfilter translate="label">
|
14 |
+
<label>Spam Notifications</label>
|
15 |
+
<frontend_type>text</frontend_type>
|
16 |
+
<sort_order>1</sort_order>
|
17 |
+
<show_in_default>1</show_in_default>
|
18 |
+
<show_in_website>1</show_in_website>
|
19 |
+
<show_in_store>1</show_in_store>
|
20 |
+
<fields>
|
21 |
+
<enabled>
|
22 |
+
<label>Filter Spam Notifications</label>
|
23 |
+
<frontend_type>select</frontend_type>
|
24 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
25 |
+
<sort_order>1</sort_order>
|
26 |
+
<show_in_default>1</show_in_default>
|
27 |
+
<show_in_website>1</show_in_website>
|
28 |
+
<show_in_store>1</show_in_store>
|
29 |
+
</enabled>
|
30 |
+
</fields>
|
31 |
+
</spamfilter>
|
32 |
+
</groups>
|
33 |
+
</spamfilter>
|
34 |
+
</sections>
|
35 |
+
</config>
|
app/etc/modules/HusseyCoding_Common.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<HusseyCoding_Common>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</HusseyCoding_Common>
|
8 |
+
</modules>
|
9 |
+
</config>
|
app/etc/modules/HusseyCoding_SpamFilter.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<HusseyCoding_SpamFilter>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</HusseyCoding_SpamFilter>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>HusseyCoding_SpamFilter</name>
|
4 |
+
<version>1.0.3</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Disable third party admin notifications but still be notified by Magento.</summary>
|
10 |
+
<description>Third party extension developers far too often exploit the admin notification system to insert sales, and other spam messages into your admin panel. It is a frustrating, and often daily annoyance for many store owners to login into admin at the start of the working day only to be greeted with yet another sales related spam message in the notification inbox.
|
11 |
+

|
12 |
+
You can of course disable the Notifications module altogether, but then you also do not receive legitimate notifications from Magento about important updates and releases
|
13 |
+

|
14 |
+
Spam Filter disables the ability of third party sources to add notifications to admin, but still allows notices originating from Magento to be added.</description>
|
15 |
+
<notes> Checked 1.8.1.0 compatibility</notes>
|
16 |
+
<authors><author><name>Hussey Coding</name><user>husseycoding</user><email>info@husseycoding.co.uk</email></author></authors>
|
17 |
+
<date>2015-08-26</date>
|
18 |
+
<time>08:21:59</time>
|
19 |
+
<contents><target name="magecommunity"><dir name="HusseyCoding"><dir name="SpamFilter"><dir name="etc"><file name="adminhtml.xml" hash="8e92f61e8066a2cd15b953459d9c7abf"/><file name="config.xml" hash="5cdd8a07533cf51058e4a0f17860cea0"/><file name="system.xml" hash="e76ca0618a0ad3f87deca0fe723a8493"/></dir><dir name="Helper"><file name="Data.php" hash="061a35779378482a4ee6b2742f837ff3"/></dir><dir name="Model"><file name="AdminNotificationInbox.php" hash="bc5638196ea4c430f0532eea03e8b68e"/></dir></dir><dir name="Common"><dir name="etc"><file name="system.xml" hash="6c9ba9f227b9adfc9abf97f17b46fdbf"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="HusseyCoding_SpamFilter.xml" hash="ed9d2379b0d0c50e7da762963515ebdb"/><file name="HusseyCoding_Common.xml" hash="2a0b4d683045f3ddec3389fd921a276b"/></dir></target></contents>
|
20 |
+
<compatible/>
|
21 |
+
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
22 |
+
</package>
|