gpmd_seopack - Version 1.3.0

Version Notes

- Ability to define custom robots value on sorted category pages
- Ability to define custom robots value on categories filtered by category
- Ability to define custom robots value on search pages
- Ability to define custom robots value on CMS pages
- Uninstallation script updated
- Housekeeping

Download this release

Release Info

Developer Adrian Duke
Extension gpmd_seopack
Version 1.3.0
Comparing to
See all releases


Code changes from version 1.2.3 to 1.3.0

app/code/community/GPMD/SEOPack/Helper/Data.php CHANGED
@@ -9,4 +9,6 @@
9
  *
10
  * @author Adrian Duke
11
  */
12
- class GPMD_SEOPack_Helper_Data extends Mage_Core_Helper_Abstract {}
 
 
9
  *
10
  * @author Adrian Duke
11
  */
12
+ class GPMD_SEOPack_Helper_Data extends Mage_Core_Helper_Abstract
13
+ {
14
+ }
app/code/community/GPMD/SEOPack/Model/Attribute/Source/Robots.php CHANGED
@@ -15,10 +15,10 @@ class GPMD_SEOPack_Model_Attribute_Source_Robots extends Mage_Eav_Model_Entity_A
15
  {
16
  if (!$this->_options) {
17
  $this->_options = array(
18
- array(
19
  'value' => '',
20
  'label' => Mage::helper('seopack')->__('-- Magento Default --'),
21
- ),
22
  array(
23
  'value' => 'NOINDEX,FOLLOW',
24
  'label' => Mage::helper('seopack')->__('NOINDEX, FOLLOW'),
15
  {
16
  if (!$this->_options) {
17
  $this->_options = array(
18
+ array(
19
  'value' => '',
20
  'label' => Mage::helper('seopack')->__('-- Magento Default --'),
21
+ ),
22
  array(
23
  'value' => 'NOINDEX,FOLLOW',
24
  'label' => Mage::helper('seopack')->__('NOINDEX, FOLLOW'),
app/code/community/GPMD/SEOPack/Model/Observer.php CHANGED
@@ -6,12 +6,18 @@
6
  */
7
  class GPMD_SEOPack_Model_Observer
8
  {
9
- const XML_PATH_METAROBOTS_SITEENABLED = 'seopack/activated/site_enabled';
10
- const XML_PATH_METAROBOTS_FILTERENABLED = 'seopack/activated/filter_enabled';
11
- const XML_PATH_METAROBOTS_PRODUCTENABLED = 'seopack/activated/product_enabled';
12
- const XML_PATH_METAROBOTS_CATEGORYENABLED = 'seopack/activated/category_enabled';
13
- const XML_PATH_GA_IGNORE = 'seopack/activated/ga_ignore';
14
- const XML_PATH_RELPAGINATION_ENABLED = 'seopack/activated/rel_pagination_enabled';
 
 
 
 
 
 
15
 
16
  static $_matches = array(
17
  'HTTP_X_PURPOSE' => array(
@@ -57,7 +63,10 @@ class GPMD_SEOPack_Model_Observer
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
  }
@@ -79,6 +88,22 @@ class GPMD_SEOPack_Model_Observer
79
  $this->_filterEnabled = Mage::getStoreConfig(self::XML_PATH_METAROBOTS_FILTERENABLED);
80
  }
81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  if ($head = $layout->getBlock('head')) {
83
  if ($this->_productEnabled && $action instanceof Mage_Catalog_ProductController) {
84
  $product = Mage::registry('current_product');
@@ -86,32 +111,67 @@ class GPMD_SEOPack_Model_Observer
86
  if ($robots = $product->getMetaRobots()) {
87
  $head->setData('robots', $robots);
88
  }
 
 
 
 
 
 
 
 
 
 
 
89
  } elseif ($this->_categoryEnabled && $action instanceof Mage_Catalog_CategoryController) {
90
  $category = Mage::registry('current_category');
91
-
92
  // Set meta robots if set in category
93
  if ($robots = $category->getMetaRobots()) {
94
  $head->setData('robots', $robots);
95
  }
96
-
97
- if ($this->_filterEnabled) {
98
  $layer = Mage::getModel('catalog/layer')->setCurrentCategory($category);
99
  $attributes = $layer->getFilterableAttributes();
100
 
101
- // Iterate over filterable attributes. Check if attribute is present in parametres
102
  foreach ($attributes as $attribute) {
103
  $attributeCode = $attribute->getAttributeCode();
104
  if (array_key_exists($attributeCode, $action->getRequest()->getParams())) {
105
- // Set NOINDEX,FOLLOW when a filter is applied
106
- $head->setData('robots', 'NOINDEX,FOLLOW');
107
  break;
108
  }
109
  }
110
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  }
112
  }
113
  }
114
-
115
  /**
116
  * doPagination() - kick off the process of adding the next and prev rel links to category pages where necessary
117
  *
@@ -123,11 +183,10 @@ class GPMD_SEOPack_Model_Observer
123
  if (empty($this->_relPaginationEnabled)) {
124
  $this->_relPaginationEnabled = Mage::getStoreConfig(self::XML_PATH_RELPAGINATION_ENABLED);
125
  }
126
-
127
  try {
128
  if ($this->_relPaginationEnabled) {
129
- $paginator = Mage::getModel('seopack/paginator');
130
- $paginator->createLinks();
131
  }
132
  } catch (Exception $e) {
133
  Mage::logException($e);
@@ -135,4 +194,22 @@ class GPMD_SEOPack_Model_Observer
135
 
136
  return $this;
137
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  }
6
  */
7
  class GPMD_SEOPack_Model_Observer
8
  {
9
+ const XML_PATH_METAROBOTS_SITEENABLED = 'seopack/metarobots/site_enabled';
10
+ const XML_PATH_METAROBOTS_PRODUCTENABLED = 'seopack/metarobots/product_enabled';
11
+ const XML_PATH_METAROBOTS_CATEGORYENABLED = 'seopack/metarobots/category_enabled';
12
+ const XML_PATH_METAROBOTS_FILTERENABLED = 'seopack/metarobots/filter_enabled';
13
+ const XML_PATH_METAROBOTS_TREATCATEGORYASFILTER = 'seopack/metarobots/treat_category_as_filter';
14
+ const XML_PATH_METAROBOTS_TREATSORTASFILTER = 'seopack/metarobots/treat_sort_as_filter';
15
+ const XML_PATH_METAROBOTS_SEARCHENABLED = 'seopack/metarobots/search_enabled';
16
+ const XML_PATH_METAROBOTS_CMSPAGEENABLED = 'seopack/metarobots/cms_page_enabled';
17
+ const XML_PATH_RELPAGINATION_ENABLED = 'seopack/misc/rel_pagination_enabled';
18
+ const XML_PATH_GA_IGNORE = 'seopack/misc/ga_ignore';
19
+
20
+ const ADMIN_CMS_PAGE_ROBOTS_FIELD_NAME = 'meta_robots';
21
 
22
  static $_matches = array(
23
  'HTTP_X_PURPOSE' => array(
63
  foreach ($intersect as $match => $values) {
64
  foreach ($values as $value) {
65
  if ($_SERVER[$match] == $value) {
66
+ $block = $layout->getBlock('after_body_start');
67
+ if ($block){
68
+ $block->unsetChild('google_analytics');
69
+ }
70
  break 2;
71
  }
72
  }
88
  $this->_filterEnabled = Mage::getStoreConfig(self::XML_PATH_METAROBOTS_FILTERENABLED);
89
  }
90
 
91
+ if (empty($this->_treatCategoryAsFilter)) {
92
+ $this->_treatCategoryAsFilter = Mage::getStoreConfig(self::XML_PATH_METAROBOTS_TREATCATEGORYASFILTER);
93
+ }
94
+
95
+ if (empty($this->treatSortAsFilter)) {
96
+ $this->_treatSortAsFilter = Mage::getStoreConfig(self::XML_PATH_METAROBOTS_TREATSORTASFILTER);
97
+ }
98
+
99
+ if (empty($this->_searchEnabled)) {
100
+ $this->_searchEnabled = Mage::getStoreConfig(self::XML_PATH_METAROBOTS_SEARCHENABLED);
101
+ }
102
+
103
+ if (empty($this->_cmsPageEnabled)) {
104
+ $this->_cmsPageEnabled = Mage::getStoreConfig(self::XML_PATH_METAROBOTS_CMSPAGEENABLED);
105
+ }
106
+
107
  if ($head = $layout->getBlock('head')) {
108
  if ($this->_productEnabled && $action instanceof Mage_Catalog_ProductController) {
109
  $product = Mage::registry('current_product');
111
  if ($robots = $product->getMetaRobots()) {
112
  $head->setData('robots', $robots);
113
  }
114
+
115
+ if ($action->getRequest()->getParam('options') && $action->getRequest()->getParam('options') === 'cart') {
116
+ $head->setData('robots', 'NOINDEX, FOLLOW');
117
+ }
118
+ } elseif ($this->_searchEnabled
119
+ && ($action instanceof Mage_CatalogSearch_ResultController
120
+ || ($action instanceof Mage_CatalogSearch_AdvancedController
121
+ && $action->getRequest()->getActionName() === 'result'))
122
+ ) {
123
+ // Set custom meta robots if viewing a search page displaying results
124
+ $head->setData('robots', 'NOINDEX, FOLLOW');
125
  } elseif ($this->_categoryEnabled && $action instanceof Mage_Catalog_CategoryController) {
126
  $category = Mage::registry('current_category');
127
+
128
  // Set meta robots if set in category
129
  if ($robots = $category->getMetaRobots()) {
130
  $head->setData('robots', $robots);
131
  }
132
+
133
+ if ($this->_filterEnabled) {
134
  $layer = Mage::getModel('catalog/layer')->setCurrentCategory($category);
135
  $attributes = $layer->getFilterableAttributes();
136
 
137
+ // Iterate over filterable attributes. Check if attribute is present in parameters
138
  foreach ($attributes as $attribute) {
139
  $attributeCode = $attribute->getAttributeCode();
140
  if (array_key_exists($attributeCode, $action->getRequest()->getParams())) {
141
+ // Set NOINDEX, FOLLOW when a filter is applied
142
+ $head->setData('robots', 'NOINDEX, FOLLOW');
143
  break;
144
  }
145
  }
146
+
147
+ // Treat category sort as a filters
148
+ if ($this->_treatSortAsFilter) {
149
+ $sortParams = array('dir', 'mode', 'limit', 'order');
150
+ if (count(array_intersect($sortParams, array_keys($action->getRequest()->getParams()))) > 0) {
151
+ $head->setData('robots', 'NOINDEX, FOLLOW');
152
+ }
153
+ }
154
+
155
+ // Treat category as a filterable attribute
156
+ if ($this->_treatCategoryAsFilter) {
157
+ if (array_key_exists('cat', $action->getRequest()->getParams())) {
158
+ $head->setData('robots', 'NOINDEX, FOLLOW');
159
+ }
160
+ }
161
+ }
162
+ } elseif ($this->_cmsPageEnabled && $action instanceof Mage_Cms_PageController) {
163
+ $pageId = $action->getRequest()->getParam('page_id');
164
+ $page = Mage::getModel('cms/page')->load($pageId);
165
+
166
+ if ($page->getId()) {
167
+ if ($robots = $page->getMetaRobots()) {
168
+ $head->setData('robots', $robots);
169
+ }
170
+ }
171
  }
172
  }
173
  }
174
+
175
  /**
176
  * doPagination() - kick off the process of adding the next and prev rel links to category pages where necessary
177
  *
183
  if (empty($this->_relPaginationEnabled)) {
184
  $this->_relPaginationEnabled = Mage::getStoreConfig(self::XML_PATH_RELPAGINATION_ENABLED);
185
  }
186
+
187
  try {
188
  if ($this->_relPaginationEnabled) {
189
+ Mage::getModel('seopack/paginator')->createLinks();
 
190
  }
191
  } catch (Exception $e) {
192
  Mage::logException($e);
194
 
195
  return $this;
196
  }
197
+
198
+ public function addRobotsToCmsPages(Varien_Event_Observer $observer)
199
+ {
200
+ $model = Mage::registry('cms_page');
201
+ $form = $observer->getForm();
202
+
203
+ $form->getElement('meta_fieldset')->addField(self::ADMIN_CMS_PAGE_ROBOTS_FIELD_NAME, 'select', array(
204
+ 'name' => self::ADMIN_CMS_PAGE_ROBOTS_FIELD_NAME,
205
+ 'label' => Mage::helper('cms')->__('Meta Robots'),
206
+ 'title' => Mage::helper('cms')->__('Meta Robots'),
207
+ 'values' => Mage::getModel('seopack/attribute_source_robots')->getAllOptions(),
208
+ 'value' => $model->getMetaRobots()
209
+ ));
210
+ }
211
+
212
+ public function saveRobotsToCmsPages(Varien_Event_Observer $observer)
213
+ {
214
+ }
215
  }
app/code/community/GPMD/SEOPack/Model/Product/Visibility.php CHANGED
@@ -11,8 +11,8 @@
11
  */
12
  class GPMD_SEOPack_Model_Product_Visibility extends Mage_Catalog_Model_Product_Visibility
13
  {
14
- const VISIBILITY_ORPHANED = 5;
15
-
16
  /**
17
  * Retrieve visible in site ids array
18
  *
@@ -22,7 +22,7 @@ class GPMD_SEOPack_Model_Product_Visibility extends Mage_Catalog_Model_Product_V
22
  {
23
  return array(self::VISIBILITY_IN_SEARCH, self::VISIBILITY_IN_CATALOG, self::VISIBILITY_BOTH, self::VISIBILITY_ORPHANED);
24
  }
25
-
26
  /**
27
  * Retrieve option array
28
  *
@@ -38,7 +38,7 @@ class GPMD_SEOPack_Model_Product_Visibility extends Mage_Catalog_Model_Product_V
38
  self::VISIBILITY_BOTH => Mage::helper('catalog')->__('Catalog, Search')
39
  );
40
  }
41
-
42
  /**
43
  * Retrieve all options
44
  *
@@ -47,7 +47,7 @@ class GPMD_SEOPack_Model_Product_Visibility extends Mage_Catalog_Model_Product_V
47
  static public function getAllOption()
48
  {
49
  $options = self::getOptionArray();
50
- array_unshift($options, array('value'=>'', 'label'=>''));
51
  return $options;
52
  }
53
 
@@ -59,11 +59,11 @@ class GPMD_SEOPack_Model_Product_Visibility extends Mage_Catalog_Model_Product_V
59
  static public function getAllOptions()
60
  {
61
  $res = array();
62
- $res[] = array('value'=>'', 'label'=> Mage::helper('catalog')->__('-- Please Select --'));
63
  foreach (self::getOptionArray() as $index => $value) {
64
  $res[] = array(
65
- 'value' => $index,
66
- 'label' => $value
67
  );
68
  }
69
  return $res;
11
  */
12
  class GPMD_SEOPack_Model_Product_Visibility extends Mage_Catalog_Model_Product_Visibility
13
  {
14
+ const VISIBILITY_ORPHANED = 5;
15
+
16
  /**
17
  * Retrieve visible in site ids array
18
  *
22
  {
23
  return array(self::VISIBILITY_IN_SEARCH, self::VISIBILITY_IN_CATALOG, self::VISIBILITY_BOTH, self::VISIBILITY_ORPHANED);
24
  }
25
+
26
  /**
27
  * Retrieve option array
28
  *
38
  self::VISIBILITY_BOTH => Mage::helper('catalog')->__('Catalog, Search')
39
  );
40
  }
41
+
42
  /**
43
  * Retrieve all options
44
  *
47
  static public function getAllOption()
48
  {
49
  $options = self::getOptionArray();
50
+ array_unshift($options, array('value' => '', 'label' => ''));
51
  return $options;
52
  }
53
 
59
  static public function getAllOptions()
60
  {
61
  $res = array();
62
+ $res[] = array('value' => '', 'label' => Mage::helper('catalog')->__('-- Please Select --'));
63
  foreach (self::getOptionArray() as $index => $value) {
64
  $res[] = array(
65
+ 'value' => $index,
66
+ 'label' => $value
67
  );
68
  }
69
  return $res;
app/code/community/GPMD/SEOPack/etc/config.xml CHANGED
@@ -10,19 +10,25 @@
10
  <config>
11
  <modules>
12
  <GPMD_SEOPack>
13
- <version>1.2.3</version>
14
  </GPMD_SEOPack>
15
  </modules>
16
  <default>
17
  <seopack>
18
- <activated>
19
  <site_enabled>1</site_enabled>
20
- <filter_enabled>1</filter_enabled>
21
  <category_enabled>1</category_enabled>
22
  <product_enabled>1</product_enabled>
23
- <ga_ignore>1</ga_ignore>
 
 
 
 
 
 
24
  <rel_pagination_enabled>1</rel_pagination_enabled>
25
- </activated>
 
26
  </seopack>
27
  </default>
28
  <global>
@@ -62,6 +68,8 @@
62
  </connection>
63
  </seopack_read>
64
  </resources>
 
 
65
  <events>
66
  <controller_action_layout_generate_blocks_after>
67
  <observers>
@@ -87,8 +95,28 @@
87
  </observers>
88
  </controller_action_layout_render_before_catalog_category_view>
89
  </events>
90
- </global>
91
  <adminhtml>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  <acl>
93
  <resources>
94
  <admin>
10
  <config>
11
  <modules>
12
  <GPMD_SEOPack>
13
+ <version>1.3.0</version>
14
  </GPMD_SEOPack>
15
  </modules>
16
  <default>
17
  <seopack>
18
+ <metarobots>
19
  <site_enabled>1</site_enabled>
 
20
  <category_enabled>1</category_enabled>
21
  <product_enabled>1</product_enabled>
22
+ <filter_enabled>1</filter_enabled>
23
+ <treat_category_as_filter>1</treat_category_as_filter>
24
+ <treat_sort_as_filter>1</treat_sort_as_filter>
25
+ <search_enabled>1</search_enabled>
26
+ <cms_page_enabled>1</cms_page_enabled>
27
+ </metarobots>
28
+ <misc>
29
  <rel_pagination_enabled>1</rel_pagination_enabled>
30
+ <ga_ignore>1</ga_ignore>
31
+ </misc>
32
  </seopack>
33
  </default>
34
  <global>
68
  </connection>
69
  </seopack_read>
70
  </resources>
71
+ </global>
72
+ <frontend>
73
  <events>
74
  <controller_action_layout_generate_blocks_after>
75
  <observers>
95
  </observers>
96
  </controller_action_layout_render_before_catalog_category_view>
97
  </events>
98
+ </frontend>
99
  <adminhtml>
100
+ <events>
101
+ <adminhtml_cms_page_edit_tab_meta_prepare_form>
102
+ <observers>
103
+ <gpmd_seopack_cms_page_edit_tab_meta>
104
+ <type>singleton</type>
105
+ <class>seopack/observer</class>
106
+ <method>addRobotsToCmsPages</method>
107
+ </gpmd_seopack_cms_page_edit_tab_meta>
108
+ </observers>
109
+ </adminhtml_cms_page_edit_tab_meta_prepare_form>
110
+ <cms_page_prepare_save>
111
+ <observers>
112
+ <gpmd_seopack_cms_page_form_save>
113
+ <type>singleton</type>
114
+ <class>seopack/observer</class>
115
+ <method>saveRobotsToCmsPages</method>
116
+ </gpmd_seopack_cms_page_form_save>
117
+ </observers>
118
+ </cms_page_prepare_save>
119
+ </events>
120
  <acl>
121
  <resources>
122
  <admin>
app/code/community/GPMD/SEOPack/etc/system.xml CHANGED
@@ -24,8 +24,8 @@
24
  <show_in_website>1</show_in_website>
25
  <show_in_store>1</show_in_store>
26
  <groups>
27
- <activated translate="label">
28
- <label>Enable / Disable</label>
29
  <frontend_type>text</frontend_type>
30
  <sort_order>100</sort_order>
31
  <show_in_default>1</show_in_default>
@@ -35,86 +35,156 @@
35
  <site_enabled translate="label">
36
  <label>All Meta Robots</label>
37
  <comment>
38
- <![CDATA[<span class="notice">Enable / Disable custom meta robots across whole site</span>]]>
39
  </comment>
40
  <frontend_type>select</frontend_type>
41
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
42
- <sort_order>1</sort_order>
43
  <show_in_default>1</show_in_default>
44
  <show_in_website>0</show_in_website>
45
  <show_in_store>0</show_in_store>
46
  </site_enabled>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  <filter_enabled translate="label">
48
  <depends>
49
  <site_enabled>1</site_enabled>
50
  </depends>
51
  <label>Filter Page Meta Robots</label>
52
  <comment>
53
- <![CDATA[Enable / Disable filtered category pages custom meta robots across site]]>
54
  </comment>
55
  <frontend_type>select</frontend_type>
56
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
57
- <sort_order>10</sort_order>
58
  <show_in_default>1</show_in_default>
59
  <show_in_website>0</show_in_website>
60
  <show_in_store>0</show_in_store>
61
  </filter_enabled>
62
- <product_enabled translate="label">
63
  <depends>
64
- <site_enabled>1</site_enabled>
65
  </depends>
66
- <label>Product Meta Robots</label>
67
  <comment>
68
- <![CDATA[Enable / Disable product custom meta robots across site]]>
69
  </comment>
70
  <frontend_type>select</frontend_type>
71
- <source_model>adminhtml/system_config_source_enabledisable</source_model>
72
- <sort_order>20</sort_order>
73
  <show_in_default>1</show_in_default>
74
  <show_in_website>0</show_in_website>
75
  <show_in_store>0</show_in_store>
76
- </product_enabled>
77
- <category_enabled translate="label">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  <depends>
79
  <site_enabled>1</site_enabled>
80
  </depends>
81
- <label>Category Meta Robots</label>
82
  <comment>
83
- <![CDATA[Enable / Disable custom category meta robots across site]]>
84
  </comment>
85
  <frontend_type>select</frontend_type>
86
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
87
- <sort_order>30</sort_order>
88
  <show_in_default>1</show_in_default>
89
  <show_in_website>0</show_in_website>
90
  <show_in_store>0</show_in_store>
91
- </category_enabled>
92
- <ga_ignore translate="label">
93
- <label>GA Ignore 'Top Sites'</label>
 
 
 
94
  <comment>
95
- <![CDATA[Remove 'Top Site' requests from google analytics (Safari, Opera &amp; Firefox)]]>
96
  </comment>
97
  <frontend_type>select</frontend_type>
98
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
99
- <sort_order>40</sort_order>
100
  <show_in_default>1</show_in_default>
101
  <show_in_website>0</show_in_website>
102
  <show_in_store>0</show_in_store>
103
- </ga_ignore>
 
 
 
 
 
 
 
 
 
 
104
  <rel_pagination_enabled translate="label">
105
  <label>Rel Meta Pagination</label>
106
  <comment>
107
- <![CDATA[Enable / Disable rel="next" and rel="prev" meta tags in paginated pages]]>
108
  </comment>
109
  <frontend_type>select</frontend_type>
110
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
111
- <sort_order>50</sort_order>
112
  <show_in_default>1</show_in_default>
113
  <show_in_website>0</show_in_website>
114
  <show_in_store>0</show_in_store>
115
  </rel_pagination_enabled>
 
 
 
 
 
 
 
 
 
 
 
 
116
  </fields>
117
- </activated>
118
  </groups>
119
  </seopack>
120
  </sections>
24
  <show_in_website>1</show_in_website>
25
  <show_in_store>1</show_in_store>
26
  <groups>
27
+ <metarobots translate="label">
28
+ <label>Meta Robots</label>
29
  <frontend_type>text</frontend_type>
30
  <sort_order>100</sort_order>
31
  <show_in_default>1</show_in_default>
35
  <site_enabled translate="label">
36
  <label>All Meta Robots</label>
37
  <comment>
38
+ <![CDATA[<span class="notice">Enable / Disable custom meta robots across whole site</span>]]>
39
  </comment>
40
  <frontend_type>select</frontend_type>
41
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
42
+ <sort_order>1000</sort_order>
43
  <show_in_default>1</show_in_default>
44
  <show_in_website>0</show_in_website>
45
  <show_in_store>0</show_in_store>
46
  </site_enabled>
47
+ <product_enabled translate="label">
48
+ <depends>
49
+ <site_enabled>1</site_enabled>
50
+ </depends>
51
+ <label>Product Meta Robots</label>
52
+ <comment>
53
+ <![CDATA[Enable / Disable product custom meta robots across site]]>
54
+ </comment>
55
+ <frontend_type>select</frontend_type>
56
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
57
+ <sort_order>1100</sort_order>
58
+ <show_in_default>1</show_in_default>
59
+ <show_in_website>0</show_in_website>
60
+ <show_in_store>0</show_in_store>
61
+ </product_enabled>
62
+ <category_enabled translate="label">
63
+ <depends>
64
+ <site_enabled>1</site_enabled>
65
+ </depends>
66
+ <label>Category Meta Robots</label>
67
+ <comment>
68
+ <![CDATA[Enable / Disable custom category meta robots across site]]>
69
+ </comment>
70
+ <frontend_type>select</frontend_type>
71
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
72
+ <sort_order>1300</sort_order>
73
+ <show_in_default>1</show_in_default>
74
+ <show_in_website>0</show_in_website>
75
+ <show_in_store>0</show_in_store>
76
+ </category_enabled>
77
  <filter_enabled translate="label">
78
  <depends>
79
  <site_enabled>1</site_enabled>
80
  </depends>
81
  <label>Filter Page Meta Robots</label>
82
  <comment>
83
+ <![CDATA[Once enabled filtered category pages robots will be NOINDEX, FOLLOW]]>
84
  </comment>
85
  <frontend_type>select</frontend_type>
86
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
87
+ <sort_order>1400</sort_order>
88
  <show_in_default>1</show_in_default>
89
  <show_in_website>0</show_in_website>
90
  <show_in_store>0</show_in_store>
91
  </filter_enabled>
92
+ <treat_category_as_filter translate="label">
93
  <depends>
94
+ <filter_enabled>1</filter_enabled>
95
  </depends>
96
+ <label>Treat Category As Filter</label>
97
  <comment>
98
+ <![CDATA[Apply custom meta robots when filtering a category page by a child category]]>
99
  </comment>
100
  <frontend_type>select</frontend_type>
101
+ <source_model>adminhtml/system_config_source_yesno</source_model>
102
+ <sort_order>1410</sort_order>
103
  <show_in_default>1</show_in_default>
104
  <show_in_website>0</show_in_website>
105
  <show_in_store>0</show_in_store>
106
+ </treat_category_as_filter>
107
+ <treat_sort_as_filter translate="label">
108
+ <depends>
109
+ <filter_enabled>1</filter_enabled>
110
+ </depends>
111
+ <label>Treat Sort As Filter</label>
112
+ <comment>
113
+ <![CDATA[Apply custom meta robots when sorting a category page]]>
114
+ </comment>
115
+ <frontend_type>select</frontend_type>
116
+ <source_model>adminhtml/system_config_source_yesno</source_model>
117
+ <sort_order>1420</sort_order>
118
+ <show_in_default>1</show_in_default>
119
+ <show_in_website>0</show_in_website>
120
+ <show_in_store>0</show_in_store>
121
+ </treat_sort_as_filter>
122
+ <search_enabled translate="label">
123
  <depends>
124
  <site_enabled>1</site_enabled>
125
  </depends>
126
+ <label>Search Meta Robots</label>
127
  <comment>
128
+ <![CDATA[Once enabled search result pages robots will be NOINDEX, FOLLOW]]>
129
  </comment>
130
  <frontend_type>select</frontend_type>
131
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
132
+ <sort_order>1500</sort_order>
133
  <show_in_default>1</show_in_default>
134
  <show_in_website>0</show_in_website>
135
  <show_in_store>0</show_in_store>
136
+ </search_enabled>
137
+ <cms_page_enabled translate="label">
138
+ <depends>
139
+ <site_enabled>1</site_enabled>
140
+ </depends>
141
+ <label>CMS Page Meta Robots</label>
142
  <comment>
143
+ <![CDATA[Enable / Disable custom cms page meta robots across site]]>
144
  </comment>
145
  <frontend_type>select</frontend_type>
146
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
147
+ <sort_order>1600</sort_order>
148
  <show_in_default>1</show_in_default>
149
  <show_in_website>0</show_in_website>
150
  <show_in_store>0</show_in_store>
151
+ </cms_page_enabled>
152
+ </fields>
153
+ </metarobots>
154
+ <misc translate="label">
155
+ <label>Miscellaneous</label>
156
+ <frontend_type>text</frontend_type>
157
+ <sort_order>200</sort_order>
158
+ <show_in_default>1</show_in_default>
159
+ <show_in_website>1</show_in_website>
160
+ <show_in_store>1</show_in_store>
161
+ <fields>
162
  <rel_pagination_enabled translate="label">
163
  <label>Rel Meta Pagination</label>
164
  <comment>
165
+ <![CDATA[Enable / Disable rel="next" and rel="prev" meta tags in paginated pages]]>
166
  </comment>
167
  <frontend_type>select</frontend_type>
168
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
169
+ <sort_order>1000</sort_order>
170
  <show_in_default>1</show_in_default>
171
  <show_in_website>0</show_in_website>
172
  <show_in_store>0</show_in_store>
173
  </rel_pagination_enabled>
174
+ <ga_ignore translate="label">
175
+ <label>GA Ignore 'Top Sites'</label>
176
+ <comment>
177
+ <![CDATA[Remove 'Top Site' requests from google analytics (Safari, Opera &amp; Firefox)]]>
178
+ </comment>
179
+ <frontend_type>select</frontend_type>
180
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
181
+ <sort_order>2000</sort_order>
182
+ <show_in_default>1</show_in_default>
183
+ <show_in_website>0</show_in_website>
184
+ <show_in_store>0</show_in_store>
185
+ </ga_ignore>
186
  </fields>
187
+ </misc>
188
  </groups>
189
  </seopack>
190
  </sections>
app/code/community/GPMD/SEOPack/sql/seopack_setup/mysql4-uninstall.php CHANGED
@@ -1,10 +1,11 @@
1
  <?php
2
  /**
3
- * GPMD SEOPack V1.2.2
4
  * @copyright Copyright (c) 2013 GPMD Ltd (http://www.gpmd.co.uk)
5
  */
6
 
7
  $installer = $this;
8
  $installer->startSetup();
9
  $installer->run("DELETE FROM `{$installer->getTable('eav_attribute')}` WHERE `source_model` = 'seopack/attribute_source_robots'");
 
10
  $installer->endSetup();
1
  <?php
2
  /**
3
+ * GPMD SEOPack V1.3.0
4
  * @copyright Copyright (c) 2013 GPMD Ltd (http://www.gpmd.co.uk)
5
  */
6
 
7
  $installer = $this;
8
  $installer->startSetup();
9
  $installer->run("DELETE FROM `{$installer->getTable('eav_attribute')}` WHERE `source_model` = 'seopack/attribute_source_robots'");
10
+ $installer->run("ALTER TABLE `{$installer->getTable('cms_page')}` DROP 'meta_robots'");
11
  $installer->endSetup();
app/code/community/GPMD/SEOPack/sql/seopack_setup/mysql4-upgrade-1.2.3-1.3.0.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+ $installer->getConnection()->addColumn($this->getTable('cms_page'), 'meta_robots', 'VARCHAR(40) CHARACTER SET utf8 DEFAULT NULL');
7
+ $installer->endSetup();
package.xml CHANGED
@@ -1,19 +1,24 @@
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>
8
  <extends/>
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.&#xD;
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>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>gpmd_seopack</name>
4
+ <version>1.3.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3</license>
7
  <channel>community</channel>
8
  <extends/>
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.&#xD;
11
+ This module will eliminate several often fatal ecommerce SEO issues."</description>
12
+ <notes>- Ability to define custom robots value on sorted category pages&#xD;
13
+ - Ability to define custom robots value on categories filtered by category&#xD;
14
+ - Ability to define custom robots value on search pages&#xD;
15
+ - Ability to define custom robots value on CMS pages&#xD;
16
+ - Uninstallation script updated&#xD;
17
+ - Housekeeping</notes>
18
+ <authors><author><name>Adrian Duke</name><user>adrianduke</user><email>adrian@gpmd.co.uk</email></author><author><name>Martin Dines</name><user>martindines</user><email>martin.dines@live.co.uk</email></author></authors>
19
+ <date>2014-03-14</date>
20
+ <time>10:40:12</time>
21
+ <contents><target name="magecommunity"><dir name="GPMD"><dir name="SEOPack"><dir name="Helper"><file name="Data.php" hash="82abca549cd3b0b2a6798edea5116619"/></dir><dir name="Model"><dir name="Attribute"><dir name="Source"><file name="Robots.php" hash="50d8e9f2f3e85884b5ec2cebb3222e3d"/></dir></dir><file name="Observer.php" hash="ab93adde5b1c4b9f660fb69a4ca4a970"/><file name="Paginator.php" hash="b4a213182e32f081ceff8f00517147d7"/><dir name="Product"><file name="Visibility.php" hash="c454a5115d5a63245bafbefdf8a50493"/></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="8661862f9d14f90c8b784ca96bdea2f1"/><file name="system.xml" hash="6b354686d0cbbe13bd810a49b4737206"/></dir><dir name="sql"><dir name="seopack_setup"><file name="mysql4-install-0.1.1.php" hash="b87ea79a6da95e8782731d4d8d8ea52b"/><file name="mysql4-uninstall.php" hash="4e1f4a77fda832bc95f06eff2e0b0e63"/><file name="mysql4-upgrade-1.2.3-1.3.0.php" hash="1f1b90376bced8b694013784f9510a5f"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="GPMD_SEOPack.xml" hash="cc7942149d25a5a05bc4835ec7afa286"/></dir></target></contents>
22
  <compatible/>
23
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
24
  </package>