Version Notes
Added file importing from "var/seoredirect/import"
Download this release
Release Info
| Developer | Arron Moss |
| Extension | Zero1_Seoredirects |
| Version | 1.0.17 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0.13 to 1.0.17
- app/code/community/Zero1/Seoredirects/Block/Manage.php +1 -1
- app/code/community/Zero1/Seoredirects/Model/Mysql4/Setup.php +0 -5
- app/code/community/Zero1/Seoredirects/Model/Observer.php +121 -53
- app/code/community/Zero1/Seoredirects/Model/Resource/Redirection.php +1 -1
- app/code/community/Zero1/Seoredirects/Model/Resource/Redirection/Collection.php +1 -1
- app/code/community/Zero1/Seoredirects/Model/Resource/Setup.php +0 -5
- app/code/community/Zero1/Seoredirects/Model/Source/Files.php +33 -0
- app/code/community/Zero1/Seoredirects/etc/config.xml +6 -3
- app/code/community/Zero1/Seoredirects/etc/system.xml +35 -2
- package.xml +6 -5
app/code/community/Zero1/Seoredirects/Block/Manage.php
CHANGED
|
@@ -10,7 +10,7 @@ class Zero1_Seoredirects_Block_Manage extends Mage_Adminhtml_Block_Widget_Grid_C
|
|
| 10 |
|
| 11 |
$this->_headerText = Mage::helper('seoredirects')->__('SEO Redirection Management');
|
| 12 |
$this->_addButton('refresh', array(
|
| 13 |
-
'label' => $this->__('Refresh
|
| 14 |
'onclick' => "setLocation('{$this->getUrl('*/*/update')}')",
|
| 15 |
'class' => 'refresh'
|
| 16 |
));
|
| 10 |
|
| 11 |
$this->_headerText = Mage::helper('seoredirects')->__('SEO Redirection Management');
|
| 12 |
$this->_addButton('refresh', array(
|
| 13 |
+
'label' => $this->__('Refresh URLs'),
|
| 14 |
'onclick' => "setLocation('{$this->getUrl('*/*/update')}')",
|
| 15 |
'class' => 'refresh'
|
| 16 |
));
|
app/code/community/Zero1/Seoredirects/Model/Mysql4/Setup.php
DELETED
|
@@ -1,5 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
class Zero1_Seoredirects_Model_Mysql4_Setup extends Zero1_Seoredirects_Model_Resource_Setup
|
| 3 |
-
{
|
| 4 |
-
}
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Zero1/Seoredirects/Model/Observer.php
CHANGED
|
@@ -1,15 +1,52 @@
|
|
| 1 |
<?php
|
|
|
|
|
|
|
|
|
|
| 2 |
class Zero1_Seoredirects_Model_Observer
|
| 3 |
{
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
{
|
| 8 |
$request = $observer->getFront()->getRequest();
|
| 9 |
|
| 10 |
if($request->getActionName() != 'noRoute')
|
| 11 |
return; // There is a valid route, nothing to do
|
| 12 |
-
|
| 13 |
// First search for the URI with query strings
|
| 14 |
$requestUri = preg_replace('/^'.preg_quote($request->getBasePath(), '/').'/', '', $request->getRequestUri());
|
| 15 |
$requestUri = str_replace('?', '_', $requestUri); // Zend does not support "?", replace them with "_" wildcard and use LIKE
|
|
@@ -40,28 +77,61 @@ class Zero1_Seoredirects_Model_Observer
|
|
| 40 |
// No redirections
|
| 41 |
return;
|
| 42 |
}
|
| 43 |
-
|
| 44 |
-
|
|
|
|
|
|
|
|
|
|
| 45 |
{
|
| 46 |
$this->checkForRedirection($observer);
|
| 47 |
}
|
| 48 |
-
|
| 49 |
-
|
|
|
|
|
|
|
|
|
|
| 50 |
{
|
| 51 |
$this->checkForRedirection($observer);
|
| 52 |
}
|
| 53 |
-
|
| 54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
{
|
| 56 |
-
|
| 57 |
-
if(!file_exists($dump_path))
|
| 58 |
-
mkdir($dump_path);
|
| 59 |
|
| 60 |
$stores = Mage::getResourceModel('core/store_collection');
|
| 61 |
$results = array();
|
| 62 |
|
| 63 |
-
foreach($stores as $store)
|
| 64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
$results[$store->getId()] = array(
|
| 66 |
'updated' => 0,
|
| 67 |
'deleted' => 0,
|
|
@@ -84,41 +154,39 @@ class Zero1_Seoredirects_Model_Observer
|
|
| 84 |
|
| 85 |
continue; // Do not import anything now
|
| 86 |
}
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
}
|
| 121 |
-
fclose($fp);
|
| 122 |
|
| 123 |
// Detect the limit for this store
|
| 124 |
$license_data = array();
|
|
@@ -138,7 +206,7 @@ class Zero1_Seoredirects_Model_Observer
|
|
| 138 |
$results[$store->getId()]['limitation'] = 'Limited to '.$limit.' rows by your current license. <a href="'.Mage::helper('seoredirects/license')->getRequestURL($store).'" target="_blank">Click here to increase this limit</a>';
|
| 139 |
}
|
| 140 |
|
| 141 |
-
// Add / update the
|
| 142 |
foreach($redirects as $from => $to)
|
| 143 |
{
|
| 144 |
$found = false;
|
|
@@ -173,7 +241,7 @@ class Zero1_Seoredirects_Model_Observer
|
|
| 173 |
}
|
| 174 |
}
|
| 175 |
|
| 176 |
-
// Remove all the unused
|
| 177 |
$redirections = Mage::getModel('seoredirects/redirection')->getCollection();
|
| 178 |
$redirections->addFieldToFilter('store', $store->getId());
|
| 179 |
foreach($redirections as $redirection)
|
|
@@ -186,7 +254,7 @@ class Zero1_Seoredirects_Model_Observer
|
|
| 186 |
}
|
| 187 |
}
|
| 188 |
|
| 189 |
-
// Make sure there are no redirection loops
|
| 190 |
$redirections = Mage::getModel('seoredirects/redirection')->getCollection();
|
| 191 |
$redirections->addFieldToFilter('store', $store->getId());
|
| 192 |
foreach($redirections as $redirectionA)
|
| 1 |
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Class Zero1_Seoredirects_Model_Observer
|
| 4 |
+
*/
|
| 5 |
class Zero1_Seoredirects_Model_Observer
|
| 6 |
{
|
| 7 |
+
/**
|
| 8 |
+
* The default licence limit
|
| 9 |
+
*/
|
| 10 |
+
const DEFAULT_LIMIT = 50;
|
| 11 |
+
|
| 12 |
+
/**
|
| 13 |
+
* Stores the current Google URL to download the document from
|
| 14 |
+
*
|
| 15 |
+
* @var string
|
| 16 |
+
*/
|
| 17 |
+
protected $_url;
|
| 18 |
+
|
| 19 |
+
/**
|
| 20 |
+
* Stores the current file to import from
|
| 21 |
+
*
|
| 22 |
+
* @var string
|
| 23 |
+
*/
|
| 24 |
+
protected $_file;
|
| 25 |
+
|
| 26 |
+
/**
|
| 27 |
+
* Strip "http://www.domain.com/" from the URL
|
| 28 |
+
*
|
| 29 |
+
* @var bool
|
| 30 |
+
*/
|
| 31 |
+
protected $_strip_domain;
|
| 32 |
+
|
| 33 |
+
/**
|
| 34 |
+
* Strip "/" from the URL
|
| 35 |
+
*
|
| 36 |
+
* @var bool
|
| 37 |
+
*/
|
| 38 |
+
protected $_strip_slash;
|
| 39 |
+
|
| 40 |
+
/**
|
| 41 |
+
* @param Varien_Event_Observer $observer
|
| 42 |
+
*/
|
| 43 |
+
protected function checkForRedirection(Varien_Event_Observer $observer)
|
| 44 |
{
|
| 45 |
$request = $observer->getFront()->getRequest();
|
| 46 |
|
| 47 |
if($request->getActionName() != 'noRoute')
|
| 48 |
return; // There is a valid route, nothing to do
|
| 49 |
+
|
| 50 |
// First search for the URI with query strings
|
| 51 |
$requestUri = preg_replace('/^'.preg_quote($request->getBasePath(), '/').'/', '', $request->getRequestUri());
|
| 52 |
$requestUri = str_replace('?', '_', $requestUri); // Zend does not support "?", replace them with "_" wildcard and use LIKE
|
| 77 |
// No redirections
|
| 78 |
return;
|
| 79 |
}
|
| 80 |
+
|
| 81 |
+
/**
|
| 82 |
+
* @param Varien_Event_Observer $observer
|
| 83 |
+
*/
|
| 84 |
+
public function controller_front_send_response_before(Varien_Event_Observer $observer)
|
| 85 |
{
|
| 86 |
$this->checkForRedirection($observer);
|
| 87 |
}
|
| 88 |
+
|
| 89 |
+
/**
|
| 90 |
+
* @param Varien_Event_Observer $observer
|
| 91 |
+
*/
|
| 92 |
+
public function controller_front_send_response_after(Varien_Event_Observer $observer)
|
| 93 |
{
|
| 94 |
$this->checkForRedirection($observer);
|
| 95 |
}
|
| 96 |
+
|
| 97 |
+
/**
|
| 98 |
+
* Clean the URL bu removing domain and trailing slashes
|
| 99 |
+
*
|
| 100 |
+
* @param $url
|
| 101 |
+
* @return string
|
| 102 |
+
*/
|
| 103 |
+
protected function _cleanUrl($url)
|
| 104 |
+
{
|
| 105 |
+
// Strip the domain name from the FROM / TO URL's if it exists
|
| 106 |
+
if($this->_strip_domain) {
|
| 107 |
+
$url = preg_replace('/^[^:]+:\\/\\/[^\\/]+(.*)$/si', '$1', $url);
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
// Strip the prefix slash from the FROM / TO URL's if it exists
|
| 111 |
+
if($this->_strip_slash) {
|
| 112 |
+
$url = preg_replace('/^\\/(.*)$/si', '$1', $url);
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
return $url;
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
/**
|
| 119 |
+
* Update the redirection(s) from Google and import files
|
| 120 |
+
*
|
| 121 |
+
*/
|
| 122 |
+
public function updateRedirectionsCronJob()
|
| 123 |
{
|
| 124 |
+
clearstatcache();
|
|
|
|
|
|
|
| 125 |
|
| 126 |
$stores = Mage::getResourceModel('core/store_collection');
|
| 127 |
$results = array();
|
| 128 |
|
| 129 |
+
foreach($stores as $store) {
|
| 130 |
+
$this->_url = Mage::getStoreConfig('seoredirects/settings/url', $store->getId());
|
| 131 |
+
$this->_strip_domain = Mage::getStoreConfig('seoredirects/settings/strip_domain', $store->getId());
|
| 132 |
+
$this->_strip_slash = Mage::getStoreConfig('seoredirects/settings/strip_slash', $store->getId());
|
| 133 |
+
$this->_file = Mage::getStoreConfig('seoredirects/settings/file', $store->getId());
|
| 134 |
+
|
| 135 |
$results[$store->getId()] = array(
|
| 136 |
'updated' => 0,
|
| 137 |
'deleted' => 0,
|
| 154 |
|
| 155 |
continue; // Do not import anything now
|
| 156 |
}
|
| 157 |
+
|
| 158 |
+
$redirects = array();
|
| 159 |
+
|
| 160 |
+
////////////////////////////////////////////////
|
| 161 |
+
// Load redirection(s) from Google
|
| 162 |
+
if(!empty($this->_url)) {
|
| 163 |
+
// Get the content from Google and save it in to a file
|
| 164 |
+
$client = new Zend_Http_Client($this->_url);
|
| 165 |
+
$lines = explode(PHP_EOL, $client->request()->getBody());
|
| 166 |
+
foreach($lines as $line) {
|
| 167 |
+
$data = str_getcsv($line);
|
| 168 |
+
if(is_array($data) && count($data) >= 2) {
|
| 169 |
+
$redirects[$this->_cleanUrl($data[0])] = $this->_cleanUrl($data[1]);
|
| 170 |
+
}
|
| 171 |
+
}
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
////////////////////////////////////////////////
|
| 175 |
+
// Load redirection(s) from files
|
| 176 |
+
$import_path = Mage::getBaseDir('var').'/seoredirects/import';
|
| 177 |
+
if(is_dir($import_path)) {
|
| 178 |
+
if(is_file($import_path.DS.$this->_file) && is_readable($import_path.DS.$this->_file)) {
|
| 179 |
+
$fp = fopen($import_path.DS.$this->_file, 'r');
|
| 180 |
+
while(($data = fgetcsv($fp, 4096)) !== false) {
|
| 181 |
+
if(is_array($data) && count($data) >= 2) {
|
| 182 |
+
$redirects[$this->_cleanUrl($data[0])] = $this->_cleanUrl($data[1]);
|
| 183 |
+
}
|
| 184 |
+
}
|
| 185 |
+
fclose($fp);
|
| 186 |
+
}
|
| 187 |
+
} else {
|
| 188 |
+
mkdir($import_path, 0777, true);
|
| 189 |
+
}
|
|
|
|
|
|
|
| 190 |
|
| 191 |
// Detect the limit for this store
|
| 192 |
$license_data = array();
|
| 206 |
$results[$store->getId()]['limitation'] = 'Limited to '.$limit.' rows by your current license. <a href="'.Mage::helper('seoredirects/license')->getRequestURL($store).'" target="_blank">Click here to increase this limit</a>';
|
| 207 |
}
|
| 208 |
|
| 209 |
+
// Add / update the redirection(s)
|
| 210 |
foreach($redirects as $from => $to)
|
| 211 |
{
|
| 212 |
$found = false;
|
| 241 |
}
|
| 242 |
}
|
| 243 |
|
| 244 |
+
// Remove all the unused redirection(s)
|
| 245 |
$redirections = Mage::getModel('seoredirects/redirection')->getCollection();
|
| 246 |
$redirections->addFieldToFilter('store', $store->getId());
|
| 247 |
foreach($redirections as $redirection)
|
| 254 |
}
|
| 255 |
}
|
| 256 |
|
| 257 |
+
// Make sure there are no redirection(s) loops
|
| 258 |
$redirections = Mage::getModel('seoredirects/redirection')->getCollection();
|
| 259 |
$redirections->addFieldToFilter('store', $store->getId());
|
| 260 |
foreach($redirections as $redirectionA)
|
app/code/community/Zero1/Seoredirects/Model/Resource/Redirection.php
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
<?php
|
| 2 |
-
class Zero1_Seoredirects_Model_Resource_Redirection extends
|
| 3 |
{
|
| 4 |
protected function _construct()
|
| 5 |
{
|
| 1 |
<?php
|
| 2 |
+
class Zero1_Seoredirects_Model_Resource_Redirection extends Mage_Core_Model_Mysql4_Abstract
|
| 3 |
{
|
| 4 |
protected function _construct()
|
| 5 |
{
|
app/code/community/Zero1/Seoredirects/Model/Resource/Redirection/Collection.php
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
<?php
|
| 2 |
-
class Zero1_Seoredirects_Model_Resource_Redirection_Collection extends
|
| 3 |
{
|
| 4 |
protected function _construct()
|
| 5 |
{
|
| 1 |
<?php
|
| 2 |
+
class Zero1_Seoredirects_Model_Resource_Redirection_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
| 3 |
{
|
| 4 |
protected function _construct()
|
| 5 |
{
|
app/code/community/Zero1/Seoredirects/Model/Resource/Setup.php
DELETED
|
@@ -1,5 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
class Zero1_Seoredirects_Model_Resource_Setup extends Mage_Sales_Model_Resource_Setup
|
| 3 |
-
{
|
| 4 |
-
|
| 5 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Zero1/Seoredirects/Model/Source/Files.php
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
class Zero1_Seoredirects_Model_Source_Files
|
| 3 |
+
{
|
| 4 |
+
/**
|
| 5 |
+
* Retrieve options array
|
| 6 |
+
*
|
| 7 |
+
* @return array
|
| 8 |
+
*/
|
| 9 |
+
public function toOptionArray()
|
| 10 |
+
{
|
| 11 |
+
$options = array();
|
| 12 |
+
|
| 13 |
+
$options[] = array(
|
| 14 |
+
'label' => 'None',
|
| 15 |
+
'value' => '',
|
| 16 |
+
);
|
| 17 |
+
|
| 18 |
+
$import_path = Mage::getBaseDir('var').DS.'seoredirects'.DS.'import';
|
| 19 |
+
if(is_dir($import_path)) {
|
| 20 |
+
foreach(glob($import_path.DS.'*.csv') as $filename) {
|
| 21 |
+
$filename = str_replace($import_path.DS, '', $filename);
|
| 22 |
+
$options[] = array(
|
| 23 |
+
'label' => $filename,
|
| 24 |
+
'value' => $filename,
|
| 25 |
+
);
|
| 26 |
+
}
|
| 27 |
+
} else {
|
| 28 |
+
mkdir($import_path, 0777, true);
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
return $options;
|
| 32 |
+
}
|
| 33 |
+
}
|
app/code/community/Zero1/Seoredirects/etc/config.xml
CHANGED
|
@@ -2,11 +2,11 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Zero1_Seoredirects>
|
| 5 |
-
<version>1.0.
|
| 6 |
</Zero1_Seoredirects>
|
| 7 |
</modules>
|
| 8 |
|
| 9 |
-
<global>
|
| 10 |
<models>
|
| 11 |
<seoredirects>
|
| 12 |
<class>Zero1_Seoredirects_Model</class>
|
|
@@ -15,6 +15,7 @@
|
|
| 15 |
|
| 16 |
<seoredirects_resource>
|
| 17 |
<class>Zero1_Seoredirects_Model_Resource</class>
|
|
|
|
| 18 |
<entities>
|
| 19 |
<redirection>
|
| 20 |
<table>zero1_seoredirects_redirection</table>
|
|
@@ -27,7 +28,7 @@
|
|
| 27 |
<seoredirects_setup>
|
| 28 |
<setup>
|
| 29 |
<module>Zero1_Seoredirects</module>
|
| 30 |
-
<class>
|
| 31 |
</setup>
|
| 32 |
</seoredirects_setup>
|
| 33 |
</resources>
|
|
@@ -96,6 +97,8 @@
|
|
| 96 |
<settings>
|
| 97 |
<enabled>0</enabled>
|
| 98 |
<url></url>
|
|
|
|
|
|
|
| 99 |
</settings>
|
| 100 |
</seoredirects>
|
| 101 |
</default>
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Zero1_Seoredirects>
|
| 5 |
+
<version>1.0.17</version>
|
| 6 |
</Zero1_Seoredirects>
|
| 7 |
</modules>
|
| 8 |
|
| 9 |
+
<global>
|
| 10 |
<models>
|
| 11 |
<seoredirects>
|
| 12 |
<class>Zero1_Seoredirects_Model</class>
|
| 15 |
|
| 16 |
<seoredirects_resource>
|
| 17 |
<class>Zero1_Seoredirects_Model_Resource</class>
|
| 18 |
+
<deprecatedNode>seoredirects_mysql4</deprecatedNode>
|
| 19 |
<entities>
|
| 20 |
<redirection>
|
| 21 |
<table>zero1_seoredirects_redirection</table>
|
| 28 |
<seoredirects_setup>
|
| 29 |
<setup>
|
| 30 |
<module>Zero1_Seoredirects</module>
|
| 31 |
+
<!-- <class>Mage_Eav_Model_Entity_Setup</class> -->
|
| 32 |
</setup>
|
| 33 |
</seoredirects_setup>
|
| 34 |
</resources>
|
| 97 |
<settings>
|
| 98 |
<enabled>0</enabled>
|
| 99 |
<url></url>
|
| 100 |
+
<strip_domain>1</strip_domain>
|
| 101 |
+
<strip_slash>1</strip_slash>
|
| 102 |
</settings>
|
| 103 |
</seoredirects>
|
| 104 |
</default>
|
app/code/community/Zero1/Seoredirects/etc/system.xml
CHANGED
|
@@ -33,18 +33,51 @@
|
|
| 33 |
<show_in_default>1</show_in_default>
|
| 34 |
<show_in_website>1</show_in_website>
|
| 35 |
<show_in_store>1</show_in_store>
|
| 36 |
-
<comment
|
| 37 |
</url>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
<serial translate="label">
|
| 40 |
<label>Serial</label>
|
| 41 |
<frontend_type>textarea</frontend_type>
|
| 42 |
-
<sort_order>
|
| 43 |
<show_in_default>1</show_in_default>
|
| 44 |
<show_in_website>1</show_in_website>
|
| 45 |
<show_in_store>0</show_in_store>
|
| 46 |
<comment><![CDATA[Visit <a href="http://www.zero1.co.uk/" target="_blank">http://www.zero1.co.uk</a> if you require a serial.]]></comment>
|
| 47 |
</serial>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
</fields>
|
| 49 |
</settings>
|
| 50 |
</groups>
|
| 33 |
<show_in_default>1</show_in_default>
|
| 34 |
<show_in_website>1</show_in_website>
|
| 35 |
<show_in_store>1</show_in_store>
|
| 36 |
+
<comment><![CDATA[The above document will be downloaded and parsed into Magento at 2am every morning]]></comment>
|
| 37 |
</url>
|
| 38 |
+
|
| 39 |
+
<file translate="label">
|
| 40 |
+
<label>File to import</label>
|
| 41 |
+
<frontend_type>select</frontend_type>
|
| 42 |
+
<source_model>seoredirects/source_files</source_model>
|
| 43 |
+
<sort_order>2</sort_order>
|
| 44 |
+
<show_in_default>1</show_in_default>
|
| 45 |
+
<show_in_website>1</show_in_website>
|
| 46 |
+
<show_in_store>1</show_in_store>
|
| 47 |
+
<comment><![CDATA[The above document from "var/seoredirects/import" will be parsed into Magento at 2am every morning]]></comment>
|
| 48 |
+
</file>
|
| 49 |
|
| 50 |
<serial translate="label">
|
| 51 |
<label>Serial</label>
|
| 52 |
<frontend_type>textarea</frontend_type>
|
| 53 |
+
<sort_order>3</sort_order>
|
| 54 |
<show_in_default>1</show_in_default>
|
| 55 |
<show_in_website>1</show_in_website>
|
| 56 |
<show_in_store>0</show_in_store>
|
| 57 |
<comment><![CDATA[Visit <a href="http://www.zero1.co.uk/" target="_blank">http://www.zero1.co.uk</a> if you require a serial.]]></comment>
|
| 58 |
</serial>
|
| 59 |
+
|
| 60 |
+
<strip_domain translate="label">
|
| 61 |
+
<label>Strip Domain</label>
|
| 62 |
+
<frontend_type>select</frontend_type>
|
| 63 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 64 |
+
<sort_order>4</sort_order>
|
| 65 |
+
<show_in_default>1</show_in_default>
|
| 66 |
+
<show_in_website>1</show_in_website>
|
| 67 |
+
<show_in_store>1</show_in_store>
|
| 68 |
+
<comment><![CDATA[Removes domain from imported URLs]]></comment>
|
| 69 |
+
</strip_domain>
|
| 70 |
+
|
| 71 |
+
<strip_slash translate="label">
|
| 72 |
+
<label>Strip Slash</label>
|
| 73 |
+
<frontend_type>select</frontend_type>
|
| 74 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 75 |
+
<sort_order>5</sort_order>
|
| 76 |
+
<show_in_default>1</show_in_default>
|
| 77 |
+
<show_in_website>1</show_in_website>
|
| 78 |
+
<show_in_store>1</show_in_store>
|
| 79 |
+
<comment><![CDATA[Removes "/" from the start of imported URLs]]></comment>
|
| 80 |
+
</strip_slash>
|
| 81 |
</fields>
|
| 82 |
</settings>
|
| 83 |
</groups>
|
package.xml
CHANGED
|
@@ -1,18 +1,19 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Zero1_Seoredirects</name>
|
| 4 |
-
<version>1.0.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://shop.zero1.co.uk/LICENSE.txt">Commercial</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
<summary>Manage you SEO redirects using a Google Doc</summary>
|
| 10 |
<description>Manage you SEO redirects using a Google Doc</description>
|
| 11 |
-
<notes>
|
|
|
|
| 12 |
<authors><author><name>Arron Moss</name><user>zero1limited</user><email>arron.moss@zero1.co.uk</email></author></authors>
|
| 13 |
-
<date>
|
| 14 |
-
<time>
|
| 15 |
-
<contents><target name="magecommunity"><dir name="Zero1"><dir name="Seoredirects"><dir name="Block"><dir name="Manage"><file name="Grid.php" hash="b06399e81b30ef592805277595061b38"/></dir><file name="Manage.php" hash="
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 18 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Zero1_Seoredirects</name>
|
| 4 |
+
<version>1.0.17</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://shop.zero1.co.uk/LICENSE.txt">Commercial</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
<summary>Manage you SEO redirects using a Google Doc</summary>
|
| 10 |
<description>Manage you SEO redirects using a Google Doc</description>
|
| 11 |
+
<notes>Added file importing from "var/seoredirect/import"
|
| 12 |
+
</notes>
|
| 13 |
<authors><author><name>Arron Moss</name><user>zero1limited</user><email>arron.moss@zero1.co.uk</email></author></authors>
|
| 14 |
+
<date>2013-06-25</date>
|
| 15 |
+
<time>12:15:08</time>
|
| 16 |
+
<contents><target name="magecommunity"><dir name="Zero1"><dir name="Seoredirects"><dir name="Block"><dir name="Manage"><file name="Grid.php" hash="b06399e81b30ef592805277595061b38"/></dir><file name="Manage.php" hash="e891c9539563a551ceb65601532ed402"/></dir><dir name="Helper"><file name="Data.php" hash="36474aca2c8e7dce3f30c398bd9c0ce0"/><file name="License.php" hash="479affaec1ba20aa6b916dec4e055b4b"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Redirection"><file name="Collection.php" hash="a848d959fdca977b4470f46c93a27eb7"/></dir><file name="Redirection.php" hash="a357992dee4bb6cf526bb358dc4d1e0d"/></dir><file name="Observer.php" hash="6d7b2a20b22b10094216c1d1e1085268"/><file name="Redirection.php" hash="8d26f395bf5b33679b032c160152e24a"/><dir name="Resource"><dir name="Redirection"><file name="Collection.php" hash="107e0dab442d292a426e2ac635f8e4fd"/></dir><file name="Redirection.php" hash="dc53fa0fec1044e9f09a0d7815bcc32d"/></dir><dir name="Source"><file name="Files.php" hash="b797b3fe23d3e10217440bd45d5d55e4"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Seoredirects"><file name="ManageController.php" hash="bf497a1ce5f202abd024a5736a0e8a9a"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="7e8d3a4c8dff9b4df9f380c284225393"/><file name="config.xml" hash="c4e2d8e29d4c1ab25ea990df0e5b4759"/><file name="system.xml" hash="d2d19029c76339de9786b333702c0a97"/></dir><dir name="sql"><dir name="seoredirects_setup"><file name="install-1.0.0.php" hash="918bc1dee6bb2388e78b7346929916c9"/><file name="install-1.0.1.php" hash="918bc1dee6bb2388e78b7346929916c9"/><file name="mysql4-install-1.0.0.php" hash="918bc1dee6bb2388e78b7346929916c9"/><file name="mysql4-install-1.0.1.php" hash="918bc1dee6bb2388e78b7346929916c9"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Zero1_Seoredirects.xml" hash="dd176346dbb2abf0e20d8ea087abe2ce"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="seoredirects.xml" hash="84e2381a4d12eb22fa5e6b5b092ddef7"/></dir></dir></dir></dir></target></contents>
|
| 17 |
<compatible/>
|
| 18 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 19 |
</package>
|
