Version Notes
Bugfix: Prevent error caused when All Meta Robots disabled
Download this release
Release Info
Developer | Martin Dines |
Extension | gpmd_seopack |
Version | 1.2.3 |
Comparing to | |
See all releases |
Code changes from version 1.2.2 to 1.2.3
app/code/community/GPMD/SEOPack/Model/Observer.php
CHANGED
@@ -34,26 +34,31 @@ class GPMD_SEOPack_Model_Observer
|
|
34 |
|
35 |
$this->_setMetaRobots($layout, $action);
|
36 |
}
|
37 |
-
|
38 |
-
$this->_setGAIgnore($layout);
|
39 |
}
|
40 |
|
41 |
-
|
42 |
{
|
43 |
if (empty($this->_gaIgnoreEnabled)) {
|
44 |
$this->_gaIgnoreEnabled = Mage::getStoreConfig(self::XML_PATH_GA_IGNORE);
|
45 |
}
|
46 |
|
47 |
if ($this->_gaIgnoreEnabled) {
|
48 |
-
$
|
49 |
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
}
|
58 |
}
|
59 |
}
|
34 |
|
35 |
$this->_setMetaRobots($layout, $action);
|
36 |
}
|
|
|
|
|
37 |
}
|
38 |
|
39 |
+
public function setGAIgnore(Varien_Event_Observer $observer)
|
40 |
{
|
41 |
if (empty($this->_gaIgnoreEnabled)) {
|
42 |
$this->_gaIgnoreEnabled = Mage::getStoreConfig(self::XML_PATH_GA_IGNORE);
|
43 |
}
|
44 |
|
45 |
if ($this->_gaIgnoreEnabled) {
|
46 |
+
$layout = $observer->getEvent()->getLayout();
|
47 |
|
48 |
+
$this->_setGAIgnore($layout);
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
+
protected function _setGAIgnore($layout)
|
53 |
+
{
|
54 |
+
$intersect = array_intersect_key(self::$_matches, $_SERVER);
|
55 |
+
|
56 |
+
if (!empty($intersect)) {
|
57 |
+
foreach ($intersect as $match => $values) {
|
58 |
+
foreach ($values as $value) {
|
59 |
+
if ($_SERVER[$match] == $value) {
|
60 |
+
$layout->getBlock('after_body_start')->unsetChild('google_analytics');
|
61 |
+
break 2;
|
62 |
}
|
63 |
}
|
64 |
}
|
app/code/community/GPMD/SEOPack/etc/config.xml
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
<config>
|
11 |
<modules>
|
12 |
<GPMD_SEOPack>
|
13 |
-
<version>1.2.
|
14 |
</GPMD_SEOPack>
|
15 |
</modules>
|
16 |
<default>
|
@@ -65,11 +65,16 @@
|
|
65 |
<events>
|
66 |
<controller_action_layout_generate_blocks_after>
|
67 |
<observers>
|
68 |
-
<
|
69 |
<type>singleton</type>
|
70 |
<class>seopack/observer</class>
|
71 |
<method>setMetaRobots</method>
|
72 |
-
</
|
|
|
|
|
|
|
|
|
|
|
73 |
</observers>
|
74 |
</controller_action_layout_generate_blocks_after>
|
75 |
<controller_action_layout_render_before_catalog_category_view>
|
10 |
<config>
|
11 |
<modules>
|
12 |
<GPMD_SEOPack>
|
13 |
+
<version>1.2.3</version>
|
14 |
</GPMD_SEOPack>
|
15 |
</modules>
|
16 |
<default>
|
65 |
<events>
|
66 |
<controller_action_layout_generate_blocks_after>
|
67 |
<observers>
|
68 |
+
<seopack_controller_layout_generate_blocks_after_robots>
|
69 |
<type>singleton</type>
|
70 |
<class>seopack/observer</class>
|
71 |
<method>setMetaRobots</method>
|
72 |
+
</seopack_controller_layout_generate_blocks_after_robots>
|
73 |
+
<seopack_controller_layout_generate_blocks_after_ga>
|
74 |
+
<type>singleton</type>
|
75 |
+
<class>seopack/observer</class>
|
76 |
+
<method>setGAIgnore</method>
|
77 |
+
</seopack_controller_layout_generate_blocks_after_ga>
|
78 |
</observers>
|
79 |
</controller_action_layout_generate_blocks_after>
|
80 |
<controller_action_layout_render_before_catalog_category_view>
|
app/etc/modules/GPMD_SEOPack.xml
CHANGED
@@ -5,9 +5,9 @@
|
|
5 |
<active>true</active>
|
6 |
<codePool>community</codePool>
|
7 |
<depends>
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
</depends>
|
12 |
</GPMD_SEOPack>
|
13 |
</modules>
|
5 |
<active>true</active>
|
6 |
<codePool>community</codePool>
|
7 |
<depends>
|
8 |
+
<Mage_GoogleAnalytics />
|
9 |
+
<Mage_Catalog />
|
10 |
+
<Mage_Core />
|
11 |
</depends>
|
12 |
</GPMD_SEOPack>
|
13 |
</modules>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>gpmd_seopack</name>
|
4 |
-
<version>1.2.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3</license>
|
7 |
<channel>community</channel>
|
@@ -9,13 +9,11 @@
|
|
9 |
<summary>Our SEOPack is designed to improve the on-page optimisation of your website. Features include: custom meta robots tags, meta robots rules for filter pages, rel meta tags for pagination, product orphaning and top sites protection.</summary>
|
10 |
<description>The SEOPack module will help to improve your search engine rankings by allowing you to assign custom meta robots tags, enable rel meta tags for paginated pages, orphaning / discontinuing products (products only available via direct URL) and assigning meta robots rules to filtered category pages / layered navigation pages. This gives you added control over the indexation of product pages, category pages and filter pages.
|
11 |
This module will eliminate several often fatal ecommerce SEO issues.</description>
|
12 |
-
<notes
|
13 |
-
|
14 |
-
-
|
15 |
-
<
|
16 |
-
<
|
17 |
-
<time>14:38:06</time>
|
18 |
-
<contents><target name="magecommunity"><dir name="GPMD"><dir name="SEOPack"><dir name="Helper"><file name="Data.php" hash="146ff6630ae9e18910701ca0daf3752e"/></dir><dir name="Model"><dir name="Attribute"><dir name="Source"><file name="Robots.php" hash="25f1ca9357c3673776b0da47f68c727b"/></dir></dir><file name="Observer.php" hash="07a50d82e173275c003bc32eb16f7ee7"/><file name="Paginator.php" hash="b4a213182e32f081ceff8f00517147d7"/><dir name="Product"><file name="Visibility.php" hash="00e6e01cb45334fe5917073fb633ed48"/></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="3e0d7b2033d5f67e49c592aa3df9cc4f"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="7ca8816f7b2e2d9a94d040edce145a3f"/><file name="system.xml" hash="e657a83c2c49c603f91f6764973377c2"/></dir><dir name="sql"><dir name="seopack_setup"><file name="mysql4-install-0.1.1.php" hash="b87ea79a6da95e8782731d4d8d8ea52b"/><file name="mysql4-uninstall.php" hash="5dee05c1406e6ff20b987bb45811a3b7"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="GPMD_SEOPack.xml" hash="531cc530057281a087027c5b5af8145f"/></dir></target></contents>
|
19 |
<compatible/>
|
20 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
21 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>gpmd_seopack</name>
|
4 |
+
<version>1.2.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3</license>
|
7 |
<channel>community</channel>
|
9 |
<summary>Our SEOPack is designed to improve the on-page optimisation of your website. Features include: custom meta robots tags, meta robots rules for filter pages, rel meta tags for pagination, product orphaning and top sites protection.</summary>
|
10 |
<description>The SEOPack module will help to improve your search engine rankings by allowing you to assign custom meta robots tags, enable rel meta tags for paginated pages, orphaning / discontinuing products (products only available via direct URL) and assigning meta robots rules to filtered category pages / layered navigation pages. This gives you added control over the indexation of product pages, category pages and filter pages.
|
11 |
This module will eliminate several often fatal ecommerce SEO issues.</description>
|
12 |
+
<notes>Bugfix: Prevent error caused when All Meta Robots disabled</notes>
|
13 |
+
<authors><author><name>Martin Dines</name><user>martindines</user><email>mdines@gpmd.co.uk</email></author><author><name>Adrian Duke</name><user>adrianduke</user><email>adrian@gpmd.co.uk</email></author><author><name>GPMD Ltd</name><user>gpmd</user><email>support@gpmd.co.uk</email></author></authors>
|
14 |
+
<date>2013-07-12</date>
|
15 |
+
<time>10:30:19</time>
|
16 |
+
<contents><target name="magecommunity"><dir name="GPMD"><dir name="SEOPack"><dir name="Helper"><file name="Data.php" hash="146ff6630ae9e18910701ca0daf3752e"/></dir><dir name="Model"><dir name="Attribute"><dir name="Source"><file name="Robots.php" hash="25f1ca9357c3673776b0da47f68c727b"/></dir></dir><file name="Observer.php" hash="1611129cc8e74013490ad6e3b5dfa83c"/><file name="Paginator.php" hash="b4a213182e32f081ceff8f00517147d7"/><dir name="Product"><file name="Visibility.php" hash="00e6e01cb45334fe5917073fb633ed48"/></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="3e0d7b2033d5f67e49c592aa3df9cc4f"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="926ea669a8eb7d05f6888ddffbb2be84"/><file name="system.xml" hash="e657a83c2c49c603f91f6764973377c2"/></dir><dir name="sql"><dir name="seopack_setup"><file name="mysql4-install-0.1.1.php" hash="b87ea79a6da95e8782731d4d8d8ea52b"/><file name="mysql4-uninstall.php" hash="5dee05c1406e6ff20b987bb45811a3b7"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="GPMD_SEOPack.xml" hash="cc7942149d25a5a05bc4835ec7afa286"/></dir></target></contents>
|
|
|
|
|
17 |
<compatible/>
|
18 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
19 |
</package>
|