Version Notes
the module is also available on github https://github.com/aleron75/Webgriffe_TphPro
Download this release
Release Info
| Developer | Alessandro Ronchi |
| Extension | Webgriffe_TphPro |
| Version | 1.1.3 |
| Comparing to | |
| See all releases | |
Code changes from version 1.1.0 to 1.1.3
- app/code/community/Webgriffe/TphPro/Block/Handles.php +35 -35
- app/code/community/Webgriffe/TphPro/Helper/Data.php +21 -15
- app/code/community/Webgriffe/TphPro/Model/Observer.php +93 -74
- app/code/community/Webgriffe/TphPro/Model/System/Config/Source/Display.php +36 -36
- app/code/community/Webgriffe/TphPro/etc/config.xml +85 -85
- app/code/community/Webgriffe/TphPro/etc/system.xml +60 -60
- app/etc/modules/Webgriffe_TphPro.xml +9 -9
- package.xml +7 -7
app/code/community/Webgriffe/TphPro/Block/Handles.php
CHANGED
|
@@ -1,36 +1,36 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/**
|
| 4 |
-
* TphPro Handles block
|
| 5 |
-
*
|
| 6 |
-
* @author Alessandro Ronchi <aronchi at webgriffe.com>
|
| 7 |
-
*/
|
| 8 |
-
class Webgriffe_TphPro_Block_Handles extends Mage_Core_Block_Abstract {
|
| 9 |
-
protected function _toHtml()
|
| 10 |
-
{
|
| 11 |
-
$html = '';
|
| 12 |
-
|
| 13 |
-
switch(Mage::helper('webgriffe_tphpro')->getDisplayHandlesType()) {
|
| 14 |
-
|
| 15 |
-
case Webgriffe_TphPro_Model_System_Config_Source_Display::DISPLAY_HTML_ELEMENT:
|
| 16 |
-
$handles = '<' . implode("> <", $this->getLayout()->getUpdate()->getHandles()) . '>';
|
| 17 |
-
$html = '<div class="global-site-notice demo-notice" style="background:#1b83e6;">';
|
| 18 |
-
$html .= '<div class="notice-inner"><p>Handles: ' . $handles . '</p></div>';
|
| 19 |
-
$html .= '</div>';
|
| 20 |
-
break;
|
| 21 |
-
|
| 22 |
-
case Webgriffe_TphPro_Model_System_Config_Source_Display::DISPLAY_HTML_COMMENT:
|
| 23 |
-
$handles = '<' . implode("> <", $this->getLayout()->getUpdate()->getHandles()) . '>';
|
| 24 |
-
$html = "\r\n<!-- Handles: " . $handles . "-->\r\n";
|
| 25 |
-
break;
|
| 26 |
-
|
| 27 |
-
case Webgriffe_TphPro_Model_System_Config_Source_Display::DISPLAY_NONE:
|
| 28 |
-
#break intentionally omitted
|
| 29 |
-
|
| 30 |
-
default:
|
| 31 |
-
#nothing to do
|
| 32 |
-
}
|
| 33 |
-
|
| 34 |
-
return $html;
|
| 35 |
-
}
|
| 36 |
}
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
/**
|
| 4 |
+
* TphPro Handles block
|
| 5 |
+
*
|
| 6 |
+
* @author Alessandro Ronchi <aronchi at webgriffe.com>
|
| 7 |
+
*/
|
| 8 |
+
class Webgriffe_TphPro_Block_Handles extends Mage_Core_Block_Abstract {
|
| 9 |
+
protected function _toHtml()
|
| 10 |
+
{
|
| 11 |
+
$html = '';
|
| 12 |
+
|
| 13 |
+
switch(Mage::helper('webgriffe_tphpro')->getDisplayHandlesType()) {
|
| 14 |
+
|
| 15 |
+
case Webgriffe_TphPro_Model_System_Config_Source_Display::DISPLAY_HTML_ELEMENT:
|
| 16 |
+
$handles = '<' . implode("> <", $this->getLayout()->getUpdate()->getHandles()) . '>';
|
| 17 |
+
$html = '<div class="global-site-notice demo-notice" style="background:#1b83e6;">';
|
| 18 |
+
$html .= '<div class="notice-inner"><p>Handles: ' . $handles . '</p></div>';
|
| 19 |
+
$html .= '</div>';
|
| 20 |
+
break;
|
| 21 |
+
|
| 22 |
+
case Webgriffe_TphPro_Model_System_Config_Source_Display::DISPLAY_HTML_COMMENT:
|
| 23 |
+
$handles = '<' . implode("> <", $this->getLayout()->getUpdate()->getHandles()) . '>';
|
| 24 |
+
$html = "\r\n<!-- Handles: " . $handles . "-->\r\n";
|
| 25 |
+
break;
|
| 26 |
+
|
| 27 |
+
case Webgriffe_TphPro_Model_System_Config_Source_Display::DISPLAY_NONE:
|
| 28 |
+
#break intentionally omitted
|
| 29 |
+
|
| 30 |
+
default:
|
| 31 |
+
#nothing to do
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
return $html;
|
| 35 |
+
}
|
| 36 |
}
|
app/code/community/Webgriffe/TphPro/Helper/Data.php
CHANGED
|
@@ -1,16 +1,22 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
class Webgriffe_TphPro_Helper_Data extends Mage_Core_Helper_Data
|
| 3 |
-
{
|
| 4 |
-
public function getDisplayHandlesType() {
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
}
|
| 1 |
+
<?php
|
| 2 |
+
class Webgriffe_TphPro_Helper_Data extends Mage_Core_Helper_Data
|
| 3 |
+
{
|
| 4 |
+
public function getDisplayHandlesType() {
|
| 5 |
+
if (Mage::app()->getRequest()->getParam('handles')) {
|
| 6 |
+
return Mage::app()->getRequest()->getParam('handles');
|
| 7 |
+
}
|
| 8 |
+
return Mage::getStoreConfig('webgriffe_tphpro/webgriffe_tphpro_general/webgriffe_tphpro_handle');
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
public function getDisplayHintsType() {
|
| 12 |
+
if (Mage::app()->getRequest()->getParam('hints')) {
|
| 13 |
+
return Mage::app()->getRequest()->getParam('hints');
|
| 14 |
+
}
|
| 15 |
+
return Mage::getStoreConfig('webgriffe_tphpro/webgriffe_tphpro_general/webgriffe_tphpro_hints');
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
public function getIsLogHttpParams() {
|
| 19 |
+
return Mage::getStoreConfig('webgriffe_tphpro/webgriffe_tphpro_general/webgriffe_tphpro_logparams');
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
}
|
app/code/community/Webgriffe/TphPro/Model/Observer.php
CHANGED
|
@@ -1,75 +1,94 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/**
|
| 4 |
-
* TphPro Observer model
|
| 5 |
-
*
|
| 6 |
-
* @author Alessandro Ronchi <aronchi at webgriffe.com>
|
| 7 |
-
*/
|
| 8 |
-
class Webgriffe_TphPro_Model_Observer {
|
| 9 |
-
|
| 10 |
-
public function addHandlesBlock($observer) {
|
| 11 |
-
$event = $observer->getEvent();
|
| 12 |
-
/** @var Mage_Core_Model_Layout $layout */
|
| 13 |
-
if ($layout = $event->getLayout()) {
|
| 14 |
-
/** @var Mage_Core_Block_Abstract $layoutBlock */
|
| 15 |
-
$layoutBlock = $layout->createBlock('Webgriffe_TphPro_Block_Handles', 'webgriffe_tphpro_handles');
|
| 16 |
-
if (!empty($layoutBlock)) {
|
| 17 |
-
$layout->addOutputBlock('webgriffe_tphpro_handles');
|
| 18 |
-
}
|
| 19 |
-
}
|
| 20 |
-
}
|
| 21 |
-
|
| 22 |
-
public function addTemplateHints($observer) {
|
| 23 |
-
$event = $observer->getEvent();
|
| 24 |
-
/** @var Mage_Core_Block_Abstract $block */
|
| 25 |
-
$block = $event->getBlock();
|
| 26 |
-
|
| 27 |
-
$
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
. '
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
.
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
.
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
$
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
}
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
/**
|
| 4 |
+
* TphPro Observer model
|
| 5 |
+
*
|
| 6 |
+
* @author Alessandro Ronchi <aronchi at webgriffe.com>
|
| 7 |
+
*/
|
| 8 |
+
class Webgriffe_TphPro_Model_Observer {
|
| 9 |
+
|
| 10 |
+
public function addHandlesBlock($observer) {
|
| 11 |
+
$event = $observer->getEvent();
|
| 12 |
+
/** @var Mage_Core_Model_Layout $layout */
|
| 13 |
+
if ($layout = $event->getLayout()) {
|
| 14 |
+
/** @var Mage_Core_Block_Abstract $layoutBlock */
|
| 15 |
+
$layoutBlock = $layout->createBlock('Webgriffe_TphPro_Block_Handles', 'webgriffe_tphpro_handles');
|
| 16 |
+
if (!empty($layoutBlock)) {
|
| 17 |
+
$layout->addOutputBlock('webgriffe_tphpro_handles');
|
| 18 |
+
}
|
| 19 |
+
}
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
public function addTemplateHints($observer) {
|
| 23 |
+
$event = $observer->getEvent();
|
| 24 |
+
/** @var Mage_Core_Block_Abstract $block */
|
| 25 |
+
$block = $event->getBlock();
|
| 26 |
+
|
| 27 |
+
if ($block instanceof Webgriffe_TphPro_Block_Handles)
|
| 28 |
+
{
|
| 29 |
+
return;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
$transport = $event->getTransport();
|
| 33 |
+
|
| 34 |
+
$html = '';
|
| 35 |
+
switch(Mage::helper('webgriffe_tphpro')->getDisplayHintsType()) {
|
| 36 |
+
case Webgriffe_TphPro_Model_System_Config_Source_Display::DISPLAY_HTML_ELEMENT:
|
| 37 |
+
$html = '<magento '
|
| 38 |
+
#. ($isRootBlock ? 'handles="' . implode(",", $block->getLayout()->getUpdate()->getHandles()) . '"' : '')
|
| 39 |
+
. ' block="' . get_class($block) . '"'
|
| 40 |
+
#. ' template="' . $block->getTemplate() . '"'
|
| 41 |
+
. (!strcmp($block->getTemplate(), '') ? '' : ' template_file="' . $block->getTemplateFile() . '"' )
|
| 42 |
+
. ' name="' . $block->getNameInLayout() . '"'
|
| 43 |
+
. ' alias="' . $block->getBlockAlias() . '"'
|
| 44 |
+
. '>' . $transport->getHtml() . '</magento>';
|
| 45 |
+
break;
|
| 46 |
+
|
| 47 |
+
case Webgriffe_TphPro_Model_System_Config_Source_Display::DISPLAY_HTML_COMMENT:
|
| 48 |
+
$data = 'block="' . get_class($block) . '"'
|
| 49 |
+
. (!strcmp($block->getTemplate(), '') ? '' : ' template_file="' . $block->getTemplateFile() . '"' )
|
| 50 |
+
. ' name="' . $block->getNameInLayout() . '"'
|
| 51 |
+
. ' alias="' . $block->getBlockAlias() . '"';
|
| 52 |
+
$html = "\r\n<!-- [HINTS BEGIN " . $data . "] -->\r\n"
|
| 53 |
+
. $transport->getHtml()
|
| 54 |
+
. "<!-- [HINTS END " . $data . "] -->\r\n";
|
| 55 |
+
break;
|
| 56 |
+
|
| 57 |
+
case Webgriffe_TphPro_Model_System_Config_Source_Display::DISPLAY_NONE:
|
| 58 |
+
#break intentionally omitted
|
| 59 |
+
|
| 60 |
+
default:
|
| 61 |
+
$html = $transport->getHtml();
|
| 62 |
+
}
|
| 63 |
+
$transport->setHtml($html);
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
public function logRequestParameters($observer) {
|
| 67 |
+
if (Mage::helper('webgriffe_tphpro')->getIsLogHttpParams()) {
|
| 68 |
+
$request = Mage::app()->getRequest();
|
| 69 |
+
|
| 70 |
+
$userType = 'User';
|
| 71 |
+
$userName = 'guest';
|
| 72 |
+
|
| 73 |
+
if (Mage::app()->getStore()->isAdmin()) {
|
| 74 |
+
$userType = 'Admin';
|
| 75 |
+
$userName = Mage::getSingleton('admin/session')->getUser()->getUsername();
|
| 76 |
+
} else {
|
| 77 |
+
$email = Mage::getSingleton('customer/session')->getCustomer()->getEmail();
|
| 78 |
+
if (!empty($email)) {
|
| 79 |
+
$userName = $email;
|
| 80 |
+
}
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
$txt = sprintf("%s Request by '%s'\r\n", $userType, $userName);
|
| 84 |
+
$txt .= "Request Parameters:\r\n";
|
| 85 |
+
$txt .= sprintf("Module name: %s\r\n", $request->getModuleName());
|
| 86 |
+
$txt .= sprintf("Controller name: %s\r\n", $request->getControllerName());
|
| 87 |
+
$txt .= sprintf("Action name: %s\r\n", $request->getActionName());
|
| 88 |
+
$txt .= sprintf("Request Parameters: %s\r\n", var_export($request->getParams(), true));
|
| 89 |
+
|
| 90 |
+
Mage::log($txt, null, 'Webgriffe_TphPro.log', true);
|
| 91 |
+
}
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
}
|
app/code/community/Webgriffe/TphPro/Model/System/Config/Source/Display.php
CHANGED
|
@@ -1,36 +1,36 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
class Webgriffe_TphPro_Model_System_Config_Source_Display
|
| 3 |
-
{
|
| 4 |
-
const DISPLAY_NONE = 'none';
|
| 5 |
-
const DISPLAY_HTML_ELEMENT = 'html_element';
|
| 6 |
-
const DISPLAY_HTML_COMMENT = 'html_comment';
|
| 7 |
-
|
| 8 |
-
/**
|
| 9 |
-
* Options getter
|
| 10 |
-
*
|
| 11 |
-
* @return array
|
| 12 |
-
*/
|
| 13 |
-
public function toOptionArray()
|
| 14 |
-
{
|
| 15 |
-
return array(
|
| 16 |
-
array('value' => self::DISPLAY_NONE, 'label'=>Mage::helper('webgriffe_tphpro')->__('No')),
|
| 17 |
-
array('value' => self::DISPLAY_HTML_ELEMENT, 'label'=>Mage::helper('webgriffe_tphpro')->__('Yes, as HTML element')),
|
| 18 |
-
array('value' => self::DISPLAY_HTML_COMMENT, 'label'=>Mage::helper('webgriffe_tphpro')->__('Yes, as HTML comment')),
|
| 19 |
-
);
|
| 20 |
-
}
|
| 21 |
-
|
| 22 |
-
/**
|
| 23 |
-
* Get options in "key-value" format
|
| 24 |
-
*
|
| 25 |
-
* @return array
|
| 26 |
-
*/
|
| 27 |
-
public function toArray()
|
| 28 |
-
{
|
| 29 |
-
return array(
|
| 30 |
-
self::DISPLAY_NONE => Mage::helper('webgriffe_tphpro')->__('No'),
|
| 31 |
-
self::DISPLAY_HTML_ELEMENT => Mage::helper('webgriffe_tphpro')->__('Yes, as HTML element'),
|
| 32 |
-
self::DISPLAY_HTML_COMMENT => Mage::helper('webgriffe_tphpro')->__('Yes, as HTML comment'),
|
| 33 |
-
);
|
| 34 |
-
}
|
| 35 |
-
|
| 36 |
-
}
|
| 1 |
+
<?php
|
| 2 |
+
class Webgriffe_TphPro_Model_System_Config_Source_Display
|
| 3 |
+
{
|
| 4 |
+
const DISPLAY_NONE = 'none';
|
| 5 |
+
const DISPLAY_HTML_ELEMENT = 'html_element';
|
| 6 |
+
const DISPLAY_HTML_COMMENT = 'html_comment';
|
| 7 |
+
|
| 8 |
+
/**
|
| 9 |
+
* Options getter
|
| 10 |
+
*
|
| 11 |
+
* @return array
|
| 12 |
+
*/
|
| 13 |
+
public function toOptionArray()
|
| 14 |
+
{
|
| 15 |
+
return array(
|
| 16 |
+
array('value' => self::DISPLAY_NONE, 'label'=>Mage::helper('webgriffe_tphpro')->__('No')),
|
| 17 |
+
array('value' => self::DISPLAY_HTML_ELEMENT, 'label'=>Mage::helper('webgriffe_tphpro')->__('Yes, as HTML element')),
|
| 18 |
+
array('value' => self::DISPLAY_HTML_COMMENT, 'label'=>Mage::helper('webgriffe_tphpro')->__('Yes, as HTML comment')),
|
| 19 |
+
);
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
/**
|
| 23 |
+
* Get options in "key-value" format
|
| 24 |
+
*
|
| 25 |
+
* @return array
|
| 26 |
+
*/
|
| 27 |
+
public function toArray()
|
| 28 |
+
{
|
| 29 |
+
return array(
|
| 30 |
+
self::DISPLAY_NONE => Mage::helper('webgriffe_tphpro')->__('No'),
|
| 31 |
+
self::DISPLAY_HTML_ELEMENT => Mage::helper('webgriffe_tphpro')->__('Yes, as HTML element'),
|
| 32 |
+
self::DISPLAY_HTML_COMMENT => Mage::helper('webgriffe_tphpro')->__('Yes, as HTML comment'),
|
| 33 |
+
);
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
}
|
app/code/community/Webgriffe/TphPro/etc/config.xml
CHANGED
|
@@ -1,86 +1,86 @@
|
|
| 1 |
-
<?xml version="1.0"?>
|
| 2 |
-
<config>
|
| 3 |
-
<modules>
|
| 4 |
-
<Webgriffe_TphPro>
|
| 5 |
-
<version>1.1.
|
| 6 |
-
</Webgriffe_TphPro>
|
| 7 |
-
</modules>
|
| 8 |
-
<global>
|
| 9 |
-
<blocks>
|
| 10 |
-
<webgriffe_tphpro>
|
| 11 |
-
<class>Webgriffe_TphPro_Block</class>
|
| 12 |
-
</webgriffe_tphpro>
|
| 13 |
-
</blocks>
|
| 14 |
-
<helpers>
|
| 15 |
-
<webgriffe_tphpro>
|
| 16 |
-
<class>Webgriffe_TphPro_Helper</class>
|
| 17 |
-
</webgriffe_tphpro>
|
| 18 |
-
</helpers>
|
| 19 |
-
<models>
|
| 20 |
-
<webgriffe_tphpro>
|
| 21 |
-
<class>Webgriffe_TphPro_Model</class>
|
| 22 |
-
</webgriffe_tphpro>
|
| 23 |
-
</models>
|
| 24 |
-
|
| 25 |
-
<events>
|
| 26 |
-
<http_response_send_before>
|
| 27 |
-
<observers>
|
| 28 |
-
<webgriffe_http_response_send_before>
|
| 29 |
-
<type>enabled</type>
|
| 30 |
-
<class>webgriffe_tphpro/observer</class>
|
| 31 |
-
<method>logRequestParameters</method>
|
| 32 |
-
</webgriffe_http_response_send_before>
|
| 33 |
-
</observers>
|
| 34 |
-
</http_response_send_before>
|
| 35 |
-
</events>
|
| 36 |
-
</global>
|
| 37 |
-
|
| 38 |
-
<frontend>
|
| 39 |
-
<events>
|
| 40 |
-
<controller_action_layout_generate_blocks_before>
|
| 41 |
-
<observers>
|
| 42 |
-
<webgriffe_tphpro_generate_blocks_before>
|
| 43 |
-
<type>singleton</type>
|
| 44 |
-
<class>webgriffe_tphpro/observer</class>
|
| 45 |
-
<method>addHandlesBlock</method>
|
| 46 |
-
</webgriffe_tphpro_generate_blocks_before>
|
| 47 |
-
</observers>
|
| 48 |
-
</controller_action_layout_generate_blocks_before>
|
| 49 |
-
|
| 50 |
-
<core_block_abstract_to_html_after>
|
| 51 |
-
<observers>
|
| 52 |
-
<webgriffe_tphpro_block_to_html_after>
|
| 53 |
-
<type>singleton</type>
|
| 54 |
-
<class>webgriffe_tphpro/observer</class>
|
| 55 |
-
<method>addTemplateHints</method>
|
| 56 |
-
</webgriffe_tphpro_block_to_html_after>
|
| 57 |
-
</observers>
|
| 58 |
-
</core_block_abstract_to_html_after>
|
| 59 |
-
</events>
|
| 60 |
-
</frontend>
|
| 61 |
-
|
| 62 |
-
<adminhtml>
|
| 63 |
-
<acl>
|
| 64 |
-
<resources>
|
| 65 |
-
<all>
|
| 66 |
-
<title>Allow Everything</title>
|
| 67 |
-
</all>
|
| 68 |
-
<admin>
|
| 69 |
-
<children>
|
| 70 |
-
<system>
|
| 71 |
-
<children>
|
| 72 |
-
<config>
|
| 73 |
-
<children>
|
| 74 |
-
<webgriffe_tphpro>
|
| 75 |
-
<title>Webgriffe - Template Path Hints Pro</title>
|
| 76 |
-
</webgriffe_tphpro>
|
| 77 |
-
</children>
|
| 78 |
-
</config>
|
| 79 |
-
</children>
|
| 80 |
-
</system>
|
| 81 |
-
</children>
|
| 82 |
-
</admin>
|
| 83 |
-
</resources>
|
| 84 |
-
</acl>
|
| 85 |
-
</adminhtml>
|
| 86 |
</config>
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<modules>
|
| 4 |
+
<Webgriffe_TphPro>
|
| 5 |
+
<version>1.1.3</version>
|
| 6 |
+
</Webgriffe_TphPro>
|
| 7 |
+
</modules>
|
| 8 |
+
<global>
|
| 9 |
+
<blocks>
|
| 10 |
+
<webgriffe_tphpro>
|
| 11 |
+
<class>Webgriffe_TphPro_Block</class>
|
| 12 |
+
</webgriffe_tphpro>
|
| 13 |
+
</blocks>
|
| 14 |
+
<helpers>
|
| 15 |
+
<webgriffe_tphpro>
|
| 16 |
+
<class>Webgriffe_TphPro_Helper</class>
|
| 17 |
+
</webgriffe_tphpro>
|
| 18 |
+
</helpers>
|
| 19 |
+
<models>
|
| 20 |
+
<webgriffe_tphpro>
|
| 21 |
+
<class>Webgriffe_TphPro_Model</class>
|
| 22 |
+
</webgriffe_tphpro>
|
| 23 |
+
</models>
|
| 24 |
+
|
| 25 |
+
<events>
|
| 26 |
+
<http_response_send_before>
|
| 27 |
+
<observers>
|
| 28 |
+
<webgriffe_http_response_send_before>
|
| 29 |
+
<type>enabled</type>
|
| 30 |
+
<class>webgriffe_tphpro/observer</class>
|
| 31 |
+
<method>logRequestParameters</method>
|
| 32 |
+
</webgriffe_http_response_send_before>
|
| 33 |
+
</observers>
|
| 34 |
+
</http_response_send_before>
|
| 35 |
+
</events>
|
| 36 |
+
</global>
|
| 37 |
+
|
| 38 |
+
<frontend>
|
| 39 |
+
<events>
|
| 40 |
+
<controller_action_layout_generate_blocks_before>
|
| 41 |
+
<observers>
|
| 42 |
+
<webgriffe_tphpro_generate_blocks_before>
|
| 43 |
+
<type>singleton</type>
|
| 44 |
+
<class>webgriffe_tphpro/observer</class>
|
| 45 |
+
<method>addHandlesBlock</method>
|
| 46 |
+
</webgriffe_tphpro_generate_blocks_before>
|
| 47 |
+
</observers>
|
| 48 |
+
</controller_action_layout_generate_blocks_before>
|
| 49 |
+
|
| 50 |
+
<core_block_abstract_to_html_after>
|
| 51 |
+
<observers>
|
| 52 |
+
<webgriffe_tphpro_block_to_html_after>
|
| 53 |
+
<type>singleton</type>
|
| 54 |
+
<class>webgriffe_tphpro/observer</class>
|
| 55 |
+
<method>addTemplateHints</method>
|
| 56 |
+
</webgriffe_tphpro_block_to_html_after>
|
| 57 |
+
</observers>
|
| 58 |
+
</core_block_abstract_to_html_after>
|
| 59 |
+
</events>
|
| 60 |
+
</frontend>
|
| 61 |
+
|
| 62 |
+
<adminhtml>
|
| 63 |
+
<acl>
|
| 64 |
+
<resources>
|
| 65 |
+
<all>
|
| 66 |
+
<title>Allow Everything</title>
|
| 67 |
+
</all>
|
| 68 |
+
<admin>
|
| 69 |
+
<children>
|
| 70 |
+
<system>
|
| 71 |
+
<children>
|
| 72 |
+
<config>
|
| 73 |
+
<children>
|
| 74 |
+
<webgriffe_tphpro>
|
| 75 |
+
<title>Webgriffe - Template Path Hints Pro</title>
|
| 76 |
+
</webgriffe_tphpro>
|
| 77 |
+
</children>
|
| 78 |
+
</config>
|
| 79 |
+
</children>
|
| 80 |
+
</system>
|
| 81 |
+
</children>
|
| 82 |
+
</admin>
|
| 83 |
+
</resources>
|
| 84 |
+
</acl>
|
| 85 |
+
</adminhtml>
|
| 86 |
</config>
|
app/code/community/Webgriffe/TphPro/etc/system.xml
CHANGED
|
@@ -1,61 +1,61 @@
|
|
| 1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
-
<config>
|
| 3 |
-
<tabs>
|
| 4 |
-
<webgriffe translate="label">
|
| 5 |
-
<label>Webgriffe Extensions</label>
|
| 6 |
-
<sort_order>999000</sort_order>
|
| 7 |
-
</webgriffe>
|
| 8 |
-
</tabs>
|
| 9 |
-
<sections>
|
| 10 |
-
<webgriffe_tphpro translate="label">
|
| 11 |
-
<label>Template Path Hints Pro</label>
|
| 12 |
-
<tab>webgriffe</tab>
|
| 13 |
-
<sort_order>10</sort_order>
|
| 14 |
-
<show_in_default>1</show_in_default>
|
| 15 |
-
<show_in_website>1</show_in_website>
|
| 16 |
-
<show_in_store>1</show_in_store>
|
| 17 |
-
<groups>
|
| 18 |
-
<webgriffe_tphpro_general translate="label">
|
| 19 |
-
<label>General</label>
|
| 20 |
-
<frontend_type>text</frontend_type>
|
| 21 |
-
<sort_order>10</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 |
-
<fields>
|
| 26 |
-
<webgriffe_tphpro_handle translate="label,comment">
|
| 27 |
-
<label>Display Layout Handles</label>
|
| 28 |
-
<comment>Choose whether and how to display Frontend Layout Handles; consider that displaying them as HTML element can invalidate CSS rules and break the HTML layout.</comment>
|
| 29 |
-
<frontend_type>select</frontend_type>
|
| 30 |
-
<source_model>webgriffe_tphpro/system_config_source_display</source_model>
|
| 31 |
-
<sort_order>10</sort_order>
|
| 32 |
-
<show_in_default>1</show_in_default>
|
| 33 |
-
<show_in_website>1</show_in_website>
|
| 34 |
-
<show_in_store>1</show_in_store>
|
| 35 |
-
</webgriffe_tphpro_handle>
|
| 36 |
-
<webgriffe_tphpro_hints translate="label,comment">
|
| 37 |
-
<label>Display Template Hints</label>
|
| 38 |
-
<comment>Choose whether and how to display Frontend Template Hints; consider that displaying them as HTML element can invalidate CSS rules and break the HTML layout.</comment>
|
| 39 |
-
<frontend_type>select</frontend_type>
|
| 40 |
-
<source_model>webgriffe_tphpro/system_config_source_display</source_model>
|
| 41 |
-
<sort_order>20</sort_order>
|
| 42 |
-
<show_in_default>1</show_in_default>
|
| 43 |
-
<show_in_website>1</show_in_website>
|
| 44 |
-
<show_in_store>1</show_in_store>
|
| 45 |
-
</webgriffe_tphpro_hints>
|
| 46 |
-
<webgriffe_tphpro_logparams translate="label,comment">
|
| 47 |
-
<label>Log Request Parameters</label>
|
| 48 |
-
<comment>Choose whether to log (both Frontend and Admin) HTTP Request's parameters. Note: if you set this value to 'Yes', it will produce a log whether or not you have Magento logging enabled.</comment>
|
| 49 |
-
<frontend_type>select</frontend_type>
|
| 50 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 51 |
-
<sort_order>30</sort_order>
|
| 52 |
-
<show_in_default>1</show_in_default>
|
| 53 |
-
<show_in_website>1</show_in_website>
|
| 54 |
-
<show_in_store>1</show_in_store>
|
| 55 |
-
</webgriffe_tphpro_logparams>
|
| 56 |
-
</fields>
|
| 57 |
-
</webgriffe_tphpro_general>
|
| 58 |
-
</groups>
|
| 59 |
-
</webgriffe_tphpro>
|
| 60 |
-
</sections>
|
| 61 |
</config>
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<config>
|
| 3 |
+
<tabs>
|
| 4 |
+
<webgriffe translate="label">
|
| 5 |
+
<label>Webgriffe Extensions</label>
|
| 6 |
+
<sort_order>999000</sort_order>
|
| 7 |
+
</webgriffe>
|
| 8 |
+
</tabs>
|
| 9 |
+
<sections>
|
| 10 |
+
<webgriffe_tphpro translate="label">
|
| 11 |
+
<label>Template Path Hints Pro</label>
|
| 12 |
+
<tab>webgriffe</tab>
|
| 13 |
+
<sort_order>10</sort_order>
|
| 14 |
+
<show_in_default>1</show_in_default>
|
| 15 |
+
<show_in_website>1</show_in_website>
|
| 16 |
+
<show_in_store>1</show_in_store>
|
| 17 |
+
<groups>
|
| 18 |
+
<webgriffe_tphpro_general translate="label">
|
| 19 |
+
<label>General</label>
|
| 20 |
+
<frontend_type>text</frontend_type>
|
| 21 |
+
<sort_order>10</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 |
+
<fields>
|
| 26 |
+
<webgriffe_tphpro_handle translate="label,comment">
|
| 27 |
+
<label>Display Layout Handles</label>
|
| 28 |
+
<comment>Choose whether and how to display Frontend Layout Handles; consider that displaying them as HTML element can invalidate CSS rules and break the HTML layout.</comment>
|
| 29 |
+
<frontend_type>select</frontend_type>
|
| 30 |
+
<source_model>webgriffe_tphpro/system_config_source_display</source_model>
|
| 31 |
+
<sort_order>10</sort_order>
|
| 32 |
+
<show_in_default>1</show_in_default>
|
| 33 |
+
<show_in_website>1</show_in_website>
|
| 34 |
+
<show_in_store>1</show_in_store>
|
| 35 |
+
</webgriffe_tphpro_handle>
|
| 36 |
+
<webgriffe_tphpro_hints translate="label,comment">
|
| 37 |
+
<label>Display Template Hints</label>
|
| 38 |
+
<comment>Choose whether and how to display Frontend Template Hints; consider that displaying them as HTML element can invalidate CSS rules and break the HTML layout.</comment>
|
| 39 |
+
<frontend_type>select</frontend_type>
|
| 40 |
+
<source_model>webgriffe_tphpro/system_config_source_display</source_model>
|
| 41 |
+
<sort_order>20</sort_order>
|
| 42 |
+
<show_in_default>1</show_in_default>
|
| 43 |
+
<show_in_website>1</show_in_website>
|
| 44 |
+
<show_in_store>1</show_in_store>
|
| 45 |
+
</webgriffe_tphpro_hints>
|
| 46 |
+
<webgriffe_tphpro_logparams translate="label,comment">
|
| 47 |
+
<label>Log Request Parameters</label>
|
| 48 |
+
<comment>Choose whether to log (both Frontend and Admin) HTTP Request's parameters. Note: if you set this value to 'Yes', it will produce a log whether or not you have Magento logging enabled.</comment>
|
| 49 |
+
<frontend_type>select</frontend_type>
|
| 50 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 51 |
+
<sort_order>30</sort_order>
|
| 52 |
+
<show_in_default>1</show_in_default>
|
| 53 |
+
<show_in_website>1</show_in_website>
|
| 54 |
+
<show_in_store>1</show_in_store>
|
| 55 |
+
</webgriffe_tphpro_logparams>
|
| 56 |
+
</fields>
|
| 57 |
+
</webgriffe_tphpro_general>
|
| 58 |
+
</groups>
|
| 59 |
+
</webgriffe_tphpro>
|
| 60 |
+
</sections>
|
| 61 |
</config>
|
app/etc/modules/Webgriffe_TphPro.xml
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
-
<?xml version="1.0"?>
|
| 2 |
-
<config>
|
| 3 |
-
<modules>
|
| 4 |
-
<Webgriffe_TphPro>
|
| 5 |
-
<active>true</active>
|
| 6 |
-
<codePool>community</codePool>
|
| 7 |
-
<depends></depends>
|
| 8 |
-
</Webgriffe_TphPro>
|
| 9 |
-
</modules>
|
| 10 |
</config>
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<modules>
|
| 4 |
+
<Webgriffe_TphPro>
|
| 5 |
+
<active>true</active>
|
| 6 |
+
<codePool>community</codePool>
|
| 7 |
+
<depends></depends>
|
| 8 |
+
</Webgriffe_TphPro>
|
| 9 |
+
</modules>
|
| 10 |
</config>
|
package.xml
CHANGED
|
@@ -1,24 +1,24 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Webgriffe_TphPro</name>
|
| 4 |
-
<version>1.1.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
-
<summary>
|
| 10 |
<description>This extension allows you to print some useful information about Frontend Blocks in the HTML of your page.
|
| 11 |

|
| 12 |
You can choose whether to print them as HTML Elements or Comments.
|
| 13 |

|
| 14 |
Furthermore you can choose to log both Frontend and Backend HTTP Request's parameters.
|
| 15 |

|
| 16 |
-
Once installed, you can configure this extension in the System > Configuration > WEBGRIFFE EXTENSIONS > Template Path Hints Pro section.</description>
|
| 17 |
<notes>the module is also available on github https://github.com/aleron75/Webgriffe_TphPro</notes>
|
| 18 |
<authors><author><name>Webgriffe</name><user>webgriffe</user><email>mail@webgriffe.com</email></author></authors>
|
| 19 |
-
<date>
|
| 20 |
-
<time>
|
| 21 |
-
<contents><target name="magecommunity"><dir name="Webgriffe"><dir name="TphPro"><dir name="Block"><file name="Handles.php" hash="
|
| 22 |
<compatible/>
|
| 23 |
-
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php
|
| 24 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Webgriffe_TphPro</name>
|
| 4 |
+
<version>1.1.3</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
+
<summary>n enhanced Template Path Hints extension for Magento that inserts references to used Magento Blocks inside HTML code, avoiding the usage of the more invasive built in Template Path Hints.</summary>
|
| 10 |
<description>This extension allows you to print some useful information about Frontend Blocks in the HTML of your page.
|
| 11 |

|
| 12 |
You can choose whether to print them as HTML Elements or Comments.
|
| 13 |

|
| 14 |
Furthermore you can choose to log both Frontend and Backend HTTP Request's parameters.
|
| 15 |

|
| 16 |
+
Once installed, you can configure this extension in the System &gt; Configuration &gt; WEBGRIFFE EXTENSIONS &gt; Template Path Hints Pro section.</description>
|
| 17 |
<notes>the module is also available on github https://github.com/aleron75/Webgriffe_TphPro</notes>
|
| 18 |
<authors><author><name>Webgriffe</name><user>webgriffe</user><email>mail@webgriffe.com</email></author></authors>
|
| 19 |
+
<date>2014-03-18</date>
|
| 20 |
+
<time>10:36:35</time>
|
| 21 |
+
<contents><target name="magecommunity"><dir name="Webgriffe"><dir name="TphPro"><dir name="Block"><file name="Handles.php" hash="e77836aa6893c6cb95dcb53c9bb4dba0"/></dir><dir name="Helper"><file name="Data.php" hash="b634adb7d79c0dc47ddf75e637af7fd3"/></dir><dir name="Model"><file name="Observer.php" hash="2f7a3fa8e269240fa5c5487618ded499"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Display.php" hash="179e61c670aadbb52ed2b97df2f99a7d"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="5aa3ba63ebe7f4a2ec3020e1b4b1e083"/><file name="system.xml" hash="62b26796fa60185cbc48aea18bb0e4aa"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Webgriffe_TphPro.xml" hash="306228869af43163d9e123810cbea36b"/></dir></target></contents>
|
| 22 |
<compatible/>
|
| 23 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 24 |
</package>
|
