crearehidefront - Version 1.0.1.1

Version Notes

Moved to community codepool.

Download this release

Release Info

Developer Magento Core Team
Extension crearehidefront
Version 1.0.1.1
Comparing to
See all releases


Code changes from version 1.0.1 to 1.0.1.1

app/code/community/Creare/Hidefront/Model/Observer.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Creare_Hidefront_Model_Observer
4
+ {
5
+ public function hideFront()
6
+ {
7
+
8
+ if (Mage::getStoreConfig('dev/restrict/hidefrontend'))
9
+ {
10
+ if (!Mage::helper('core')->isDevAllowed() || !Mage::getStoreConfig('dev/restrict/allow_ips'))
11
+ {
12
+ die(Mage::getStoreConfig('dev/restrict/message'));
13
+ }
14
+ }
15
+ }
16
+ }
app/code/community/Creare/Hidefront/etc/config.xml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <modules>
4
+ <Creare_Hidefront>
5
+ <version>1.0.0</version>
6
+ </Creare_Hidefront>
7
+ </modules>
8
+ <global>
9
+ <models>
10
+ <hidefront>
11
+ <class>Creare_Hidefront_Model</class>
12
+ </hidefront>
13
+ </models>
14
+ </global>
15
+ <frontend>
16
+ <events>
17
+ <controller_action_predispatch>
18
+ <observers>
19
+ <hide_front>
20
+ <type>singleton</type>
21
+ <class>hidefront/observer</class>
22
+ <method>hideFront</method>
23
+ </hide_front>
24
+ </observers>
25
+ </controller_action_predispatch>
26
+ </events>
27
+ </frontend>
28
+ <default>
29
+ <dev>
30
+ <restrict>
31
+ <hidefrontend>0</hidefrontend>
32
+ <message>Frontend veiwing disabled.</message>
33
+ </restrict>
34
+ </dev>
35
+ </default>
36
+ </config>
app/code/community/Creare/Hidefront/etc/system.xml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <sections>
4
+ <dev>
5
+ <groups>
6
+ <restrict>
7
+ <fields>
8
+ <hidefrontend translate="label">
9
+ <label>Hide frontend from non-valid IPs?</label>
10
+ <frontend_type>select</frontend_type>
11
+ <source_model>adminhtml/system_config_source_yesno</source_model>
12
+ <sort_order>50</sort_order>
13
+ <show_in_default>1</show_in_default>
14
+ <show_in_website>1</show_in_website>
15
+ <show_in_store>1</show_in_store>
16
+ </hidefrontend>
17
+ <message translate="label">
18
+ <label>Frontend Message</label>
19
+ <frontend_type>text</frontend_type>
20
+ <read_only>1</read_only>
21
+ <sort_order>60</sort_order>
22
+ <show_in_default>1</show_in_default>
23
+ <show_in_website>1</show_in_website>
24
+ <show_in_store>1</show_in_store>
25
+ </message>
26
+ </fields>
27
+ </restrict>
28
+ </groups>
29
+ </dev>
30
+ </sections>
31
+ </config>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>crearehidefront</name>
4
- <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license/>
7
  <channel>community</channel>
@@ -11,8 +11,8 @@
11
  <notes>Moved to community codepool.</notes>
12
  <authors><author><name>Adam Moss</name><user>auto-converted</user><email>adam@creare.co.uk</email></author></authors>
13
  <date>2014-01-07</date>
14
- <time>09:28:45</time>
15
- <contents><target name="mageetc"><dir name="modules"><file name="Creare_Hidefront.xml" hash="61970a1b483d782cd243d2b37c8db7ce"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>crearehidefront</name>
4
+ <version>1.0.1.1</version>
5
  <stability>stable</stability>
6
  <license/>
7
  <channel>community</channel>
11
  <notes>Moved to community codepool.</notes>
12
  <authors><author><name>Adam Moss</name><user>auto-converted</user><email>adam@creare.co.uk</email></author></authors>
13
  <date>2014-01-07</date>
14
+ <time>09:36:18</time>
15
+ <contents><target name="magecommunity"><dir name="Creare"><dir name="Hidefront"><dir name="Model"><file name="Observer.php" hash="ccf4a7ccdfe8ffd638aecb896da76fdf"/></dir><dir name="etc"><file name="config.xml" hash="72bb266d62b46dfee3fb0476a0bd0677"/><file name="system.xml" hash="93fa8f6691de16d82ca420f2a04dd1ee"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Creare_Hidefront.xml" hash="61970a1b483d782cd243d2b37c8db7ce"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>