automoderate - Version 1.0.2

Version Notes

Using this extension we can automatically approve Product reviews and tags based on Customer Group/Type and filter of predefined set of words.

Download this release

Release Info

Developer Sourcefuse Technologies
Extension automoderate
Version 1.0.2
Comparing to
See all releases


Code changes from version 1.0.1 to 1.0.2

app/code/community/Sourcefuse/Automoderate/controllers/AutomoderateController.php CHANGED
@@ -76,6 +76,8 @@ class Sourcefuse_Automoderate_AutomoderateController extends Mage_Core_Controlle
76
  $ary2 = explode(',', $blockingContents);
77
  $ary1 = array_map('strtolower', $ary1);
78
  $ary2 = array_map('strtolower', $ary2);
 
 
79
  $common = implode(', ', array_intersect($ary1, $ary2));
80
  return $common;
81
  }
76
  $ary2 = explode(',', $blockingContents);
77
  $ary1 = array_map('strtolower', $ary1);
78
  $ary2 = array_map('strtolower', $ary2);
79
+ $ary1 = array_map('trim', $ary1);
80
+ $ary2 = array_map('trim', $ary2);
81
  $common = implode(', ', array_intersect($ary1, $ary2));
82
  return $common;
83
  }
app/code/community/Sourcefuse/Automoderate/controllers/Tag/IndexController.php CHANGED
@@ -95,6 +95,8 @@ class Sourcefuse_Automoderate_Tag_IndexController extends Mage_Tag_IndexControll
95
  $ary2 = explode(',', $blockingContents);
96
  $ary1 = array_map('strtolower', $ary1);
97
  $ary2 = array_map('strtolower', $ary2);
 
 
98
  $common = implode(', ', array_intersect($ary1, $ary2));
99
  return $common;
100
  }
95
  $ary2 = explode(',', $blockingContents);
96
  $ary1 = array_map('strtolower', $ary1);
97
  $ary2 = array_map('strtolower', $ary2);
98
+ $ary1 = array_map('trim', $ary1);
99
+ $ary2 = array_map('trim', $ary2);
100
  $common = implode(', ', array_intersect($ary1, $ary2));
101
  return $common;
102
  }
app/code/community/Sourcefuse/Automoderate/etc/system.xml CHANGED
@@ -8,7 +8,7 @@
8
  </tabs>
9
  <sections>
10
  <automoderate_section module="automoderate" translate="label">
11
- <label>Automoderate Review and Tag</label>
12
  <sort_order>200</sort_order>
13
  <show_in_default>1</show_in_default>
14
  <show_in_website>1</show_in_website>
@@ -33,7 +33,7 @@
33
  </automoderateproductreviews>
34
 
35
  <automoderateproductreviewmessage translate="label">
36
- <label>Succesfull Message in Product Reviews</label>
37
  <comment><![CDATA[When Autoapprove Reviews set to yes, then 'Your review has been accepted.'<br />
38
  When Autoapprove Reviews set to no, then 'Your review has been accepted for moderation.']]> </comment>
39
  <frontend_type>text</frontend_type>
@@ -44,7 +44,7 @@
44
  </automoderateproductreviewmessage>
45
 
46
  <allowed_customer_group>
47
- <label>Auto approve reviews of these customer group</label>
48
  <frontend_type>multiselect</frontend_type>
49
  <source_model>automoderate/system_config_source_customergroup</source_model>
50
  <sort_order>2</sort_order>
@@ -54,7 +54,7 @@
54
  </allowed_customer_group>
55
 
56
  <automoderate_reviews_filter>
57
- <label>Words to filter in review</label>
58
  <comment> <![CDATA[Review will not be submitted if it contains these words.</br>
59
  <b>Note: </b>Use a comma (,) to seperate words.]]></comment>
60
  <frontend_type>textarea</frontend_type>
@@ -84,7 +84,7 @@
84
  </automoderatetag>
85
 
86
  <allowed_customer_group>
87
- <label>Auto approve reviews of these customer group</label>
88
  <frontend_type>multiselect</frontend_type>
89
  <source_model>automoderate/system_config_source_customergroup</source_model>
90
  <sort_order>2</sort_order>
@@ -94,7 +94,7 @@
94
  </allowed_customer_group>
95
 
96
  <automoderate_tag_filter>
97
- <label>Words to filter in tags</label>
98
  <comment><![CDATA[Product Tags will not be submitted if it contains these words.</br>
99
  <b>Note: </b> Use a comma (,) to seperate words.]]></comment>
100
  <frontend_type>textarea</frontend_type>
8
  </tabs>
9
  <sections>
10
  <automoderate_section module="automoderate" translate="label">
11
+ <label>Moderated Review System</label>
12
  <sort_order>200</sort_order>
13
  <show_in_default>1</show_in_default>
14
  <show_in_website>1</show_in_website>
33
  </automoderateproductreviews>
34
 
35
  <automoderateproductreviewmessage translate="label">
36
+ <label>Success Message On Product Review Submission.</label>
37
  <comment><![CDATA[When Autoapprove Reviews set to yes, then 'Your review has been accepted.'<br />
38
  When Autoapprove Reviews set to no, then 'Your review has been accepted for moderation.']]> </comment>
39
  <frontend_type>text</frontend_type>
44
  </automoderateproductreviewmessage>
45
 
46
  <allowed_customer_group>
47
+ <label>Select Customer Group</label>
48
  <frontend_type>multiselect</frontend_type>
49
  <source_model>automoderate/system_config_source_customergroup</source_model>
50
  <sort_order>2</sort_order>
54
  </allowed_customer_group>
55
 
56
  <automoderate_reviews_filter>
