Version Notes
Added the following features:
- Custom meta robots at a category and product level
- Filter page meta robots
- Product orphaning
- Top sites analytics protection
Download this release
Release Info
Developer | Adrian Duke |
Extension | gpmd_seopack |
Version | 1.1.2 |
Comparing to | |
See all releases |
Version 1.1.2
- ._package.xml +0 -0
- app/code/community/GPMD/SEOPack/Helper/Data.php +15 -0
- app/code/community/GPMD/SEOPack/Model/Attribute/Source/Robots.php +39 -0
- app/code/community/GPMD/SEOPack/Model/Observer.php +106 -0
- app/code/community/GPMD/SEOPack/Model/Product/Visibility.php +79 -0
- app/code/community/GPMD/SEOPack/Model/Resource/Eav/Mysql4/Setup.php +75 -0
- app/code/community/GPMD/SEOPack/etc/._config.xml +0 -0
- app/code/community/GPMD/SEOPack/etc/config.xml +97 -0
- app/code/community/GPMD/SEOPack/etc/system.xml +102 -0
- app/code/community/GPMD/SEOPack/sql/seopack_setup/mysql4-install-0.1.1.php +9 -0
- app/etc/modules/GPMD_SEOPack.xml +14 -0
- package.xml +24 -0
._package.xml
ADDED
Binary file
|
app/code/community/GPMD/SEOPack/Helper/Data.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* GPMD SEOPack V0.1.1
|
5 |
+
* @copyright Copyright (c) 2012 GPMD Ltd (http://www.gpmd.co.uk)
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Place holder
|
10 |
+
*
|
11 |
+
* @author Adrian Duke
|
12 |
+
*/
|
13 |
+
class GPMD_SEOPack_Helper_Data extends Mage_Core_Helper_Abstract {
|
14 |
+
|
15 |
+
}
|
app/code/community/GPMD/SEOPack/Model/Attribute/Source/Robots.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* GPMD SEOPack V0.1.1
|
4 |
+
* @copyright Copyright (c) 2012 GPMD Ltd (http://www.gpmd.co.uk)
|
5 |
+
*/
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Source class for robots select
|
9 |
+
*
|
10 |
+
* @author Adrian Duke
|
11 |
+
*/
|
12 |
+
class GPMD_SEOPack_Model_Attribute_Source_Robots extends Mage_Eav_Model_Entity_Attribute_Source_Abstract{
|
13 |
+
|
14 |
+
public function getAllOptions(){
|
15 |
+
if (!$this->_options) {
|
16 |
+
$this->_options = array(
|
17 |
+
array(
|
18 |
+
'value' => '',
|
19 |
+
'label' => Mage::helper('seopack')->__('-- Magento Default --'),
|
20 |
+
),
|
21 |
+
array(
|
22 |
+
'value' => 'NOINDEX,FOLLOW',
|
23 |
+
'label' => Mage::helper('seopack')->__('NOINDEX, FOLLOW'),
|
24 |
+
),
|
25 |
+
array(
|
26 |
+
'value' => 'INDEX,NOFOLLOW',
|
27 |
+
'label' => Mage::helper('seopack')->__('INDEX, NOFOLLOW'),
|
28 |
+
),
|
29 |
+
array(
|
30 |
+
'value' => 'NOINDEX,NOFOLLOW',
|
31 |
+
'label' => Mage::helper('seopack')->__('NOINDEX, NOFOLLOW'),
|
32 |
+
)
|
33 |
+
);
|
34 |
+
}
|
35 |
+
return $this->_options;
|
36 |
+
}
|
37 |
+
|
38 |
+
}
|
39 |
+
|
app/code/community/GPMD/SEOPack/Model/Observer.php
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* To change this template, choose Tools | Templates
|
5 |
+
* and open the template in the editor.
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Observer for custom meta robots. Better than rewriting.
|
10 |
+
*
|
11 |
+
* @author adrian
|
12 |
+
*/
|
13 |
+
class GPMD_SEOPack_Model_Observer {
|
14 |
+
|
15 |
+
const XML_PATH_METAROBOTS_SITEENABLED = 'seopack/activated/site_enabled';
|
16 |
+
const XML_PATH_METAROBOTS_FILTERENABLED = 'seopack/activated/filter_enabled';
|
17 |
+
const XML_PATH_METAROBOTS_PRODUCTENABLED = 'seopack/activated/product_enabled';
|
18 |
+
const XML_PATH_METAROBOTS_CATEGORYENABLED = 'seopack/activated/category_enabled';
|
19 |
+
const XML_PATH_GA_IGNORE = 'seopack/activated/ga_ignore';
|
20 |
+
|
21 |
+
static $_matches = array(
|
22 |
+
'HTTP_X_PURPOSE' => array(
|
23 |
+
'preview',
|
24 |
+
),
|
25 |
+
'HTTP_X_MOZ' => array(
|
26 |
+
'prefetch',
|
27 |
+
),
|
28 |
+
);
|
29 |
+
|
30 |
+
public function setMetaRobots(Varien_Event_Observer $observer){
|
31 |
+
|
32 |
+
if(empty($this->_siteEnabled)){
|
33 |
+
$this->_siteEnabled = Mage::getStoreConfig(self::XML_PATH_METAROBOTS_SITEENABLED);
|
34 |
+
}
|
35 |
+
|
36 |
+
if($this->_siteEnabled){
|
37 |
+
$layout = $observer->getEvent()->getLayout();
|
38 |
+
$action = $observer->getEvent()->getAction();
|
39 |
+
|
40 |
+
$this->_setMetaRobots($layout, $action);
|
41 |
+
}
|
42 |
+
|
43 |
+
$this->_setGAIgnore($layout);
|
44 |
+
}
|
45 |
+
|
46 |
+
protected function _setGAIgnore($layout){
|
47 |
+
|
48 |
+
if(empty($this->_gaIgnoreEnabled)){
|
49 |
+
$this->_gaIgnoreEnabled = Mage::getStoreConfig(self::XML_PATH_GA_IGNORE);
|
50 |
+
}
|
51 |
+
|
52 |
+
if($this->_gaIgnoreEnabled){
|
53 |
+
$intersect = array_intersect_key(self::$_matches, $_SERVER);
|
54 |
+
|
55 |
+
if(!empty($intersect)){
|
56 |
+
foreach($intersect as $match => $values){
|
57 |
+
foreach($values as $value){
|
58 |
+
if($_SERVER[$match] == $value){
|
59 |
+
$layout->getBlock('after_body_start')->unsetChild('google_analytics');
|
60 |
+
break 2;
|
61 |
+
}
|
62 |
+
}
|
63 |
+
}
|
64 |
+
}
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
protected function _setMetaRobots($layout, $action){
|
69 |
+
|
70 |
+
if(empty($this->_filterEnabled)){
|
71 |
+
$this->_filterEnabled = Mage::getStoreConfig(self::XML_PATH_METAROBOTS_FILTERENABLED);
|
72 |
+
}
|
73 |
+
|
74 |
+
if(empty($this->_productEnabled)){
|
75 |
+
$this->_productEnabled = Mage::getStoreConfig(self::XML_PATH_METAROBOTS_PRODUCTENABLED);
|
76 |
+
}
|
77 |
+
|
78 |
+
if(empty($this->_categoryEnabled)){
|
79 |
+
$this->_categoryEnabled = Mage::getStoreConfig(self::XML_PATH_METAROBOTS_CATEGORYENABLED);
|
80 |
+
}
|
81 |
+
|
82 |
+
if($head = $layout->getBlock('head')){
|
83 |
+
if($this->_productEnabled && $action instanceof Mage_Catalog_ProductController){
|
84 |
+
$product = Mage::registry('current_product');
|
85 |
+
// Set meta robots if set in product
|
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 |
+
// Set meta robots if set in category
|
92 |
+
if($robots = $category->getMetaRobots()){
|
93 |
+
$head->setData('robots',$robots);
|
94 |
+
}
|
95 |
+
}
|
96 |
+
if($this->_filterEnabled){
|
97 |
+
if($block = $layout->getBlockSingleton('catalog/layer_state')){
|
98 |
+
if($block->getActiveFilters()) {
|
99 |
+
// Set NOINDEX,FOLLOW when a filter is applied
|
100 |
+
$head->setData('robots','NOINDEX,FOLLOW');
|
101 |
+
}
|
102 |
+
}
|
103 |
+
}
|
104 |
+
}
|
105 |
+
}
|
106 |
+
}
|
app/code/community/GPMD/SEOPack/Model/Product/Visibility.php
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* GPMD SEOPack V0.1.1
|
5 |
+
* @copyright Copyright (c) 2012 GPMD Ltd (http://www.gpmd.co.uk)
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Rewrite to add orphan functionality
|
10 |
+
*
|
11 |
+
* @author Adrian Duke
|
12 |
+
*/
|
13 |
+
class GPMD_SEOPack_Model_Product_Visibility extends Mage_Catalog_Model_Product_Visibility {
|
14 |
+
|
15 |
+
const VISIBILITY_ORPHANED = 5;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Retrieve visible in site ids array
|
19 |
+
*
|
20 |
+
* @return array
|
21 |
+
*/
|
22 |
+
public function getVisibleInSiteIds(){
|
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 |
+
*
|
29 |
+
* @return array
|
30 |
+
*/
|
31 |
+
static public function getOptionArray(){
|
32 |
+
return array(
|
33 |
+
self::VISIBILITY_NOT_VISIBLE=> Mage::helper('catalog')->__('Not Visible Individually'),
|
34 |
+
self::VISIBILITY_ORPHANED => Mage::helper('catalog')->__('Orphaned'),
|
35 |
+
self::VISIBILITY_IN_CATALOG => Mage::helper('catalog')->__('Catalog'),
|
36 |
+
self::VISIBILITY_IN_SEARCH => Mage::helper('catalog')->__('Search'),
|
37 |
+
self::VISIBILITY_BOTH => Mage::helper('catalog')->__('Catalog, Search')
|
38 |
+
);
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Retrieve all options
|
43 |
+
*
|
44 |
+
* @return array
|
45 |
+
*/
|
46 |
+
static public function getAllOption(){
|
47 |
+
$options = self::getOptionArray();
|
48 |
+
array_unshift($options, array('value'=>'', 'label'=>''));
|
49 |
+
return $options;
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Retireve all options
|
54 |
+
*
|
55 |
+
* @return array
|
56 |
+
*/
|
57 |
+
static public function getAllOptions(){
|
58 |
+
$res = array();
|
59 |
+
$res[] = array('value'=>'', 'label'=> Mage::helper('catalog')->__('-- Please Select --'));
|
60 |
+
foreach (self::getOptionArray() as $index => $value) {
|
61 |
+
$res[] = array(
|
62 |
+
'value' => $index,
|
63 |
+
'label' => $value
|
64 |
+
);
|
65 |
+
}
|
66 |
+
return $res;
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Retrieve option text
|
71 |
+
*
|
72 |
+
* @param int $optionId
|
73 |
+
* @return string
|
74 |
+
*/
|
75 |
+
static public function getOptionText($optionId){
|
76 |
+
$options = self::getOptionArray();
|
77 |
+
return isset($options[$optionId]) ? $options[$optionId] : null;
|
78 |
+
}
|
79 |
+
}
|
app/code/community/GPMD/SEOPack/Model/Resource/Eav/Mysql4/Setup.php
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* GPMD SEOPack V0.1.1
|
5 |
+
* @copyright Copyright (c) 2012 GPMD Ltd (http://www.gpmd.co.uk)
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Entities to be installed. Assuming Magento 1.6+
|
10 |
+
*
|
11 |
+
* @author Adrian Duke
|
12 |
+
*/
|
13 |
+
class GPMD_SEOPack_Model_Resource_Eav_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Install a new entity
|
17 |
+
*
|
18 |
+
* @return array entities to install
|
19 |
+
* @access public
|
20 |
+
*/
|
21 |
+
public function getDefaultEntities() {
|
22 |
+
return array(
|
23 |
+
'catalog_category' => array(
|
24 |
+
'entity_model' => 'catalog/category',
|
25 |
+
'attribute_model' => 'catalog/resource_eav_attribute',
|
26 |
+
'table' => 'catalog/category',
|
27 |
+
'additional_attribute_table' => 'catalog/eav_attribute',
|
28 |
+
'entity_attribute_collection' => 'catalog/category_attribute_collection',
|
29 |
+
'attributes' => array(
|
30 |
+
'meta_robots' => array(
|
31 |
+
'type' => 'varchar',
|
32 |
+
'source' => 'seopack/attribute_source_robots',
|
33 |
+
'label' => 'Meta Robots',
|
34 |
+
'input' => 'select',
|
35 |
+
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
|
36 |
+
'visible' => true,
|
37 |
+
'required' => false,
|
38 |
+
'user_defined' => true,
|
39 |
+
'default' => '',
|
40 |
+
'group' => 'General Information',
|
41 |
+
'sort_order' => 100,
|
42 |
+
),
|
43 |
+
),
|
44 |
+
),
|
45 |
+
'catalog_product' => array(
|
46 |
+
'entity_model' => 'catalog/product',
|
47 |
+
'attribute_model' => 'catalog/resource_eav_attribute',
|
48 |
+
'table' => 'catalog/product',
|
49 |
+
'additional_attribute_table' => 'catalog/eav_attribute',
|
50 |
+
'entity_attribute_collection' => 'catalog/product_attribute_collection',
|
51 |
+
'attributes' => array(
|
52 |
+
'meta_robots' => array(
|
53 |
+
'type' => 'varchar',
|
54 |
+
'source' => 'seopack/attribute_source_robots',
|
55 |
+
'label' => 'Meta Robots',
|
56 |
+
'input' => 'select',
|
57 |
+
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
|
58 |
+
'visible' => true,
|
59 |
+
'required' => false,
|
60 |
+
'user_defined' => true,
|
61 |
+
'default' => '',
|
62 |
+
'searchable' => false,
|
63 |
+
'filterable' => false,
|
64 |
+
'comparable' => false,
|
65 |
+
'visible_on_front' => false,
|
66 |
+
'unique' => false,
|
67 |
+
'group' => 'General',
|
68 |
+
'attribute_set' => 'Default',
|
69 |
+
'sort_order' => 100,
|
70 |
+
),
|
71 |
+
),
|
72 |
+
),
|
73 |
+
);
|
74 |
+
}
|
75 |
+
}
|
app/code/community/GPMD/SEOPack/etc/._config.xml
ADDED
Binary file
|
app/code/community/GPMD/SEOPack/etc/config.xml
ADDED
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* @category GPMD
|
5 |
+
* @package GPMD_SEOPack
|
6 |
+
* @license http://www.gpmd.co.uk
|
7 |
+
*/
|
8 |
+
-->
|
9 |
+
<config>
|
10 |
+
<modules>
|
11 |
+
<GPMD_SEOPack>
|
12 |
+
<version>1.1.2</version>
|
13 |
+
</GPMD_SEOPack>
|
14 |
+
</modules>
|
15 |
+
<default>
|
16 |
+
<seopack>
|
17 |
+
<activated>
|
18 |
+
<site_enabled>1</site_enabled>
|
19 |
+
<filter_enabled>1</filter_enabled>
|
20 |
+
<category_enabled>1</category_enabled>
|
21 |
+
<product_enabled>1</product_enabled>
|
22 |
+
<ga_ignore>1</ga_ignore>
|
23 |
+
</activated>
|
24 |
+
</seopack>
|
25 |
+
</default>
|
26 |
+
<global>
|
27 |
+
<models>
|
28 |
+
<seopack>
|
29 |
+
<class>GPMD_SEOPack_Model</class>
|
30 |
+
</seopack>
|
31 |
+
<catalog>
|
32 |
+
<rewrite>
|
33 |
+
<product_visibility>GPMD_SEOPack_Model_Product_Visibility</product_visibility>
|
34 |
+
</rewrite>
|
35 |
+
</catalog>
|
36 |
+
</models>
|
37 |
+
<helpers>
|
38 |
+
<seopack>
|
39 |
+
<class>GPMD_SEOPack_Helper</class>
|
40 |
+
</seopack>
|
41 |
+
</helpers>
|
42 |
+
<resources>
|
43 |
+
<seopack_setup>
|
44 |
+
<setup>
|
45 |
+
<module>GPMD_SEOPack</module>
|
46 |
+
<class>GPMD_SEOPack_Model_Resource_Eav_Mysql4_Setup</class>
|
47 |
+
</setup>
|
48 |
+
<connection>
|
49 |
+
<use>core_setup</use>
|
50 |
+
</connection>
|
51 |
+
</seopack_setup>
|
52 |
+
<seopack_write>
|
53 |
+
<connection>
|
54 |
+
<use>core_write</use>
|
55 |
+
</connection>
|
56 |
+
</seopack_write>
|
57 |
+
<seopack_read>
|
58 |
+
<connection>
|
59 |
+
<use>core_read</use>
|
60 |
+
</connection>
|
61 |
+
</seopack_read>
|
62 |
+
</resources>
|
63 |
+
<events>
|
64 |
+
<controller_action_layout_generate_blocks_after>
|
65 |
+
<observers>
|
66 |
+
<seopack_controller_layout_generate_blocks_after>
|
67 |
+
<type>singleton</type>
|
68 |
+
<class>seopack/observer</class>
|
69 |
+
<method>setMetaRobots</method>
|
70 |
+
</seopack_controller_layout_generate_blocks_after>
|
71 |
+
|
72 |
+
</observers>
|
73 |
+
</controller_action_layout_generate_blocks_after>
|
74 |
+
</events>
|
75 |
+
</global>
|
76 |
+
<adminhtml>
|
77 |
+
<acl>
|
78 |
+
<resources>
|
79 |
+
<admin>
|
80 |
+
<children>
|
81 |
+
<system>
|
82 |
+
<children>
|
83 |
+
<config>
|
84 |
+
<children>
|
85 |
+
<seopack>
|
86 |
+
<title>SEOPack</title>
|
87 |
+
</seopack>
|
88 |
+
</children>
|
89 |
+
</config>
|
90 |
+
</children>
|
91 |
+
</system>
|
92 |
+
</children>
|
93 |
+
</admin>
|
94 |
+
</resources>
|
95 |
+
</acl>
|
96 |
+
</adminhtml>
|
97 |
+
</config>
|
app/code/community/GPMD/SEOPack/etc/system.xml
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* @category GPMD
|
5 |
+
* @package GPMD_SEOPack
|
6 |
+
* @license http://www.gpmd.co.uk
|
7 |
+
*/
|
8 |
+
-->
|
9 |
+
<config>
|
10 |
+
<tabs>
|
11 |
+
<GPMD translate="label">
|
12 |
+
<label>GPMD</label>
|
13 |
+
<sort_order>10000</sort_order>
|
14 |
+
</GPMD>
|
15 |
+
</tabs>
|
16 |
+
<sections>
|
17 |
+
<seopack translate="label">
|
18 |
+
<label>SEOPack</label>
|
19 |
+
<tab>GPMD</tab>
|
20 |
+
<frontend_type>text</frontend_type>
|
21 |
+
<sort_order>0</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 |
+
<groups>
|
26 |
+
<activated translate="label">
|
27 |
+
<label>Enable / Disable</label>
|
28 |
+
<frontend_type>text</frontend_type>
|
29 |
+
<sort_order>100</sort_order>
|
30 |
+
<show_in_default>1</show_in_default>
|
31 |
+
<show_in_website>1</show_in_website>
|
32 |
+
<show_in_store>1</show_in_store>
|
33 |
+
<fields>
|
34 |
+
<site_enabled translate="label">
|
35 |
+
<label>All Meta Robots</label>
|
36 |
+
<comment>
|
37 |
+
<![CDATA[<span class="notice">Enable / Disable custom meta robots across whole site</span>]]>
|
38 |
+
</comment>
|
39 |
+
<frontend_type>select</frontend_type>
|
40 |
+
<source_model>adminhtml/system_config_source_enabledisable</source_model>
|
41 |
+
<sort_order>1</sort_order>
|
42 |
+
<show_in_default>1</show_in_default>
|
43 |
+
<show_in_website>0</show_in_website>
|
44 |
+
<show_in_store>0</show_in_store>
|
45 |
+
</site_enabled>
|
46 |
+
<filter_enabled translate="label">
|
47 |
+
<depends><site_enabled>1</site_enabled></depends>
|
48 |
+
<label>Filter Page Meta Robots</label>
|
49 |
+
<comment>
|
50 |
+
<![CDATA[Enable / Disable filtered category pages custom meta robots across site]]>
|
51 |
+
</comment>
|
52 |
+
<frontend_type>select</frontend_type>
|
53 |
+
<source_model>adminhtml/system_config_source_enabledisable</source_model>
|
54 |
+
<sort_order>10</sort_order>
|
55 |
+
<show_in_default>1</show_in_default>
|
56 |
+
<show_in_website>0</show_in_website>
|
57 |
+
<show_in_store>0</show_in_store>
|
58 |
+
</filter_enabled>
|
59 |
+
<product_enabled translate="label">
|
60 |
+
<depends><site_enabled>1</site_enabled></depends>
|
61 |
+
<label>Product Meta Robots</label>
|
62 |
+
<comment>
|
63 |
+
<![CDATA[Enable / Disable product custom meta robots across site]]>
|
64 |
+
</comment>
|
65 |
+
<frontend_type>select</frontend_type>
|
66 |
+
<source_model>adminhtml/system_config_source_enabledisable</source_model>
|
67 |
+
<sort_order>20</sort_order>
|
68 |
+
<show_in_default>1</show_in_default>
|
69 |
+
<show_in_website>0</show_in_website>
|
70 |
+
<show_in_store>0</show_in_store>
|
71 |
+
</product_enabled>
|
72 |
+
<category_enabled translate="label">
|
73 |
+
<depends><site_enabled>1</site_enabled></depends>
|
74 |
+
<label>Category Meta Robots</label>
|
75 |
+
<comment>
|
76 |
+
<![CDATA[Enable / Disable custom category meta robots across site]]>
|
77 |
+
</comment>
|
78 |
+
<frontend_type>select</frontend_type>
|
79 |
+
<source_model>adminhtml/system_config_source_enabledisable</source_model>
|
80 |
+
<sort_order>30</sort_order>
|
81 |
+
<show_in_default>1</show_in_default>
|
82 |
+
<show_in_website>0</show_in_website>
|
83 |
+
<show_in_store>0</show_in_store>
|
84 |
+
</category_enabled>
|
85 |
+
<ga_ignore translate="label">
|
86 |
+
<label>GA Ignore 'Top Sites'</label>
|
87 |
+
<comment>
|
88 |
+
<![CDATA[Remove 'Top Site' requests from google analytics (Safari, Opera & Firefox)]]>
|
89 |
+
</comment>
|
90 |
+
<frontend_type>select</frontend_type>
|
91 |
+
<source_model>adminhtml/system_config_source_enabledisable</source_model>
|
92 |
+
<sort_order>40</sort_order>
|
93 |
+
<show_in_default>1</show_in_default>
|
94 |
+
<show_in_website>0</show_in_website>
|
95 |
+
<show_in_store>0</show_in_store>
|
96 |
+
</ga_ignore>
|
97 |
+
</fields>
|
98 |
+
</activated>
|
99 |
+
</groups>
|
100 |
+
</seopack>
|
101 |
+
</sections>
|
102 |
+
</config>
|
app/code/community/GPMD/SEOPack/sql/seopack_setup/mysql4-install-0.1.1.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* GPMD SEOPack V0.1.1
|
4 |
+
* @copyright Copyright (c) 2011 GPMD Ltd (http://www.gpmd.co.uk)
|
5 |
+
*/
|
6 |
+
|
7 |
+
// GPMD_SEOPack_Model_Resource_Eav_Mysql4_Setup
|
8 |
+
$installer = $this;
|
9 |
+
$installer->installEntities();
|
app/etc/modules/GPMD_SEOPack.xml
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<GPMD_SEOPack>
|
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>
|
14 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>gpmd_seopack</name>
|
4 |
+
<version>1.1.2</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 and page orphaning.</summary>
|
10 |
+
<description>The SEOPack module will help to improve your search engine rankings by allowing you to assign custom meta robots tags, 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 e-commerce SEO issues.</description>
|
12 |
+
<notes>Added the following features:
|
13 |
+

|
14 |
+
- Custom meta robots at a category and product level
|
15 |
+
- Filter page meta robots
|
16 |
+
- Product orphaning
|
17 |
+
- Top sites analytics protection</notes>
|
18 |
+
<authors><author><name>Adrian Duke</name><user>adrianduke</user><email>adrian@gpmd.co.uk</email></author></authors>
|
19 |
+
<date>2012-02-16</date>
|
20 |
+
<time>14:50:27</time>
|
21 |
+
<contents><target name="magecommunity"><dir name="GPMD"><dir name="SEOPack"><dir><dir name="Helper"><file name="Data.php" hash="4749540fe128e3d288753f08ab2ec20a"/></dir><dir name="Model"><dir name="Attribute"><dir name="Source"><file name="Robots.php" hash="07555ae7a79dd8d99ebe3a13cc3f5d83"/></dir></dir><file name="Observer.php" hash="c2fa3bf58eb9633f5d43ea8146be0e75"/><dir name="Product"><file name="Visibility.php" hash="6130c925e1a030662fd060d094ae40cc"/></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="a3be71150e5568cc000495edf466200a"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="e1e6821148a6ba48941d8d7fe5b1505f"/><file name="system.xml" hash="8894108af6c8951f6bdc8a8b4446dc86"/></dir><dir name="sql"><dir name="seopack_setup"><file name="mysql4-install-1.1.2.php" hash="b87ea79a6da95e8782731d4d8d8ea52b"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="GPMD_SEOPack.xml" hash="96a18610be60b7c18a8d9a40e9468d82"/></dir></target></contents>
|
22 |
+
<compatible/>
|
23 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
24 |
+
</package>
|