Vebug_Path_Hints - Version 1.0.0.0

Version Notes

First Stable release.

Download this release

Release Info

Developer Leandro Villagran
Extension Vebug_Path_Hints
Version 1.0.0.0
Comparing to
See all releases


Version 1.0.0.0

app/code/community/Vstudio/Vebug/Helper/Data.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Vstudio_Vebug_Helper_Data extends Mage_Core_Helper_Data
4
+ {
5
+
6
+ }
app/code/community/Vstudio/Vebug/controllers/adminhtml/Vebug/manageController.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Vstudio_Vebug_Adminhtml_Vebug_ManageController
4
+ extends Mage_Adminhtml_Controller_Action {
5
+
6
+ const HINT_PATH = 'dev/debug/template_hints';
7
+ const BLOCK_PATH = 'dev/debug/template_hints_blocks';
8
+ const DSCOPE = 'default';
9
+ const WSCOPE = 'websites';
10
+
11
+ public function indexAction() {
12
+ $this->_redirect('*/dashboard');
13
+ return;
14
+ }
15
+
16
+ public function enableAction() {
17
+ $on = 1;
18
+ $this->__switch($on, self::DSCOPE);
19
+ $message = $this->__('Admin paths have been successfully enable!');
20
+ Mage::getSingleton('core/session')->addSuccess($message);
21
+ $this->_redirect('*/dashboard');
22
+ return;
23
+ }
24
+
25
+ public function disableAction() {
26
+
27
+ $off = 0;
28
+ $this->__switch($off, self::DSCOPE);
29
+ $message = $this->__('Admin paths have been successfully disabled!');
30
+ Mage::getSingleton('core/session')->addSuccess($message);
31
+ $this->_redirect('*/dashboard');
32
+
33
+ return;
34
+ }
35
+
36
+ public function enableFrontAction() {
37
+
38
+ $on = 1;
39
+ $this->__switch($on, self::WSCOPE, $on);
40
+ $message = $this->__('Frontend paths have been successfully enable! Please make sure to refresh your website.');
41
+ Mage::getSingleton('core/session')->addSuccess($message);
42
+ $this->_redirect('*/dashboard');
43
+ return;
44
+ }
45
+
46
+ public function disableFrontAction() {
47
+ $off = 0;
48
+ $this->__switch($off, self::WSCOPE, 1);
49
+ $message = $this->__('Frontend paths have been successfully disabled!');
50
+ Mage::getSingleton('core/session')->addSuccess($message);
51
+ $this->_redirect('*/dashboard');
52
+ return;
53
+ }
54
+
55
+ protected function __switch($switch, $scope, $value = 0) {
56
+ $this->__switchPaths(self::HINT_PATH, $switch, $scope, $value);
57
+ $this->__switchPaths(self::BLOCK_PATH, $switch, $scope, $value);
58
+ }
59
+
60
+ /**
61
+ * Turn on/off hint path
62
+ *
63
+ * @param string $path configuration path
64
+ * @param int $scopeId scope id
65
+ * @param string $scope
66
+ * @param int $value
67
+ */
68
+ protected function __switchPaths($path, $scopeId, $scope, $value) {
69
+ $switch = Mage::getModel('core/config');
70
+ $switch->saveConfig($path, $scopeId, $scope, $value);
71
+
72
+ # refresh magento configuration cache
73
+ Mage::app()->getCacheInstance()->cleanType('config');
74
+ Mage::app()->getConfig()->reinit();
75
+ return;
76
+ }
77
+
78
+ }
app/code/community/Vstudio/Vebug/etc/adminhtml.xml ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <menu>
4
+ <vstudio_vebug_menu module="vstudio_vebug" translate="title">
5
+ <title>Path Hints</title>
6
+ <sort_order>200</sort_order>
7
+ <children>
8
+ <vebug_enable_paths module="vstudio_vebug" translate="title">
9
+ <title>Enable Admin Paths</title>
10
+ <sort_order>1</sort_order>
11
+ <action>adminhtml/vebug_manage/enable/</action>
12
+ </vebug_enable_paths>
13
+ <vebug_disable_paths module="vstudio_vebug" translate="title">
14
+ <title>Disable Admin Paths</title>
15
+ <sort_order>2</sort_order>
16
+ <action>adminhtml/vebug_manage/disable/</action>
17
+ </vebug_disable_paths>
18
+ <vebug_enable_front_paths module="vstudio_vebug" translate="title">
19
+ <title>Enable Front Paths</title>
20
+ <sort_order>3</sort_order>
21
+ <action>adminhtml/vebug_manage/enableFront/</action>
22
+ </vebug_enable_front_paths>
23
+ <vebug_disable_front_paths module="vstudio_vebug" translate="title">
24
+ <title>Disable Front Paths</title>
25
+ <sort_order>4</sort_order>
26
+ <action>adminhtml/vebug_manage/disableFront/</action>
27
+ </vebug_disable_front_paths>
28
+ </children>
29
+ </vstudio_vebug_menu>
30
+ </menu>
31
+ <acl>
32
+ <resources>
33
+ <all>
34
+ <title>Allow Everything</title>
35
+ </all>
36
+ <admin>
37
+ <children>
38
+ <vstudio_vebug_menu translate="title" module="vstudio_vebug">
39
+ <title>Vebug Menu</title>
40
+ <sort_order>80</sort_order>
41
+ <children>
42
+ <vebug_enable_paths translate="title">
43
+ <title>Enable Admin Paths</title>
44
+ <sort_order>1</sort_order>
45
+ </vebug_enable_paths>
46
+ <vebug_disable_paths translate="title">
47
+ <title>Disable Admin Paths</title>
48
+ <sort_order>2</sort_order>
49
+ </vebug_disable_paths>
50
+ <vebug_enable_front_paths translate="title">
51
+ <title>Enable Front Paths</title>
52
+ <sort_order>3</sort_order>
53
+ </vebug_enable_front_paths>
54
+ <vebug_disable_front_paths translate="title">
55
+ <title>Disable Front Paths</title>
56
+ <sort_order>4</sort_order>
57
+ </vebug_disable_front_paths>
58
+ </children>
59
+ </vstudio_vebug_menu>
60
+ <system>
61
+ <children>
62
+ <config>
63
+ <children>
64
+ <vstudio_vebug_config module="vstudio_vebug">
65
+ <title>Venu Menu</title>
66
+ </vstudio_vebug_config>
67
+ </children>
68
+ </config>
69
+ </children>
70
+ </system>
71
+ </children>
72
+ </admin>
73
+ </resources>
74
+ </acl>
75
+ </config>
app/code/community/Vstudio/Vebug/etc/config.xml ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <modules>
4
+ <Vstudio_Vebug>
5
+ <version>1.0.0.0</version>
6
+ </Vstudio_Vebug>
7
+ </modules>
8
+ <admin>
9
+ <routers>
10
+ <adminhtml>
11
+ <args>
12
+ <modules>
13
+ <vstudio_vebug after="Mage_Adminhtml">Vstudio_Vebug_Adminhtml</vstudio_vebug>
14
+ </modules>
15
+ </args>
16
+ </adminhtml>
17
+ </routers>
18
+ </admin>
19
+ <global>
20
+ <resources>
21
+ <vstudio_vebug_setup>
22
+ <setup>
23
+ <module>Vstudio_Vebug</module>
24
+ </setup>
25
+ </vstudio_vebug_setup>
26
+ </resources>
27
+ <helpers>
28
+ <vstudio_vebug>
29
+ <class>Vstudio_Vebug_Helper</class>
30
+ </vstudio_vebug>
31
+ </helpers>
32
+ </global>
33
+ </config>
app/code/community/Vstudio/Vebug/sql/vstudio_vebug_setup/install-1.0.0.0.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ $setupHints = Mage::getModel('core/config');
3
+
4
+ $setupHints->saveConfig('dev/debug/template_hints', "0", 'default', 0);
5
+ $setupHints->saveConfig('dev/debug/template_hints_blocks', "0", 'default', 0);
app/etc/modules/Vstudio_Vebug.xml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" ?>
2
+ <config>
3
+ <modules>
4
+
5
+ <Vstudio_Vebug>
6
+ <active>true</active>
7
+ <codePool>community</codePool>
8
+ </Vstudio_Vebug>
9
+
10
+ </modules>
11
+ </config>
12
+
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Vebug_Path_Hints</name>
4
+ <version>1.0.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/academic.php">("AFL") v. 3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Easily turn on template path hints for both front and back end.</summary>
10
+ <description>Turn template path on with click of a button.</description>
11
+ <notes>First Stable release.</notes>
12
+ <authors><author><name>Leandro Villagran</name><user>veandro</user><email>veandro@outlook.com</email></author></authors>
13
+ <date>2014-04-15</date>
14
+ <time>04:05:42</time>
15
+ <contents><target name="mageetc"><dir><dir name="modules"><file name="Vstudio_Vebug.xml" hash="af62a6d91f3e16a8b8bc99d77244b1f0"/></dir></dir></target><target name="magecommunity"><dir><dir name="Vstudio"><dir name="Vebug"><dir name="Helper"><file name="Data.php" hash="bdf4fd3d37ba3ecb64c6a4c1b99b12e2"/></dir><dir name="controllers"><dir name="adminhtml"><dir name="Vebug"><file name="manageController.php" hash="d3f0df3d8d1f25f66afcad89fc15357c"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="df028634434db2fdca0b1af77f620f3d"/><file name="config.xml" hash="17521e173cc296a4d25da667d3fe7949"/></dir><dir name="sql"><dir name="vstudio_vebug_setup"><file name="install-1.0.0.0.php" hash="d92f2a1dda74d9e033413ebf158e31aa"/></dir></dir></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.2.0</min><max>5.4.24</max></php></required></dependencies>
18
+ </package>