57
+ <label>Words to be filtered in content</label>
58
  <comment> <![CDATA[Review will not be submitted if it contains these words.</br>
59
  <b>Note: </b>Use a comma (,) to seperate words.]]></comment>
60
  <frontend_type>textarea</frontend_type>
84
  </automoderatetag>
85
 
86
  <allowed_customer_group>
87
+ <label>Select Customer Group</label>
88
  <frontend_type>multiselect</frontend_type>
89
  <source_model>automoderate/system_config_source_customergroup</source_model>
90
  <sort_order>2</sort_order>
94
  </allowed_customer_group>
95
 
96
  <automoderate_tag_filter>
97
+ <label>Words to be filtered in content.</label>
98
  <comment><![CDATA[Product Tags will not be submitted if it contains these words.</br>
99
  <b>Note: </b> Use a comma (,) to seperate words.]]></comment>
100
  <frontend_type>textarea</frontend_type>
package.xml CHANGED
@@ -16,9 +16,9 @@ You can also set reviews and tags to be automatically approved only if the custo
16
  An extra layer of validation is also added with "filter words" section. With this feature we can validate the content and prevent it from submitting if any of the word is found in the content going to be submitted by user.</description>
17
  <notes>Using this extension we can automatically approve Product reviews and tags based on Customer Group/Type and filter of predefined set of words.</notes>
18
  <authors><author><name>Sourcefuse Technologies</name><user>sourcefuse</user><email>ecomsupport@sourcefuse.com</email></author></authors>
19
- <date>2016-01-08</date>
20
- <time>11:15:49</time>
21
- <contents><target name="mageetc"><dir name="modules"><file name="Sourcefuse_Automoderate.xml" hash="a2140255c4a98d65b9a52ac39fa7739e"/></dir></target><target name="magecommunity"><dir name="Sourcefuse"><dir name="Automoderate"><dir name="Block"><dir name="Review"><file name="Form.php" hash="7150b3e832c493bd369b164ff859d9bb"/></dir></dir><dir name="Helper"><file name="Data.php" hash="ec4824829bc1e7e9cb245a644f8078d2"/></dir><dir name="Model"><file name="Automoderate.php" hash="e2f616b26a5b42c369ba056cc2e0edca"/><file name="Observer.php" hash="1cdc44f136bc2f35c0729cdf5a014654"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Customergroup.php" hash="94f6c08eee334defb9b91f6e8afae94d"/></dir></dir></dir></dir><dir name="controllers"><file name="AutomoderateController.php" hash="78b99adbb430a7553b5714a04bc16412"/><dir name="Tag"><file name="IndexController.php" hash="e43efb882e738bd54cc29769ec9c4110"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="6d008163485e9d19916073dbfab50c1e"/><file name="config.xml" hash="b1cf61e7afac4a7f8c2a48ef523d65f5"/><file name="system.xml" hash="4dd100e1d914c9e954b003201ee5c9ee"/><file name="system.xml~" hash="c1cc34d19268d7b6bf1a6ad6317861a7"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="automoderate"><file name="form.phtml" hash="793f3cd4a34956a557d6466a9a55d581"/><file name="tag.phtml" hash="d0fe14530820d212d4c0500837a9ab8f"/></dir></dir><dir name="layout"><file name="automoderate.xml" hash="55cec4af5ae448f93ac2bb4e2317872b"/></dir></dir></dir></dir></target></contents>
22
  <compatible/>
23
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
24
  </package>
16
  An extra layer of validation is also added with "filter words" section. With this feature we can validate the content and prevent it from submitting if any of the word is found in the content going to be submitted by user.</description>
17
  <notes>Using this extension we can automatically approve Product reviews and tags based on Customer Group/Type and filter of predefined set of words.</notes>
18
  <authors><author><name>Sourcefuse Technologies</name><user>sourcefuse</user><email>ecomsupport@sourcefuse.com</email></author></authors>
19
+ <date>2016-01-11</date>
20
+ <time>14:06:14</time>
21
+ <contents><target name="mageetc"><dir name="modules"><file name="Sourcefuse_Automoderate.xml" hash="a2140255c4a98d65b9a52ac39fa7739e"/></dir></target><target name="magecommunity"><dir name="Sourcefuse"><dir name="Automoderate"><dir name="Block"><dir name="Review"><file name="Form.php" hash="7150b3e832c493bd369b164ff859d9bb"/></dir></dir><dir name="Helper"><file name="Data.php" hash="ec4824829bc1e7e9cb245a644f8078d2"/></dir><dir name="Model"><file name="Automoderate.php" hash="e2f616b26a5b42c369ba056cc2e0edca"/><file name="Observer.php" hash="1cdc44f136bc2f35c0729cdf5a014654"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Customergroup.php" hash="94f6c08eee334defb9b91f6e8afae94d"/></dir></dir></dir></dir><dir name="controllers"><file name="AutomoderateController.php" hash="bf807b85482dd01db186bcc72bedd51b"/><dir name="Tag"><file name="IndexController.php" hash="dc7c0e4483491c72a73187afae6dfbce"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="6d008163485e9d19916073dbfab50c1e"/><file name="config.xml" hash="b1cf61e7afac4a7f8c2a48ef523d65f5"/><file name="system.xml" hash="2e9889c318dea6caf1d469559175de76"/><file name="system.xml~" hash="c1cc34d19268d7b6bf1a6ad6317861a7"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="automoderate"><file name="form.phtml" hash="793f3cd4a34956a557d6466a9a55d581"/><file name="tag.phtml" hash="d0fe14530820d212d4c0500837a9ab8f"/></dir></dir><dir name="layout"><file name="automoderate.xml" hash="55cec4af5ae448f93ac2bb4e2317872b"/></dir></dir></dir></dir></target></contents>
22
  <compatible/>
23
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
24
  </package>