Version Notes
1.0.0
Download this release
Release Info
Developer | Magento Core Team |
Extension | ip_robots |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/community/Ip/Robots/Block/Admin/Item.php +58 -0
- app/code/community/Ip/Robots/Block/Admin/Item/Edit.php +58 -0
- app/code/community/Ip/Robots/Block/Admin/Item/Edit/Form.php +52 -0
- app/code/community/Ip/Robots/Block/Admin/Item/Edit/Tab/Form.php +94 -0
- app/code/community/Ip/Robots/Block/Admin/Item/Edit/Tab/Other.php +34 -0
- app/code/community/Ip/Robots/Block/Admin/Item/Edit/Tabs.php +35 -0
- app/code/community/Ip/Robots/Block/Admin/Item/Grid.php +125 -0
- app/code/community/Ip/Robots/Block/Admin/Item/Grid/Renderer/Action.php +32 -0
- app/code/community/Ip/Robots/Block/Developer.php +64 -0
- app/code/community/Ip/Robots/Helper/Data.php +45 -0
- app/code/community/Ip/Robots/Model/Data.php +140 -0
- app/code/community/Ip/Robots/Model/Item.php +152 -0
- app/code/community/Ip/Robots/Model/Mysql4/Item.php +17 -0
- app/code/community/Ip/Robots/Model/Mysql4/Item/Collection.php +21 -0
- app/code/community/Ip/Robots/Model/Source/Crawldelay.php +25 -0
- app/code/community/Ip/Robots/Model/Wysiwyg/Config.php +26 -0
- app/code/community/Ip/Robots/controllers/Admin/ItemController.php +242 -0
- app/code/community/Ip/Robots/etc/config.xml +164 -0
- app/code/community/Ip/Robots/etc/system.xml +231 -0
- app/code/community/Ip/Robots/sql/robots_setup/data.sql +121 -0
- app/code/community/Ip/Robots/sql/robots_setup/mysql4-install-1.0.0.php +54 -0
- app/etc/modules/Ip_Robots.xml +9 -0
- package.xml +18 -0
- skin/frontend/base/default/ip_robots/Untitled-1.jpg +0 -0
- skin/frontend/base/default/ip_robots/logo.png +0 -0
- skin/frontend/base/default/ip_robots/megamenu.png +0 -0
- skin/frontend/base/default/ip_robots/megamenu_box.png +0 -0
- skin/frontend/base/default/ip_robots/menu_box.jpg +0 -0
- skin/frontend/base/default/ip_robots/module-box-menu2.png +0 -0
- skin/frontend/base/default/ip_robots/promo.jpg +0 -0
- skin/frontend/base/default/ip_robots/sidebar_megamenu.png +0 -0
- skin/frontend/base/default/ip_robots/tee.png +0 -0
app/code/community/Ip/Robots/Block/Admin/Item.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Aug 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com
|
5 |
+
* Copyright Proskuryakov Ivan. Ip.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Ip_Robots_Block_Admin_Item extends Mage_Adminhtml_Block_Widget_Grid_Container
|
12 |
+
{
|
13 |
+
|
14 |
+
public function __construct()
|
15 |
+
{
|
16 |
+
$this->_controller = 'admin_item';
|
17 |
+
$this->_blockGroup = 'robots';
|
18 |
+
$this->_headerText = Mage::helper('robots')->__('Robots.txt rules');
|
19 |
+
$this->_addButtonLabel = Mage::helper('robots')->__('New Rule');
|
20 |
+
parent::__construct();
|
21 |
+
$previewurl = Mage::helper('robots')->RobotsPreviewUrl();
|
22 |
+
$generateurl = Mage::helper('robots')->RobotsGenerateUrl();
|
23 |
+
$installrobotsrules = Mage::helper('robots')->RobotsInstall();
|
24 |
+
|
25 |
+
$this->_addButton('generate', array(
|
26 |
+
'label' => 'Preview rules in pop-up',
|
27 |
+
'onclick' => "window.open('".$previewurl."','Preview','width=900,height=600')",
|
28 |
+
'class' => 'generate',
|
29 |
+
));
|
30 |
+
$this->_addButton('buildrobotsfile', array(
|
31 |
+
'label' => 'Create and generate robots.txt',
|
32 |
+
'onclick' => 'setLocation(\'' . $generateurl .'\')',
|
33 |
+
'class' => 'buildrobotsfile',
|
34 |
+
));
|
35 |
+
$this->_addButton('installrobotsrules', array(
|
36 |
+
'label' => 'Install standard rules for my Magento',
|
37 |
+
'onclick' => 'setLocation(\'' . $installrobotsrules .'\')',
|
38 |
+
'class' => 'installrobotsrules',
|
39 |
+
));
|
40 |
+
}
|
41 |
+
protected function _prepareLayout()
|
42 |
+
{
|
43 |
+
// $block = $this->getLayout()->createBlock(
|
44 |
+
// 'Mage_Core_Block_Template',
|
45 |
+
// 'my_block_name_here',
|
46 |
+
// array('template' => 'widget/grid.phtml')
|
47 |
+
// );
|
48 |
+
//
|
49 |
+
// if ($block){
|
50 |
+
// $this->getLayout()->getBlock('content')->insert($block)->toHtml();
|
51 |
+
// }else{
|
52 |
+
// echo "no block";
|
53 |
+
// }
|
54 |
+
parent::_prepareLayout();
|
55 |
+
|
56 |
+
}
|
57 |
+
|
58 |
+
}
|
app/code/community/Ip/Robots/Block/Admin/Item/Edit.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Aug 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com
|
5 |
+
* Copyright Proskuryakov Ivan. Ip.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Ip_Robots_Block_Admin_Item_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
12 |
+
{
|
13 |
+
|
14 |
+
public function __construct()
|
15 |
+
{
|
16 |
+
$this->_objectId = 'item_id';
|
17 |
+
$this->_controller = 'admin_item';
|
18 |
+
$this->_blockGroup = 'robots';
|
19 |
+
|
20 |
+
parent::__construct();
|
21 |
+
|
22 |
+
$this->_updateButton('save', 'label', Mage::helper('robots')->__('Save Item'));
|
23 |
+
$this->_updateButton('delete', 'label', Mage::helper('robots')->__('Delete Item'));
|
24 |
+
|
25 |
+
$this->_addButton('saveandcontinue', array(
|
26 |
+
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
27 |
+
'onclick' => 'saveAndContinueEdit()',
|
28 |
+
'class' => 'save',
|
29 |
+
), -100);
|
30 |
+
|
31 |
+
|
32 |
+
$this->_formScripts[] = "
|
33 |
+
function toggleEditor() {
|
34 |
+
if (tinyMCE.getInstanceById('block_content') == null) {
|
35 |
+
tinyMCE.execCommand('mceAddControl', false, 'block_content');
|
36 |
+
} else {
|
37 |
+
tinyMCE.execCommand('mceRemoveControl', false, 'block_content');
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
function saveAndContinueEdit(){
|
42 |
+
editForm.submit($('edit_form').action+'back/edit/');
|
43 |
+
}
|
44 |
+
|
45 |
+
";
|
46 |
+
}
|
47 |
+
|
48 |
+
public function getHeaderText()
|
49 |
+
{
|
50 |
+
if (Mage::registry('robots_item')->getId()) {
|
51 |
+
return Mage::helper('robots')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('robots_item')->getTitle()));
|
52 |
+
}
|
53 |
+
else {
|
54 |
+
return Mage::helper('robots')->__('New Item');
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
}
|
app/code/community/Ip/Robots/Block/Admin/Item/Edit/Form.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Aug 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com
|
5 |
+
* Copyright Proskuryakov Ivan. Ip.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Ip_Robots_Block_Admin_Item_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
12 |
+
{
|
13 |
+
|
14 |
+
|
15 |
+
protected function _prepareLayout() {
|
16 |
+
parent::_prepareLayout();
|
17 |
+
if (Mage::helper('robots')->versionUseWysiwig()) {
|
18 |
+
if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
|
19 |
+
$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
|
20 |
+
|
21 |
+
$this->getLayout()->getBlock('head')->addJs('mage/adminhtml/variables.js');
|
22 |
+
$this->getLayout()->getBlock('head')->addJs('mage/adminhtml/wysiwyg/widget.js');
|
23 |
+
$this->getLayout()->getBlock('head')->addJs('lib/flex.js');
|
24 |
+
$this->getLayout()->getBlock('head')->addJs('lib/FABridge.js');
|
25 |
+
$this->getLayout()->getBlock('head')->addJs('mage/adminhtml/flexuploader.js');
|
26 |
+
$this->getLayout()->getBlock('head')->addJs('mage/adminhtml/browser.js');
|
27 |
+
$this->getLayout()->getBlock('head')->addJs('extjs/ext-tree.js');
|
28 |
+
$this->getLayout()->getBlock('head')->addJs('extjs/ext-tree-checkbox.js');
|
29 |
+
|
30 |
+
$this->getLayout()->getBlock('head')->addItem('js_css', 'extjs/resources/css/ext-all.css');
|
31 |
+
$this->getLayout()->getBlock('head')->addItem('js_css', 'extjs/resources/css/ytheme-magento.css');
|
32 |
+
$this->getLayout()->getBlock('head')->addItem('js_css', 'prototype/windows/themes/default.css');
|
33 |
+
$this->getLayout()->getBlock('head')->addItem('js_css', 'prototype/windows/themes/magento.css');
|
34 |
+
}
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
protected function _prepareForm()
|
39 |
+
{
|
40 |
+
$form = new Varien_Data_Form(array(
|
41 |
+
'id' => 'edit_form',
|
42 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
43 |
+
'method' => 'post',
|
44 |
+
'enctype' => 'multipart/form-data'
|
45 |
+
)
|
46 |
+
);
|
47 |
+
|
48 |
+
$form->setUseContainer(true);
|
49 |
+
$this->setForm($form);
|
50 |
+
return parent::_prepareForm();
|
51 |
+
}
|
52 |
+
}
|
app/code/community/Ip/Robots/Block/Admin/Item/Edit/Tab/Form.php
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Aug 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com
|
5 |
+
* Copyright Proskuryakov Ivan. Ip.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Ip_Robots_Block_Admin_Item_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
|
12 |
+
|
13 |
+
|
14 |
+
protected function _prepareForm() {
|
15 |
+
$model = Mage::registry('robots_item');
|
16 |
+
$form = new Varien_Data_Form(array('id' => 'edit_form_item', 'action' => $this->getData('action'), 'method' => 'post'));
|
17 |
+
$form->setHtmlIdPrefix('item_');
|
18 |
+
$fieldset = $form->addFieldset('base_fieldset', array('legend' => Mage::helper('robots')->__('General Information'), 'class' => 'fieldset-wide'));
|
19 |
+
if ($model->getItemId()) {
|
20 |
+
$fieldset->addField('item_id', 'hidden', array(
|
21 |
+
'name' => 'item_id',
|
22 |
+
));
|
23 |
+
}
|
24 |
+
|
25 |
+
// if (!Mage::app()->isSingleStoreMode()) {
|
26 |
+
// $fieldset->addField('store_id', 'multiselect', array(
|
27 |
+
// 'name' => 'stores[]',
|
28 |
+
// 'label' => Mage::helper('robots')->__('Store View'),
|
29 |
+
// 'title' => Mage::helper('robots')->__('Store View'),
|
30 |
+
// 'required' => true,
|
31 |
+
// 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),
|
32 |
+
// 'style' => 'height:150px',
|
33 |
+
// ));
|
34 |
+
// } else {
|
35 |
+
// $fieldset->addField('store_id', 'hidden', array(
|
36 |
+
// 'name' => 'stores[]',
|
37 |
+
// 'value' => Mage::app()->getStore(true)->getId()
|
38 |
+
// ));
|
39 |
+
// $model->setStoreId(Mage::app()->getStore(true)->getId());
|
40 |
+
// }
|
41 |
+
|
42 |
+
|
43 |
+
$fieldset->addField('type', 'select', array(
|
44 |
+
'label' => Mage::helper('robots')->__('Type'),
|
45 |
+
'title' => Mage::helper('robots')->__('Type'),
|
46 |
+
'name' => 'type',
|
47 |
+
'required' => true,
|
48 |
+
'options' => array(
|
49 |
+
'1' => Mage::helper('robots')->__('Allow'),
|
50 |
+
'0' => Mage::helper('robots')->__('Disallow'),
|
51 |
+
),
|
52 |
+
));
|
53 |
+
|
54 |
+
$fieldset->addField('url', 'text', array(
|
55 |
+
'name' => 'url',
|
56 |
+
'label' => Mage::helper('robots')->__('Url'),
|
57 |
+
'title' => Mage::helper('robots')->__('Url'),
|
58 |
+
'required' => false,
|
59 |
+
));
|
60 |
+
|
61 |
+
$fieldset->addField('comment', 'text', array(
|
62 |
+
'name' => 'comment',
|
63 |
+
'label' => Mage::helper('robots')->__('Comment'),
|
64 |
+
'title' => Mage::helper('robots')->__('Comment'),
|
65 |
+
'required' => false,
|
66 |
+
));
|
67 |
+
|
68 |
+
$fieldset->addField('is_active', 'select', array(
|
69 |
+
'label' => Mage::helper('robots')->__('Status'),
|
70 |
+
'title' => Mage::helper('robots')->__('Status'),
|
71 |
+
'name' => 'is_active',
|
72 |
+
'required' => true,
|
73 |
+
'options' => array(
|
74 |
+
'1' => Mage::helper('robots')->__('Enabled'),
|
75 |
+
'0' => Mage::helper('robots')->__('Disabled'),
|
76 |
+
),
|
77 |
+
));
|
78 |
+
|
79 |
+
if (Mage::helper('robots')->versionUseWysiwig()) {
|
80 |
+
$wysiwygConfig = Mage::getSingleton('robots/wysiwyg_config')->getConfig();
|
81 |
+
} else {
|
82 |
+
$wysiwygConfig = '';
|
83 |
+
}
|
84 |
+
|
85 |
+
// print_r($model->getData());
|
86 |
+
// exit();
|
87 |
+
// $form->setUseContainer(true);
|
88 |
+
$form->setValues($model->getData());
|
89 |
+
$this->setForm($form);
|
90 |
+
|
91 |
+
return parent::_prepareForm();
|
92 |
+
}
|
93 |
+
|
94 |
+
}
|
app/code/community/Ip/Robots/Block/Admin/Item/Edit/Tab/Other.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Aug 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com
|
5 |
+
* Copyright Proskuryakov Ivan. Ip.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
class Ip_Robots_Block_Admin_Item_Edit_Tab_Other extends Mage_Adminhtml_Block_Widget_Form
|
11 |
+
{
|
12 |
+
protected function _prepareForm()
|
13 |
+
{
|
14 |
+
$model = Mage::registry('robots_item');
|
15 |
+
$form = new Varien_Data_Form();
|
16 |
+
$this->setForm($form);
|
17 |
+
$fieldset = $form->addFieldset('additional_form', array('legend'=>Mage::helper('robots')->__('Additional information ')));
|
18 |
+
|
19 |
+
|
20 |
+
|
21 |
+
$fieldset->addField('samplefield', 'text', array(
|
22 |
+
'name' => 'samplefield',
|
23 |
+
'label' => Mage::helper('robots')->__('Samplefield'),
|
24 |
+
'title' => Mage::helper('robots')->__('Samplefield'),
|
25 |
+
'required' => false,
|
26 |
+
));
|
27 |
+
|
28 |
+
// $form->setUseContainer(true);
|
29 |
+
$form->setValues($model->getData());
|
30 |
+
$this->setForm($form);
|
31 |
+
|
32 |
+
return parent::_prepareForm();
|
33 |
+
}
|
34 |
+
}
|
app/code/community/Ip/Robots/Block/Admin/Item/Edit/Tabs.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Aug 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com
|
5 |
+
* Copyright Proskuryakov Ivan. Ip.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Ip_Robots_Block_Admin_Item_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
|
12 |
+
|
13 |
+
public function __construct() {
|
14 |
+
parent::__construct();
|
15 |
+
$this->setId('robots_tabs');
|
16 |
+
$this->setDestElementId('edit_form');
|
17 |
+
$this->setTitle(Mage::helper('robots')->__('Item Information'));
|
18 |
+
}
|
19 |
+
|
20 |
+
protected function _beforeToHtml() {
|
21 |
+
$this->addTab('form_section_item', array(
|
22 |
+
'label' => Mage::helper('robots')->__('Item Information'),
|
23 |
+
'title' => Mage::helper('robots')->__('Item Information'),
|
24 |
+
'content' => $this->getLayout()->createBlock('robots/admin_item_edit_tab_form')->toHtml(),
|
25 |
+
));
|
26 |
+
// $this->addTab('form_section_other', array(
|
27 |
+
// 'label' => Mage::helper('robots')->__('Item Information additional'),
|
28 |
+
// 'title' => Mage::helper('robots')->__('Item Information additional'),
|
29 |
+
// 'content' => $this->getLayout()->createBlock('robots/admin_item_edit_tab_other')->toHtml(),
|
30 |
+
// ));
|
31 |
+
|
32 |
+
return parent::_beforeToHtml();
|
33 |
+
}
|
34 |
+
|
35 |
+
}
|
app/code/community/Ip/Robots/Block/Admin/Item/Grid.php
ADDED
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Aug 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com
|
5 |
+
* Copyright Proskuryakov Ivan. Ip.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Ip_Robots_Block_Admin_Item_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
12 |
+
|
13 |
+
public function __construct() {
|
14 |
+
parent::__construct();
|
15 |
+
$this->setId('RobotsGrid');
|
16 |
+
$this->setDefaultSort('position');
|
17 |
+
$this->setDefaultDir('ASC');
|
18 |
+
}
|
19 |
+
|
20 |
+
protected function _prepareCollection() {
|
21 |
+
$collection = Mage::getModel('robots/item')->getCollection();
|
22 |
+
$this->setCollection($collection);
|
23 |
+
return parent::_prepareCollection();
|
24 |
+
}
|
25 |
+
|
26 |
+
protected function _prepareColumns() {
|
27 |
+
|
28 |
+
$baseUrl = $this->getUrl();
|
29 |
+
$this->addColumn('item_id', array(
|
30 |
+
'header' => Mage::helper('robots')->__('ID'),
|
31 |
+
'align' => 'left',
|
32 |
+
'width' => '30px',
|
33 |
+
'index' => 'item_id',
|
34 |
+
));
|
35 |
+
|
36 |
+
$this->addColumn('type', array(
|
37 |
+
'header' => Mage::helper('robots')->__('Type'),
|
38 |
+
'index' => 'type',
|
39 |
+
'type' => 'options',
|
40 |
+
'options' => array(
|
41 |
+
'1' => Mage::helper('robots')->__('Allow'),
|
42 |
+
'0' => Mage::helper('robots')->__('Disallow'),
|
43 |
+
),
|
44 |
+
));
|
45 |
+
$this->addColumn('url', array(
|
46 |
+
'header' => Mage::helper('robots')->__('Url'),
|
47 |
+
'align' => 'left',
|
48 |
+
'index' => 'url',
|
49 |
+
));
|
50 |
+
$this->addColumn('comment', array(
|
51 |
+
'header' => Mage::helper('robots')->__('Comment'),
|
52 |
+
'align' => 'left',
|
53 |
+
'index' => 'comment',
|
54 |
+
));
|
55 |
+
|
56 |
+
$this->addColumn('is_active', array(
|
57 |
+
'header' => Mage::helper('robots')->__('Status'),
|
58 |
+
'index' => 'is_active',
|
59 |
+
'type' => 'options',
|
60 |
+
'options' => array(
|
61 |
+
0 => Mage::helper('robots')->__('Disabled'),
|
62 |
+
1 => Mage::helper('robots')->__('Enabled'),
|
63 |
+
),
|
64 |
+
));
|
65 |
+
|
66 |
+
$this->addColumn('action',
|
67 |
+
array(
|
68 |
+
'header' => Mage::helper('robots')->__('Action'),
|
69 |
+
'index' => 'item_id',
|
70 |
+
'sortable' => false,
|
71 |
+
'filter' => false,
|
72 |
+
'no_link' => true,
|
73 |
+
'width' => '100px',
|
74 |
+
'renderer' => 'robots/admin_item_grid_renderer_action'
|
75 |
+
));
|
76 |
+
$this->addExportType('*/*/exportCsv', Mage::helper('robots')->__('CSV'));
|
77 |
+
$this->addExportType('*/*/exportXml', Mage::helper('robots')->__('XML'));
|
78 |
+
return parent::_prepareColumns();
|
79 |
+
}
|
80 |
+
|
81 |
+
protected function _afterLoadCollection() {
|
82 |
+
$this->getCollection()->walk('afterLoad');
|
83 |
+
parent::_afterLoadCollection();
|
84 |
+
}
|
85 |
+
|
86 |
+
protected function _filterStoreCondition($collection, $column) {
|
87 |
+
if (!$value = $column->getFilter()->getValue()) {
|
88 |
+
return;
|
89 |
+
}
|
90 |
+
$this->getCollection()->addStoreFilter($value);
|
91 |
+
}
|
92 |
+
|
93 |
+
protected function _prepareMassaction() {
|
94 |
+
$this->setMassactionIdField('item_id');
|
95 |
+
$this->getMassactionBlock()->setFormFieldName('massaction');
|
96 |
+
$this->getMassactionBlock()->addItem('delete', array(
|
97 |
+
'label' => Mage::helper('robots')->__('Delete'),
|
98 |
+
'url' => $this->getUrl('*/*/massDelete'),
|
99 |
+
'confirm' => Mage::helper('robots')->__('Are you sure?')
|
100 |
+
));
|
101 |
+
|
102 |
+
$this->getMassactionBlock()->addItem('status', array(
|
103 |
+
'label' => Mage::helper('robots')->__('Change status'),
|
104 |
+
'url' => $this->getUrl('*/*/massStatus', array('_current' => true)),
|
105 |
+
'additional' => array(
|
106 |
+
'visibility' => array(
|
107 |
+
'name' => 'status',
|
108 |
+
'type' => 'select',
|
109 |
+
'class' => 'required-entry',
|
110 |
+
'label' => Mage::helper('robots')->__('Status'),
|
111 |
+
'values' => array(
|
112 |
+
0 => Mage::helper('robots')->__('Disabled'),
|
113 |
+
1 => Mage::helper('robots')->__('Enabled'),
|
114 |
+
),
|
115 |
+
)
|
116 |
+
)
|
117 |
+
));
|
118 |
+
return $this;
|
119 |
+
}
|
120 |
+
|
121 |
+
public function getRowUrl($row) {
|
122 |
+
return $this->getUrl('*/*/edit', array('item_id' => $row->getId()));
|
123 |
+
}
|
124 |
+
|
125 |
+
}
|
app/code/community/Ip/Robots/Block/Admin/Item/Grid/Renderer/Action.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
L;<?php
|
2 |
+
/*
|
3 |
+
* Created on Aug 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com
|
5 |
+
* Copyright Proskuryakov Ivan. Ip.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
|
12 |
+
class Ip_Robots_Block_Admin_Item_Grid_Renderer_Action extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action
|
13 |
+
{
|
14 |
+
public function render(Varien_Object $row)
|
15 |
+
{
|
16 |
+
|
17 |
+
$actions[] = array(
|
18 |
+
'url' => $this->getUrl('*/*/edit', array('item_id' => $row->getId())),
|
19 |
+
'caption' => Mage::helper('robots')->__('Edit')
|
20 |
+
);
|
21 |
+
|
22 |
+
$actions[] = array(
|
23 |
+
'url' => $this->getUrl('*/*/delete', array('item_id' => $row->getId())),
|
24 |
+
'caption' => Mage::helper('robots')->__('Delete'),
|
25 |
+
'confirm' => Mage::helper('robots')->__('Are you sure you want to delete this item ?')
|
26 |
+
);
|
27 |
+
|
28 |
+
$this->getColumn()->setActions($actions);
|
29 |
+
|
30 |
+
return parent::render($row);
|
31 |
+
}
|
32 |
+
}
|
app/code/community/Ip/Robots/Block/Developer.php
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ip_Robots_Block_Developer extends Mage_Adminhtml_Block_System_Config_Form_Fieldset {
|
4 |
+
|
5 |
+
public function render(Varien_Data_Form_Element_Abstract $element) {
|
6 |
+
$content = '<p></p>';
|
7 |
+
$content.= '<style>';
|
8 |
+
$content.= '.developer {
|
9 |
+
background:#FAFAFA;
|
10 |
+
border: 1px solid #CCCCCC;
|
11 |
+
margin-bottom: 10px;
|
12 |
+
padding: 10px;
|
13 |
+
height:auto;
|
14 |
+
|
15 |
+
}
|
16 |
+
.developer h3 {
|
17 |
+
color: #EA7601;
|
18 |
+
}
|
19 |
+
.contact-type {
|
20 |
+
color: #EA7601;
|
21 |
+
font-weight:bold;
|
22 |
+
}
|
23 |
+
.developer img {
|
24 |
+
|
25 |
+
float:left;
|
26 |
+
height:255px;
|
27 |
+
width:220px;
|
28 |
+
}
|
29 |
+
.developer .info {
|
30 |
+
border: 1px solid #CCCCCC;
|
31 |
+
background:#E7EFEF;
|
32 |
+
padding: 5px 10px 0 5px;
|
33 |
+
margin-left:230px;
|
34 |
+
height:250px;
|
35 |
+
}
|
36 |
+
';
|
37 |
+
$content.= '</style>';
|
38 |
+
|
39 |
+
|
40 |
+
$content.= '<div class="developer">';
|
41 |
+
$content.= '<a href="http://www.ecommerceoffice.com/" target="_blank"><img src="'.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN).'frontend/base/default/ip_robots/promo.jpg" alt="www.ecommerceoffice.com" /></a>';
|
42 |
+
$content.= '<div class="info">';
|
43 |
+
$content.= '<h3>PROFESSIONAL MAGENTO DEVELOPMENT</h3>';
|
44 |
+
$content.= '<p>EcommerceOffice provide premium services for Business, Corporate built with the latest innovations in web-development and SEO niche. You will pay less to go live with our wide range of solutions and services.<br/>';
|
45 |
+
$content.= 'If you need Magento development , please contact us.</p>';
|
46 |
+
$content.= '--------------------------------------------------------<br>';
|
47 |
+
$content.= '<span class="contact-type">Website:</span> <a href="http://www.ecommerceoffice.com/" target="_blank">www.ecommerceoffice.com</a> <br/>';
|
48 |
+
$content.= '<span class="contact-type">E-mail:</span> volgodark@gmail.com / office.commerce@gmail.com<br/>';
|
49 |
+
$content.= '<span class="contact-type">Skype:</span> volgodark <br/>';
|
50 |
+
$content.= '<span class="contact-type">Phone:</span> +7 988024 1612 / +7 909389 2222 <br/>';
|
51 |
+
$content.= '<span class="contact-type">Facebook:</span> <a href="http://www.facebook.com/ivan.proskuryakov" target="_blank">visit</a> <br/>';
|
52 |
+
$content.= '<span class="contact-type">LinkedIn:</span> <a href="http://www.linkedin.com/pub/ivan-proskuryakov/31/200/316" target="_blank">visit</a> <br/>';
|
53 |
+
|
54 |
+
$content.= '</div>';
|
55 |
+
|
56 |
+
$content.= '</div>';
|
57 |
+
|
58 |
+
return $content;
|
59 |
+
|
60 |
+
|
61 |
+
}
|
62 |
+
|
63 |
+
|
64 |
+
}
|
app/code/community/Ip/Robots/Helper/Data.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Aug 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com
|
5 |
+
* Copyright Proskuryakov Ivan. Ip.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php class Ip_Robots_Helper_Data extends Mage_Core_Helper_Abstract {
|
10 |
+
|
11 |
+
public function versionUseAdminTitle() {
|
12 |
+
$info = explode('.', Mage::getVersion());
|
13 |
+
if ($info[0] > 1) {
|
14 |
+
return true;
|
15 |
+
}
|
16 |
+
if ($info[1] > 3) {
|
17 |
+
return true;
|
18 |
+
}
|
19 |
+
return false;
|
20 |
+
}
|
21 |
+
|
22 |
+
public function versionUseWysiwig() {
|
23 |
+
$info = explode('.', Mage::getVersion());
|
24 |
+
if ($info[0] > 1) {
|
25 |
+
return true;
|
26 |
+
}
|
27 |
+
if ($info[1] > 3) {
|
28 |
+
return true;
|
29 |
+
}
|
30 |
+
return false;
|
31 |
+
}
|
32 |
+
|
33 |
+
public function RobotsPreviewUrl() {
|
34 |
+
return Mage::helper('adminhtml')->getUrl('*/admin_item/preview/');
|
35 |
+
}
|
36 |
+
public function RobotsGenerateUrl() {
|
37 |
+
return Mage::helper('adminhtml')->getUrl('*/admin_item/generatefile/');
|
38 |
+
}
|
39 |
+
|
40 |
+
public function RobotsInstall() {
|
41 |
+
return Mage::helper('adminhtml')->getUrl('*/admin_item/install/');
|
42 |
+
}
|
43 |
+
|
44 |
+
|
45 |
+
}
|
app/code/community/Ip/Robots/Model/Data.php
ADDED
@@ -0,0 +1,140 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Aug 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com
|
5 |
+
* Copyright Proskuryakov Ivan. Ip.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
Class Ip_Robots_Model_Data {
|
11 |
+
|
12 |
+
protected function getItemModel() {
|
13 |
+
return Mage::getModel('robots/item');
|
14 |
+
}
|
15 |
+
|
16 |
+
public function AdditionalRobotsCrawlers()
|
17 |
+
{
|
18 |
+
$lines = '';
|
19 |
+
if (Mage::getStoreConfig('robots/options/googlebot')) {
|
20 |
+
$lines.= '# ------------------ googlebot ------------------'.'<br>';
|
21 |
+
$lines.= 'User-agent: googlebot'.'<br>';
|
22 |
+
$lines.= 'Disallow: /'.'<br>';
|
23 |
+
}
|
24 |
+
if (Mage::getStoreConfig('robots/options/yandex')) {
|
25 |
+
$lines.= '# ------------------ yandex ------------------'.'<br>';
|
26 |
+
$lines.= 'User-agent: yandex'.'<br>';
|
27 |
+
$lines.= 'Disallow: /'.'<br>';
|
28 |
+
}
|
29 |
+
if (Mage::getStoreConfig('robots/options/googlebotimage')) {
|
30 |
+
$lines.= '# ------------------ googlebotimage ------------------'.'<br>';
|
31 |
+
$lines.= 'User-agent: googlebotimage'.'<br>';
|
32 |
+
$lines.= 'Disallow: /'.'<br>';
|
33 |
+
}
|
34 |
+
if (Mage::getStoreConfig('robots/options/googlebotmobile')) {
|
35 |
+
$lines.= '# ------------------ googlebotmobile ------------------'.'<br>';
|
36 |
+
$lines.= 'User-agent: googlebotmobile'.'<br>';
|
37 |
+
$lines.= 'Disallow: /'.'<br>';
|
38 |
+
}
|
39 |
+
if (Mage::getStoreConfig('robots/options/msnbot')) {
|
40 |
+
$lines.= '# ------------------ msnbot ------------------'.'<br>';
|
41 |
+
$lines.= 'User-agent: msnbot'.'<br>';
|
42 |
+
$lines.= 'Disallow: /'.'<br>';
|
43 |
+
}
|
44 |
+
if (Mage::getStoreConfig('robots/options/slurp')) {
|
45 |
+
$lines.= '# ------------------ slurp ------------------'.'<br>';
|
46 |
+
$lines.= 'User-agent: slurp'.'<br>';
|
47 |
+
$lines.= 'Disallow: /'.'<br>';
|
48 |
+
}
|
49 |
+
if (Mage::getStoreConfig('robots/options/teoma')) {
|
50 |
+
$lines.= '# ------------------ teoma ------------------'.'<br>';
|
51 |
+
$lines.= 'User-agent: teoma'.'<br>';
|
52 |
+
$lines.= 'Disallow: /'.'<br>';
|
53 |
+
}
|
54 |
+
if (Mage::getStoreConfig('robots/options/twiceler')) {
|
55 |
+
$lines.= '# ------------------ twiceler ------------------'.'<br>';
|
56 |
+
$lines.= 'User-agent: twiceler'.'<br>';
|
57 |
+
$lines.= 'Disallow: /'.'<br>';
|
58 |
+
}
|
59 |
+
if (Mage::getStoreConfig('robots/options/gigabot')) {
|
60 |
+
$lines.= '# ------------------ gigabot ------------------'.'<br>';
|
61 |
+
$lines.= 'User-agent: gigabot'.'<br>';
|
62 |
+
$lines.= 'Disallow: /'.'<br>';
|
63 |
+
}
|
64 |
+
if (Mage::getStoreConfig('robots/options/twiceler')) {
|
65 |
+
$lines.= '# ------------------ twiceler ------------------'.'<br>';
|
66 |
+
$lines.= 'User-agent: twiceler'.'<br>';
|
67 |
+
$lines.= 'Disallow: /'.'<br>';
|
68 |
+
}
|
69 |
+
if (Mage::getStoreConfig('robots/options/scrubby')) {
|
70 |
+
$lines.= '# ------------------ scrubby ------------------'.'<br>';
|
71 |
+
$lines.= 'User-agent: scrubby'.'<br>';
|
72 |
+
$lines.= 'Disallow: /'.'<br>';
|
73 |
+
}
|
74 |
+
if (Mage::getStoreConfig('robots/options/robozilla')) {
|
75 |
+
$lines.= '# ------------------ robozilla ------------------'.'<br>';
|
76 |
+
$lines.= 'User-agent: robozilla'.'<br>';
|
77 |
+
$lines.= 'Disallow: /'.'<br>';
|
78 |
+
}
|
79 |
+
if (Mage::getStoreConfig('robots/options/nutch')) {
|
80 |
+
$lines.= '# ------------------ nutch ------------------'.'<br>';
|
81 |
+
$lines.= 'User-agent: nutch'.'<br>';
|
82 |
+
$lines.= 'Disallow: /'.'<br>';
|
83 |
+
}
|
84 |
+
if (Mage::getStoreConfig('robots/options/robozilla')) {
|
85 |
+
$lines.= '# ------------------ robozilla ------------------'.'<br>';
|
86 |
+
$lines.= 'User-agent: robozilla'.'<br>';
|
87 |
+
$lines.= 'Disallow: /'.'<br>';
|
88 |
+
}
|
89 |
+
if (Mage::getStoreConfig('robots/options/iaarchiver')) {
|
90 |
+
$lines.= '# ------------------ iaarchiver ------------------'.'<br>';
|
91 |
+
$lines.= 'User-agent: iaarchiver'.'<br>';
|
92 |
+
$lines.= 'Disallow: /'.'<br>';
|
93 |
+
}
|
94 |
+
if (Mage::getStoreConfig('robots/options/baiduspider')) {
|
95 |
+
$lines.= '# ------------------ baiduspider ------------------'.'<br>';
|
96 |
+
$lines.= 'User-agent: baiduspider'.'<br>';
|
97 |
+
$lines.= 'Disallow: /'.'<br>';
|
98 |
+
}
|
99 |
+
if (Mage::getStoreConfig('robots/options/naverbot')) {
|
100 |
+
$lines.= '# ------------------ naverbot ------------------'.'<br>';
|
101 |
+
$lines.= 'User-agent: naverbot'.'<br>';
|
102 |
+
$lines.= 'Disallow: /'.'<br>';
|
103 |
+
}
|
104 |
+
if (Mage::getStoreConfig('robots/options/yeti')) {
|
105 |
+
$lines.= '# ------------------ yeti ------------------'.'<br>';
|
106 |
+
$lines.= 'User-agent: yeti'.'<br>';
|
107 |
+
$lines.= 'Disallow: /'.'<br>';
|
108 |
+
}
|
109 |
+
if (Mage::getStoreConfig('robots/options/yahoommcrawler')) {
|
110 |
+
$lines.= '# ------------------ yahoommcrawler ------------------'.'<br>';
|
111 |
+
$lines.= 'User-agent: yahoommcrawler'.'<br>';
|
112 |
+
$lines.= 'Disallow: /'.'<br>';
|
113 |
+
}
|
114 |
+
if (Mage::getStoreConfig('robots/options/psbot')) {
|
115 |
+
$lines.= '# ------------------ psbot ------------------'.'<br>';
|
116 |
+
$lines.= 'User-agent: psbot'.'<br>';
|
117 |
+
$lines.= 'Disallow: /'.'<br>';
|
118 |
+
}
|
119 |
+
if (Mage::getStoreConfig('robots/options/yahooblogs')) {
|
120 |
+
$lines.= '# ------------------ yahooblogs ------------------'.'<br>';
|
121 |
+
$lines.= 'User-agent: yahooblogs'.'<br>';
|
122 |
+
$lines.= 'Disallow: /'.'<br>';
|
123 |
+
}
|
124 |
+
|
125 |
+
return $lines;
|
126 |
+
}
|
127 |
+
//
|
128 |
+
// protected function getItemCollection() {
|
129 |
+
// $storeId = Mage::app()->getStore()->getId();
|
130 |
+
// $collection = $this->getItemModel()->getCollection();
|
131 |
+
// $collection->addFilter('is_active', 1);
|
132 |
+
// $collection->addStoreFilter($storeId);
|
133 |
+
// $collection->addOrder('position', 'ASC');
|
134 |
+
// return $collection;
|
135 |
+
// }
|
136 |
+
//
|
137 |
+
// public function getItems() {
|
138 |
+
// return $this->getItemCollection();
|
139 |
+
// }
|
140 |
+
}
|
app/code/community/Ip/Robots/Model/Item.php
ADDED
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Aug 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com
|
5 |
+
* Copyright Proskuryakov Ivan. Ip.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
class Ip_Robots_Model_Item extends Mage_Core_Model_Abstract
|
11 |
+
{
|
12 |
+
const CACHE_TAG = 'robots_admin_item';
|
13 |
+
protected $_cacheTag= 'robots_admin_item';
|
14 |
+
|
15 |
+
protected function _construct()
|
16 |
+
{
|
17 |
+
$this->_init('robots/item');
|
18 |
+
}
|
19 |
+
|
20 |
+
public function BuildRobotsData()
|
21 |
+
{
|
22 |
+
|
23 |
+
$robots ='';$rules = '';
|
24 |
+
$type=array(
|
25 |
+
'0'=>'Disallow',
|
26 |
+
'1'=>'Allow'
|
27 |
+
);
|
28 |
+
/*
|
29 |
+
* rules
|
30 |
+
*/
|
31 |
+
$rulesdata = Mage::getModel('robots/item')->getCollection();
|
32 |
+
foreach ($rulesdata as $r) {
|
33 |
+
if ($r->getIsActive()) {
|
34 |
+
$rules .= $type[$r['type']].': '.$r['url'].'<br>';
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
/*
|
39 |
+
* all
|
40 |
+
*/
|
41 |
+
if (Mage::getStoreConfig('robots/options/all')) {
|
42 |
+
$robots.= '# ------------------ ALL CRAWLERS [ENABLED] by www.ecommerceoffice.com ------------------'.'<br>';
|
43 |
+
$robots.= 'User-agent: *'.'<br>';
|
44 |
+
$delay = Mage::getStoreConfig('robots/options/delay');
|
45 |
+
if ( $delay != 'none') {
|
46 |
+
$delay ='Crawl-delay: '.$delay.'<br>' ;
|
47 |
+
$robots.=$delay;
|
48 |
+
}
|
49 |
+
$robots.= 'Disallow: '.'<br>';
|
50 |
+
|
51 |
+
|
52 |
+
$robots.=$rules;
|
53 |
+
} else {
|
54 |
+
$robots.= '# ------------------ ALL CRAWLERS [DISABLED] generated by www.ecommerceoffice.com ------------------'.'<br>';
|
55 |
+
$robots.= 'User-agent: *'.'<br>';
|
56 |
+
$robots.= 'Disallow: /'.'<br>';
|
57 |
+
}
|
58 |
+
|
59 |
+
$robots.=Mage::getSingleton('robots/data')->AdditionalRobotsCrawlers();
|
60 |
+
return $robots;
|
61 |
+
}
|
62 |
+
|
63 |
+
|
64 |
+
|
65 |
+
public function InstallRobots()
|
66 |
+
{
|
67 |
+
$coreResource = Mage::getSingleton('core/resource') ;
|
68 |
+
$write = $coreResource->getConnection('core_write');
|
69 |
+
$table = $coreResource->getTableName('ip_robots_item');
|
70 |
+
$sql ="TRUNCATE `".$table."`";
|
71 |
+
$write->query($sql);
|
72 |
+
|
73 |
+
$sql ="
|
74 |
+
-- ------------------------------------------------------
|
75 |
+
INSERT INTO `".$table."` (`type`, `url`, `comment`, `is_active`) VALUES
|
76 |
+
(0, '/404/', '# Directories', 1),
|
77 |
+
(0, '/app/', '# Directories', 1),
|
78 |
+
(0, '/manage/', '# Directories', 1),
|
79 |
+
(0, '/cgi-bin/', '# Directories', 1),
|
80 |
+
(0, '/downloader/', '# Directories', 1),
|
81 |
+
(0, '/includes/', '# Directories', 1),
|
82 |
+
(0, '/js/', '# Directories', 1),
|
83 |
+
(0, '/lib/', '# Directories', 1),
|
84 |
+
(0, '/magento/', '# Directories', 1),
|
85 |
+
(0, '/media/', '# Directories', 1),
|
86 |
+
(0, '/pkginfo/', '# Directories', 1),
|
87 |
+
(0, '/report/', '# Directories', 1),
|
88 |
+
(0, '/skin/', '# Directories', 1),
|
89 |
+
(0, '/stats/', '# Directories', 1),
|
90 |
+
(0, '/var/', '# Directories', 1),
|
91 |
+
";
|
92 |
+
$paths = "
|
93 |
+
(0, '/catalog/product_compare/', '# Paths', 1),
|
94 |
+
(0, '/catalog/category/view/', '# Paths', 1),
|
95 |
+
(0, '/catalog/product/view/', '# Paths', 1),
|
96 |
+
(0, '/catalog/product/gallery/', '# Paths', 1),
|
97 |
+
(0, '/catalogsearch/', '# Paths', 1),
|
98 |
+
(0, '/checkout/', '# Paths', 1),
|
99 |
+
(0, '/control/', '# Paths', 1),
|
100 |
+
(0, '/contacts/', '# Paths', 1),
|
101 |
+
(0, '/customer/', '# Paths', 1),
|
102 |
+
(0, '/customize/', '# Paths', 1),
|
103 |
+
(0, '/newsletter/', '# Paths', 1),
|
104 |
+
(0, '/poll/', '# Paths', 1),
|
105 |
+
(0, '/review/', '# Paths', 1),
|
106 |
+
";
|
107 |
+
if (Mage::getStoreConfig('web/url/use_store')) {
|
108 |
+
$stores = Mage::getModel('core/store')->getCollection();
|
109 |
+
foreach ($stores as $r) {
|
110 |
+
if ($r->getIsactive()) {
|
111 |
+
$store_code = $r->getCode();
|
112 |
+
$data = str_replace("0, '/", "0, '/".$store_code."/", $paths);
|
113 |
+
$sql.=$data;
|
114 |
+
}
|
115 |
+
}
|
116 |
+
} else {
|
117 |
+
$sql.=$paths;
|
118 |
+
}
|
119 |
+
|
120 |
+
$sql.= "
|
121 |
+
(0, '/sendfriend/', '# Paths', 1),
|
122 |
+
(0, '/tag/', '# Paths', 1),
|
123 |
+
(0, '/wishlist/', '# Paths', 1),
|
124 |
+
(0, '/index.php', '# Paths', 1),
|
125 |
+
(0, '/cron.php', '# Files', 1),
|
126 |
+
(0, '/cron.sh', '# Files', 1),
|
127 |
+
(0, '/error_log', '# Files', 1),
|
128 |
+
(0, '/install.php', '# Files', 1),
|
129 |
+
(0, '/LICENSE.html', '# Files', 1),
|
130 |
+
(0, '/LICENSE.txt', '# Files', 1),
|
131 |
+
(0, '/LICENSE_AFL.txt', '# Files', 1),
|
132 |
+
(0, '/STATUS.txt', '# Files', 1),
|
133 |
+
(0, '/get.php', '# Files (magento 1.5+ only)', 1),
|
134 |
+
(0, '/.js$', '# Clean urls', 1),
|
135 |
+
(0, '/?___from_store=', '# Clean urls', 1),
|
136 |
+
(0, '*___from_store=', '# Clean urls', 1),
|
137 |
+
(0, '/?mode=', '# Clean urls', 1),
|
138 |
+
(0, '/?limit=', '# Clean urls', 1),
|
139 |
+
(0, '/?dir=', '# Clean urls', 1),
|
140 |
+
(0, '/.css$', '# Clean urls', 1),
|
141 |
+
(0, '/.php$', '# Clean urls', 1),
|
142 |
+
(0, '/?p=*&', '# Clean urls', 1),
|
143 |
+
(0, '/?SID=', '# Clean urls', 1),
|
144 |
+
(0, '/.php$', '# Clean urls', 1),
|
145 |
+
(0, '/rss*', '# Clean urls', 1);
|
146 |
+
";
|
147 |
+
$write->query($sql);
|
148 |
+
}
|
149 |
+
|
150 |
+
|
151 |
+
|
152 |
+
}
|
app/code/community/Ip/Robots/Model/Mysql4/Item.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Aug 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com
|
5 |
+
* Copyright Proskuryakov Ivan. Ip.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Ip_Robots_Model_Mysql4_Item extends Mage_Core_Model_Mysql4_Abstract {
|
12 |
+
|
13 |
+
protected function _construct() {
|
14 |
+
$this->_init('robots/item', 'item_id');
|
15 |
+
}
|
16 |
+
|
17 |
+
}
|
app/code/community/Ip/Robots/Model/Mysql4/Item/Collection.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Aug 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com
|
5 |
+
* Copyright Proskuryakov Ivan. Ip.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Ip_Robots_Model_Mysql4_Item_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
12 |
+
|
13 |
+
protected function _construct() {
|
14 |
+
$this->_init('robots/item');
|
15 |
+
}
|
16 |
+
|
17 |
+
public function toOptionArray() {
|
18 |
+
return $this->_toOptionArray('item_id', 'name');
|
19 |
+
}
|
20 |
+
|
21 |
+
}
|
app/code/community/Ip/Robots/Model/Source/Crawldelay.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Aug 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com
|
5 |
+
* Copyright Proskuryakov Ivan. Ip.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Ip_Robots_Model_Source_Crawldelay {
|
12 |
+
|
13 |
+
public function toOptionArray() {
|
14 |
+
return array(
|
15 |
+
array('value' => 'none', 'label' => Mage::helper('robots')->__('No delay')),
|
16 |
+
array('value' => '5', 'label' => Mage::helper('robots')->__('5 seconds')),
|
17 |
+
array('value' => '10', 'label' => Mage::helper('robots')->__('10 seconds')),
|
18 |
+
array('value' => '20', 'label' => Mage::helper('robots')->__('20 seconds')),
|
19 |
+
array('value' => '60', 'label' => Mage::helper('robots')->__('60 seconds')),
|
20 |
+
array('value' => '120', 'label' => Mage::helper('robots')->__('120 seconds')),
|
21 |
+
|
22 |
+
);
|
23 |
+
}
|
24 |
+
|
25 |
+
}
|
app/code/community/Ip/Robots/Model/Wysiwyg/Config.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Aug 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com
|
5 |
+
* Copyright Proskuryakov Ivan. Ip.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Ip_Robots_Model_Wysiwyg_Config extends Mage_Cms_Model_Wysiwyg_Config {
|
12 |
+
|
13 |
+
public function getConfig($data = array()) {
|
14 |
+
|
15 |
+
|
16 |
+
$config = parent::getConfig($data);
|
17 |
+
$config->setData('files_browser_window_url', Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index/'));
|
18 |
+
$config->setData('directives_url', Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg/directive'));
|
19 |
+
$config->setData('directives_url_quoted', preg_quote($config->getData('directives_url')));
|
20 |
+
$config->setData('widget_window_url', Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/widget/index'));
|
21 |
+
|
22 |
+
|
23 |
+
return $config;
|
24 |
+
}
|
25 |
+
|
26 |
+
}
|
app/code/community/Ip/Robots/controllers/Admin/ItemController.php
ADDED
@@ -0,0 +1,242 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Aug 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com
|
5 |
+
* Copyright Proskuryakov Ivan. Ip.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Ip_Robots_Admin_ItemController extends Mage_Adminhtml_Controller_Action {
|
12 |
+
|
13 |
+
protected function _initAction() {
|
14 |
+
$this->loadLayout()
|
15 |
+
->_setActiveMenu('ip/robots')
|
16 |
+
->_addBreadcrumb(Mage::helper('robots')->__('Robots'), Mage::helper('robots')->__('Robots'))
|
17 |
+
->_addBreadcrumb(Mage::helper('robots')->__('Robots Items'), Mage::helper('robots')->__('Robots Items'))
|
18 |
+
;
|
19 |
+
return $this;
|
20 |
+
}
|
21 |
+
|
22 |
+
public function indexAction() {
|
23 |
+
$this->_initAction()
|
24 |
+
->_addContent($this->getLayout()->createBlock('robots/admin_item'))
|
25 |
+
->_addContent($this->getLayout()->createBlock('core/template')->setTemplate('robots_developer.phtml'))
|
26 |
+
->renderLayout();
|
27 |
+
}
|
28 |
+
|
29 |
+
public function newAction() {
|
30 |
+
$this->_forward('edit');
|
31 |
+
}
|
32 |
+
public function installAction() {
|
33 |
+
Mage::getModel('robots/item')->InstallRobots();
|
34 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('robots')->__('Standard rules was successfully installed!'));
|
35 |
+
$this->_redirect('*/*/');
|
36 |
+
}
|
37 |
+
|
38 |
+
public function generatefileAction() {
|
39 |
+
$baseDir = Mage::getBaseDir();
|
40 |
+
$File = $baseDir.DS."robots.txt";
|
41 |
+
$handle = fopen($File, 'w');
|
42 |
+
$data = Mage::getModel('robots/item')->BuildRobotsData();
|
43 |
+
$data = str_replace("<br>", "\n", $data);
|
44 |
+
fwrite($handle, $data);
|
45 |
+
fclose($handle);
|
46 |
+
$txturl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'robots.txt';
|
47 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('robots')->__('robots.txt was successfully saved - ').$File.'- <a target="_blank" href="'.$txturl.'">'.$txturl.'</a> ');
|
48 |
+
$this->_redirect('*/*/');
|
49 |
+
}
|
50 |
+
|
51 |
+
public function previewAction() {
|
52 |
+
$data = Mage::getModel('robots/item')->BuildRobotsData();
|
53 |
+
echo $data;
|
54 |
+
}
|
55 |
+
|
56 |
+
public function editAction() {
|
57 |
+
if (Mage::helper('robots')->versionUseAdminTitle()) {
|
58 |
+
$this->_title($this->__('robots'));
|
59 |
+
}
|
60 |
+
// 1. Get ID and create model
|
61 |
+
$id = $this->getRequest()->getParam('item_id');
|
62 |
+
$model = Mage::getModel('robots/item');
|
63 |
+
// 2. Initial checking
|
64 |
+
if ($id) {
|
65 |
+
$model->load($id);
|
66 |
+
if (!$model->getId()) {
|
67 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('robots')->__('This item no longer exists'));
|
68 |
+
$this->_redirect('*/*/');
|
69 |
+
return;
|
70 |
+
}
|
71 |
+
}
|
72 |
+
// 3. Set entered data if was error when we do save
|
73 |
+
$data = Mage::getSingleton('adminhtml/session')->getFormData(true);
|
74 |
+
if (!empty($data)) {
|
75 |
+
$model->setData($data);
|
76 |
+
}
|
77 |
+
// 4. Register model to use later in blocks
|
78 |
+
Mage::register('robots_item', $model);
|
79 |
+
// 5. Build edit form
|
80 |
+
$this->_initAction()
|
81 |
+
->_addBreadcrumb($id ? Mage::helper('robots')->__('Edit Item') : Mage::helper('robots')->__('New Item'), $id ? Mage::helper('robots')->__('Edit Item') : Mage::helper('robots')->__('New Item'))
|
82 |
+
->_addContent($this->getLayout()->createBlock('robots/admin_item_edit')->setData('action', $this->getUrl('*/admin_item/save')))
|
83 |
+
->_addLeft($this->getLayout()->createBlock('robots/admin_item_edit_tabs'))
|
84 |
+
->renderLayout();
|
85 |
+
}
|
86 |
+
|
87 |
+
public function saveAction() {
|
88 |
+
if ($data = $this->getRequest()->getPost()) {
|
89 |
+
// init model and set data
|
90 |
+
$model = Mage::getModel('robots/item');
|
91 |
+
// print_r($data);exit();
|
92 |
+
$model->setData($data);
|
93 |
+
// try to save it
|
94 |
+
try {
|
95 |
+
// save the data
|
96 |
+
$model->save();
|
97 |
+
// display success message
|
98 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('robots')->__('Item was successfully saved'));
|
99 |
+
// clear previously saved data from session
|
100 |
+
Mage::getSingleton('adminhtml/session')->setFormData(false);
|
101 |
+
// check if 'Save and Continue'
|
102 |
+
if ($this->getRequest()->getParam('back')) {
|
103 |
+
$this->_redirect('*/*/edit', array('item_id' => $model->getId()));
|
104 |
+
return;
|
105 |
+
}
|
106 |
+
// go to grid
|
107 |
+
$this->_redirect('*/*/');
|
108 |
+
return;
|
109 |
+
} catch (Exception $e) {
|
110 |
+
// display error message
|
111 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
112 |
+
// save data in session
|
113 |
+
Mage::getSingleton('adminhtml/session')->setFormData($data);
|
114 |
+
// redirect to edit form
|
115 |
+
$this->_redirect('*/*/edit', array('item_id' => $this->getRequest()->getParam('item_id')));
|
116 |
+
return;
|
117 |
+
}
|
118 |
+
}
|
119 |
+
$this->_redirect('*/*/');
|
120 |
+
}
|
121 |
+
|
122 |
+
public function deleteAction() {
|
123 |
+
// check if we know what should be deleted
|
124 |
+
if ($id = $this->getRequest()->getParam('item_id')) {
|
125 |
+
$name = "";
|
126 |
+
try {
|
127 |
+
// init model and delete
|
128 |
+
$model = Mage::getModel('robots/item');
|
129 |
+
$model->load($id);
|
130 |
+
$name = $model->getName();
|
131 |
+
$model->delete();
|
132 |
+
// display success message
|
133 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('robots')->__('Item was successfully deleted'));
|
134 |
+
// go to grid
|
135 |
+
$this->_redirect('*/*/');
|
136 |
+
return;
|
137 |
+
} catch (Exception $e) {
|
138 |
+
// display error message
|
139 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
140 |
+
// go back to edit form
|
141 |
+
$this->_redirect('*/*/edit', array('item_id' => $id));
|
142 |
+
return;
|
143 |
+
}
|
144 |
+
}
|
145 |
+
// display error message
|
146 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('robots')->__('Unable to find a item to delete'));
|
147 |
+
// go to grid
|
148 |
+
$this->_redirect('*/*/');
|
149 |
+
}
|
150 |
+
|
151 |
+
|
152 |
+
protected function _isAllowed() {
|
153 |
+
return Mage::getSingleton('admin/session')->isAllowed('robots/item');
|
154 |
+
}
|
155 |
+
|
156 |
+
public function wysiwygAction() {
|
157 |
+
$elementId = $this->getRequest()->getParam('element_id', md5(microtime()));
|
158 |
+
$content = $this->getLayout()->createBlock('adminhtml/catalog_helper_form_wysiwyg_content', '', array(
|
159 |
+
'editor_element_id' => $elementId
|
160 |
+
));
|
161 |
+
$this->getResponse()->setBody($content->toHtml());
|
162 |
+
}
|
163 |
+
|
164 |
+
|
165 |
+
|
166 |
+
public function massStatusAction()
|
167 |
+
{
|
168 |
+
$itemIds = $this->getRequest()->getParam('massaction');
|
169 |
+
if(!is_array($itemIds)) {
|
170 |
+
Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
|
171 |
+
} else {
|
172 |
+
try {
|
173 |
+
foreach ($itemIds as $itemId) {
|
174 |
+
$model = Mage::getSingleton('robots/item')
|
175 |
+
->load($itemId)
|
176 |
+
->setIs_active($this->getRequest()->getParam('status'))
|
177 |
+
->setIsMassupdate(true)
|
178 |
+
->save();
|
179 |
+
}
|
180 |
+
$this->_getSession()->addSuccess(
|
181 |
+
$this->__('Total of %d record(s) were successfully updated', count($itemIds))
|
182 |
+
);
|
183 |
+
} catch (Exception $e) {
|
184 |
+
$this->_getSession()->addError($e->getMessage());
|
185 |
+
}
|
186 |
+
}
|
187 |
+
$this->_redirect('*/*/index');
|
188 |
+
}
|
189 |
+
public function massDeleteAction() {
|
190 |
+
$itemIds = $this->getRequest()->getParam('massaction');
|
191 |
+
if(!is_array($itemIds)) {
|
192 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('robots')->__('Please select item(s)'));
|
193 |
+
} else {
|
194 |
+
try {
|
195 |
+
foreach ($itemIds as $itemId) {
|
196 |
+
$mass = Mage::getModel('robots/item')->load($itemId);
|
197 |
+
$mass->delete();
|
198 |
+
}
|
199 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
200 |
+
Mage::helper('robots')->__(
|
201 |
+
'Total of %d record(s) were successfully deleted', count($itemIds)
|
202 |
+
)
|
203 |
+
);
|
204 |
+
} catch (Exception $e) {
|
205 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
206 |
+
}
|
207 |
+
}
|
208 |
+
$this->_redirect('*/*/index');
|
209 |
+
}
|
210 |
+
|
211 |
+
|
212 |
+
public function exportCsvAction()
|
213 |
+
{
|
214 |
+
$fileName = 'items.csv';
|
215 |
+
$content = $this->getLayout()->createBlock('robots/admin_item_grid')
|
216 |
+
->getCsv();
|
217 |
+
$this->_sendUploadResponse($fileName, $content);
|
218 |
+
}
|
219 |
+
|
220 |
+
public function exportXmlAction()
|
221 |
+
{
|
222 |
+
$fileName = 'items.xml';
|
223 |
+
$content = $this->getLayout()->createBlock('robots/admin_item_grid')
|
224 |
+
->getXml();
|
225 |
+
$this->_sendUploadResponse($fileName, $content);
|
226 |
+
}
|
227 |
+
protected function _sendUploadResponse($fileName, $content, $contentType='application/octet-stream')
|
228 |
+
{
|
229 |
+
$response = $this->getResponse();
|
230 |
+
$response->setHeader('HTTP/1.1 200 OK','');
|
231 |
+
$response->setHeader('Pragma', 'public', true);
|
232 |
+
$response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true);
|
233 |
+
$response->setHeader('Content-Disposition', 'attachment; filename='.$fileName);
|
234 |
+
$response->setHeader('Last-Modified', date('r'));
|
235 |
+
$response->setHeader('Accept-Ranges', 'bytes');
|
236 |
+
$response->setHeader('Content-Length', strlen($content));
|
237 |
+
$response->setHeader('Content-type', $contentType);
|
238 |
+
$response->setBody($content);
|
239 |
+
$response->sendResponse();
|
240 |
+
die;
|
241 |
+
}
|
242 |
+
}
|
app/code/community/Ip/Robots/etc/config.xml
ADDED
@@ -0,0 +1,164 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Ip_Robots>
|
5 |
+
<version>1.0.0</version>
|
6 |
+
</Ip_Robots>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<rewrite>
|
10 |
+
<mage_adminhtml_system_variable>
|
11 |
+
<from><![CDATA[#^/robots/system_variable#]]>
|
12 |
+
</from>
|
13 |
+
<to>/admin/system_variable</to>
|
14 |
+
</mage_adminhtml_system_variable>
|
15 |
+
</rewrite>
|
16 |
+
<models>
|
17 |
+
<robots>
|
18 |
+
<class>Ip_Robots_Model</class>
|
19 |
+
<resourceModel>robots_mysql4</resourceModel>
|
20 |
+
</robots>
|
21 |
+
<robots_mysql4>
|
22 |
+
<class>Ip_Robots_Model_Mysql4</class>
|
23 |
+
<entities>
|
24 |
+
<item>
|
25 |
+
<table>ip_robots_item</table>
|
26 |
+
</item>
|
27 |
+
<item_store>
|
28 |
+
<table>ip_robots_item_store</table>
|
29 |
+
</item_store>
|
30 |
+
<category>
|
31 |
+
<table>ip_robots_category</table>
|
32 |
+
</category>
|
33 |
+
<category_store>
|
34 |
+
<table>ip_robots_category_store</table>
|
35 |
+
</category_store>
|
36 |
+
</entities>
|
37 |
+
</robots_mysql4>
|
38 |
+
</models>
|
39 |
+
<resources>
|
40 |
+
<robots_setup>
|
41 |
+
<setup>
|
42 |
+
<module>Ip_Robots</module>
|
43 |
+
</setup>
|
44 |
+
<connection>
|
45 |
+
<use>core_setup</use>
|
46 |
+
</connection>
|
47 |
+
</robots_setup>
|
48 |
+
<robots_write>
|
49 |
+
<connection>
|
50 |
+
<use>core_write</use>
|
51 |
+
</connection>
|
52 |
+
</robots_write>
|
53 |
+
<robots_read>
|
54 |
+
<connection>
|
55 |
+
<use>core_read</use>
|
56 |
+
</connection>
|
57 |
+
</robots_read>
|
58 |
+
</resources>
|
59 |
+
<blocks>
|
60 |
+
<robots>
|
61 |
+
<class>Ip_Robots_Block</class>
|
62 |
+
</robots>
|
63 |
+
</blocks>
|
64 |
+
<helpers>
|
65 |
+
<robots>
|
66 |
+
<class>Ip_Robots_Helper</class>
|
67 |
+
</robots>
|
68 |
+
</helpers>
|
69 |
+
</global>
|
70 |
+
<admin>
|
71 |
+
<routers>
|
72 |
+
<Ip_Robots>
|
73 |
+
<use>admin</use>
|
74 |
+
<args>
|
75 |
+
<module>Ip_Robots</module>
|
76 |
+
<frontName>robots</frontName>
|
77 |
+
</args>
|
78 |
+
</Ip_Robots>
|
79 |
+
</routers>
|
80 |
+
</admin>
|
81 |
+
|
82 |
+
<adminhtml>
|
83 |
+
<acl>
|
84 |
+
<resources>
|
85 |
+
<admin>
|
86 |
+
<children>
|
87 |
+
<robots translate="title">
|
88 |
+
<title>Robots</title>
|
89 |
+
<children>
|
90 |
+
<item translate="title">
|
91 |
+
<title>Manage items </title>
|
92 |
+
</item>
|
93 |
+
</children>
|
94 |
+
<sort_order>65</sort_order>
|
95 |
+
</robots>
|
96 |
+
<system>
|
97 |
+
<children>
|
98 |
+
<config>
|
99 |
+
<children>
|
100 |
+
<robots>
|
101 |
+
<title>Robots</title>
|
102 |
+
<sort_order>101</sort_order>
|
103 |
+
</robots>
|
104 |
+
</children>
|
105 |
+
</config>
|
106 |
+
</children>
|
107 |
+
</system>
|
108 |
+
</children>
|
109 |
+
</admin>
|
110 |
+
</resources>
|
111 |
+
</acl>
|
112 |
+
<menu>
|
113 |
+
<cms translate="title" module="formbuilder">
|
114 |
+
<title>CMS</title>
|
115 |
+
<sort_order>70</sort_order>
|
116 |
+
<children>
|
117 |
+
<robots translate="title" module="robots">
|
118 |
+
<title>Robots.txt</title>
|
119 |
+
<sort_order>0</sort_order>
|
120 |
+
<children>
|
121 |
+
<item translate="title" module="robots">
|
122 |
+
<title>Manage</title>
|
123 |
+
<action>robots/admin_item/</action>
|
124 |
+
<resource>robots/admin/item</resource>
|
125 |
+
</item>
|
126 |
+
<settings translate="title" module="robots">
|
127 |
+
<title>Settings</title>
|
128 |
+
<action>adminhtml/system_config/edit/section/robots</action>
|
129 |
+
<sort_order>40</sort_order>
|
130 |
+
</settings>
|
131 |
+
</children>
|
132 |
+
</robots>
|
133 |
+
</children>
|
134 |
+
</cms>
|
135 |
+
</menu>
|
136 |
+
</adminhtml>
|
137 |
+
<default>
|
138 |
+
<robots>
|
139 |
+
<options>
|
140 |
+
<delay>none</delay>
|
141 |
+
<all>1</all>
|
142 |
+
<googlebot>0</googlebot>
|
143 |
+
<yandex>0</yandex>
|
144 |
+
<googlebotimage>0</googlebotimage>
|
145 |
+
<googlebotmobile>0</googlebotmobile>
|
146 |
+
<msnbot>0</msnbot>
|
147 |
+
<slurp>0</slurp>
|
148 |
+
<teoma>0</teoma>
|
149 |
+
<twiceler>0</twiceler>
|
150 |
+
<gigabot>0</gigabot>
|
151 |
+
<scrubby>0</scrubby>
|
152 |
+
<robozilla>0</robozilla>
|
153 |
+
<nutch>0</nutch>
|
154 |
+
<iaarchiver>0</iaarchiver>
|
155 |
+
<baiduspider>0</baiduspider>
|
156 |
+
<naverbot>0</naverbot>
|
157 |
+
<yeti>0</yeti>
|
158 |
+
<yahoommcrawler>0</yahoommcrawler>
|
159 |
+
<psbot>0</psbot>
|
160 |
+
<yahooblogs>0</yahooblogs>
|
161 |
+
</options>
|
162 |
+
</robots>
|
163 |
+
</default>
|
164 |
+
</config>
|
app/code/community/Ip/Robots/etc/system.xml
ADDED
@@ -0,0 +1,231 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<ip translate="label">
|
5 |
+
<label>EcommerceOffice.com</label>
|
6 |
+
<sort_order>250</sort_order>
|
7 |
+
</ip>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<robots translate="label" module="robots">
|
11 |
+
<label>Robots.txt</label>
|
12 |
+
<tab>ip</tab>
|
13 |
+
<frontend_type>text</frontend_type>
|
14 |
+
<sort_order>100</sort_order>
|
15 |
+
<show_in_default>1</show_in_default>
|
16 |
+
<show_in_website>1</show_in_website>
|
17 |
+
<show_in_store>1</show_in_store>
|
18 |
+
<groups>
|
19 |
+
<options translate="label">
|
20 |
+
<label>Main options</label>
|
21 |
+
<frontend_type>text</frontend_type>
|
22 |
+
<sort_order>10</sort_order>
|
23 |
+
<show_in_default>1</show_in_default>
|
24 |
+
<show_in_website>1</show_in_website>
|
25 |
+
<show_in_store>1</show_in_store>
|
26 |
+
<fields>
|
27 |
+
<delay translate="label">
|
28 |
+
<label>Crawl delay</label>
|
29 |
+
<frontend_type>select</frontend_type>
|
30 |
+
<source_model>robots/source_crawldelay</source_model>
|
31 |
+
<sort_order>0</sort_order>
|
32 |
+
<show_in_default>1</show_in_default>
|
33 |
+
<show_in_website>1</show_in_website>
|
34 |
+
<show_in_store>0</show_in_store>
|
35 |
+
</delay>
|
36 |
+
<all translate="label">
|
37 |
+
<label>Allow all crawlers</label>
|
38 |
+
<frontend_type>select</frontend_type>
|
39 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
40 |
+
<sort_order>1</sort_order>
|
41 |
+
<show_in_default>1</show_in_default>
|
42 |
+
<show_in_website>1</show_in_website>
|
43 |
+
<show_in_store>0</show_in_store>
|
44 |
+
</all>
|
45 |
+
<googlebot translate="label">
|
46 |
+
<label>Disallow googlebot</label>
|
47 |
+
<frontend_type>select</frontend_type>
|
48 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
49 |
+
<sort_order>2</sort_order>
|
50 |
+
<show_in_default>1</show_in_default>
|
51 |
+
<show_in_website>1</show_in_website>
|
52 |
+
<show_in_store>0</show_in_store>
|
53 |
+
</googlebot>
|
54 |
+
<yandex translate="label">
|
55 |
+
<label>Disallow yandex</label>
|
56 |
+
<frontend_type>select</frontend_type>
|
57 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
58 |
+
<sort_order>3</sort_order>
|
59 |
+
<show_in_default>1</show_in_default>
|
60 |
+
<show_in_website>1</show_in_website>
|
61 |
+
<show_in_store>0</show_in_store>
|
62 |
+
</yandex>
|
63 |
+
<googlebotimage translate="label">
|
64 |
+
<label>Disallow googlebot-image</label>
|
65 |
+
<frontend_type>select</frontend_type>
|
66 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
67 |
+
<sort_order>4</sort_order>
|
68 |
+
<show_in_default>1</show_in_default>
|
69 |
+
<show_in_website>1</show_in_website>
|
70 |
+
<show_in_store>0</show_in_store>
|
71 |
+
</googlebotimage>
|
72 |
+
<googlebotmobile translate="label">
|
73 |
+
<label>Disallow googlebot-mobile</label>
|
74 |
+
<frontend_type>select</frontend_type>
|
75 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
76 |
+
<sort_order>5</sort_order>
|
77 |
+
<show_in_default>1</show_in_default>
|
78 |
+
<show_in_website>1</show_in_website>
|
79 |
+
<show_in_store>0</show_in_store>
|
80 |
+
</googlebotmobile>
|
81 |
+
<msnbot translate="label">
|
82 |
+
<label>Disallow msnbot</label>
|
83 |
+
<frontend_type>select</frontend_type>
|
84 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
85 |
+
<sort_order>6</sort_order>
|
86 |
+
<show_in_default>1</show_in_default>
|
87 |
+
<show_in_website>1</show_in_website>
|
88 |
+
<show_in_store>0</show_in_store>
|
89 |
+
</msnbot>
|
90 |
+
|
91 |
+
<slurp translate="label">
|
92 |
+
<label>Disallow slurp</label>
|
93 |
+
<frontend_type>select</frontend_type>
|
94 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
95 |
+
<sort_order>7</sort_order>
|
96 |
+
<show_in_default>1</show_in_default>
|
97 |
+
<show_in_website>1</show_in_website>
|
98 |
+
<show_in_store>0</show_in_store>
|
99 |
+
</slurp>
|
100 |
+
<teoma translate="label">
|
101 |
+
<label>Disallow teoma</label>
|
102 |
+
<frontend_type>select</frontend_type>
|
103 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
104 |
+
<sort_order>8</sort_order>
|
105 |
+
<show_in_default>1</show_in_default>
|
106 |
+
<show_in_website>1</show_in_website>
|
107 |
+
<show_in_store>0</show_in_store>
|
108 |
+
</teoma>
|
109 |
+
<twiceler translate="label">
|
110 |
+
<label>Disallow twiceler</label>
|
111 |
+
<frontend_type>select</frontend_type>
|
112 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
113 |
+
<sort_order>9</sort_order>
|
114 |
+
<show_in_default>1</show_in_default>
|
115 |
+
<show_in_website>1</show_in_website>
|
116 |
+
<show_in_store>0</show_in_store>
|
117 |
+
</twiceler>
|
118 |
+
|
119 |
+
<gigabot translate="label">
|
120 |
+
<label>Disallow gigabot</label>
|
121 |
+
<frontend_type>select</frontend_type>
|
122 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
123 |
+
<sort_order>10</sort_order>
|
124 |
+
<show_in_default>1</show_in_default>
|
125 |
+
<show_in_website>1</show_in_website>
|
126 |
+
<show_in_store>0</show_in_store>
|
127 |
+
</gigabot>
|
128 |
+
<scrubby translate="label">
|
129 |
+
<label>Disallow scrubby</label>
|
130 |
+
<frontend_type>select</frontend_type>
|
131 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
132 |
+
<sort_order>56</sort_order>
|
133 |
+
<show_in_default>1</show_in_default>
|
134 |
+
<show_in_website>1</show_in_website>
|
135 |
+
<show_in_store>0</show_in_store>
|
136 |
+
</scrubby>
|
137 |
+
|
138 |
+
<robozilla translate="label">
|
139 |
+
<label>Disallow robozilla</label>
|
140 |
+
<frontend_type>select</frontend_type>
|
141 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
142 |
+
<sort_order>56</sort_order>
|
143 |
+
<show_in_default>1</show_in_default>
|
144 |
+
<show_in_website>1</show_in_website>
|
145 |
+
<show_in_store>0</show_in_store>
|
146 |
+
</robozilla>
|
147 |
+
<nutch translate="label">
|
148 |
+
<label>Disallow nutch</label>
|
149 |
+
<frontend_type>select</frontend_type>
|
150 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
151 |
+
<sort_order>56</sort_order>
|
152 |
+
<show_in_default>1</show_in_default>
|
153 |
+
<show_in_website>1</show_in_website>
|
154 |
+
<show_in_store>0</show_in_store>
|
155 |
+
</nutch>
|
156 |
+
<iaarchiver translate="label">
|
157 |
+
<label>Disallow iaarchiver</label>
|
158 |
+
<frontend_type>select</frontend_type>
|
159 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
160 |
+
<sort_order>56</sort_order>
|
161 |
+
<show_in_default>1</show_in_default>
|
162 |
+
<show_in_website>1</show_in_website>
|
163 |
+
<show_in_store>0</show_in_store>
|
164 |
+
</iaarchiver>
|
165 |
+
<baiduspider translate="label">
|
166 |
+
<label>Disallow baiduspider</label>
|
167 |
+
<frontend_type>select</frontend_type>
|
168 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
169 |
+
<sort_order>56</sort_order>
|
170 |
+
<show_in_default>1</show_in_default>
|
171 |
+
<show_in_website>1</show_in_website>
|
172 |
+
<show_in_store>0</show_in_store>
|
173 |
+
</baiduspider>
|
174 |
+
<naverbot translate="label">
|
175 |
+
<label>Disallow naverbot</label>
|
176 |
+
<frontend_type>select</frontend_type>
|
177 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
178 |
+
<sort_order>56</sort_order>
|
179 |
+
<show_in_default>1</show_in_default>
|
180 |
+
<show_in_website>1</show_in_website>
|
181 |
+
<show_in_store>0</show_in_store>
|
182 |
+
</naverbot>
|
183 |
+
<yeti translate="label">
|
184 |
+
<label>Disallow yeti</label>
|
185 |
+
<frontend_type>select</frontend_type>
|
186 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
187 |
+
<sort_order>56</sort_order>
|
188 |
+
<show_in_default>1</show_in_default>
|
189 |
+
<show_in_website>1</show_in_website>
|
190 |
+
<show_in_store>0</show_in_store>
|
191 |
+
</yeti>
|
192 |
+
<yahoommcrawler translate="label">
|
193 |
+
<label>Disallow yahoo-mmcrawler</label>
|
194 |
+
<frontend_type>select</frontend_type>
|
195 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
196 |
+
<sort_order>56</sort_order>
|
197 |
+
<show_in_default>1</show_in_default>
|
198 |
+
<show_in_website>1</show_in_website>
|
199 |
+
<show_in_store>0</show_in_store>
|
200 |
+
</yahoommcrawler>
|
201 |
+
<psbot translate="label">
|
202 |
+
<label>Disallow psbot</label>
|
203 |
+
<frontend_type>select</frontend_type>
|
204 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
205 |
+
<sort_order>56</sort_order>
|
206 |
+
<show_in_default>1</show_in_default>
|
207 |
+
<show_in_website>1</show_in_website>
|
208 |
+
<show_in_store>0</show_in_store>
|
209 |
+
</psbot>
|
210 |
+
<yahooblogs translate="label">
|
211 |
+
<label>Disallow yahooblogs</label>
|
212 |
+
<frontend_type>select</frontend_type>
|
213 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
214 |
+
<sort_order>56</sort_order>
|
215 |
+
<show_in_default>1</show_in_default>
|
216 |
+
<show_in_website>1</show_in_website>
|
217 |
+
<show_in_store>0</show_in_store>
|
218 |
+
</yahooblogs>
|
219 |
+
</fields>
|
220 |
+
</options>
|
221 |
+
<developer>
|
222 |
+
<frontend_model>robots/developer</frontend_model>
|
223 |
+
<sort_order>999</sort_order>
|
224 |
+
<show_in_default>1</show_in_default>
|
225 |
+
<show_in_website>1</show_in_website>
|
226 |
+
<show_in_store>1</show_in_store>
|
227 |
+
</developer>
|
228 |
+
</groups>
|
229 |
+
</robots>
|
230 |
+
</sections>
|
231 |
+
</config>
|
app/code/community/Ip/Robots/sql/robots_setup/data.sql
ADDED
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
-- phpMyAdmin SQL Dump
|
2 |
+
-- version 3.3.8.1
|
3 |
+
-- http://www.phpmyadmin.net
|
4 |
+
--
|
5 |
+
-- Host: localhost
|
6 |
+
-- Generation Time: Mar 27, 2011 at 04:36 AM
|
7 |
+
-- Server version: 5.1.49
|
8 |
+
-- PHP Version: 5.3.3-1ubuntu9.3
|
9 |
+
|
10 |
+
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
|
11 |
+
|
12 |
+
--
|
13 |
+
-- Database: `magento1420`
|
14 |
+
--
|
15 |
+
|
16 |
+
-- --------------------------------------------------------
|
17 |
+
|
18 |
+
--
|
19 |
+
-- Table structure for table `ip_megamenusidebar_category`
|
20 |
+
--
|
21 |
+
|
22 |
+
CREATE TABLE IF NOT EXISTS `ip_megamenusidebar_category` (
|
23 |
+
`category_id` smallint(6) NOT NULL AUTO_INCREMENT,
|
24 |
+
`catalog_id` int(11) NOT NULL,
|
25 |
+
`title` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
|
26 |
+
`url` text NOT NULL,
|
27 |
+
`column` tinyint(4) NOT NULL DEFAULT '2',
|
28 |
+
`position` tinyint(4) NOT NULL DEFAULT '0',
|
29 |
+
`align_category` varchar(10) NOT NULL DEFAULT 'left',
|
30 |
+
`align_content` varchar(10) NOT NULL DEFAULT 'right',
|
31 |
+
`content_top` text CHARACTER SET utf8 COLLATE utf8_bin,
|
32 |
+
`content_bottom` text CHARACTER SET utf8 COLLATE utf8_bin,
|
33 |
+
`from_time` datetime DEFAULT NULL,
|
34 |
+
`to_time` datetime DEFAULT NULL,
|
35 |
+
`is_active` tinyint(1) NOT NULL DEFAULT '1',
|
36 |
+
PRIMARY KEY (`category_id`)
|
37 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;
|
38 |
+
|
39 |
+
--
|
40 |
+
-- Dumping data for table `ip_megamenusidebar_category`
|
41 |
+
--
|
42 |
+
|
43 |
+
INSERT INTO `ip_megamenusidebar_category` (`category_id`, `catalog_id`, `title`, `url`, `column`, `position`, `align_category`, `align_content`, `content_top`, `content_bottom`, `from_time`, `to_time`, `is_active`) VALUES
|
44 |
+
(2, 13, 'Electronics', '#', 3, 5, 'left', 'left', 0x3c703e3c7374726f6e673e3220636f6c756d6e732063617465676f7279206c61796f75743c2f7374726f6e673e3c2f703e0d0a3c703e596f752063616e20636f6d706c6574656c79206368616e6765206d656e75206f7220796f752063616e206c656176652069742061732069732c2074686973206d656e7520646f6573206e6f74206769766520796f7520616e792074726f75626c652e20416c6c207061727473206f66204d6567614d656e752061726520636f6d706c6574656c79206368616e676561626c6520696e207468652061646d696e6973747261746976652073656374696f6e2c20796f752063616e20616c736f206368616e6765206e616d6573206f662075726c206c696e6b732e2054686973206d656e75206973207265616c6c7920636f6e76696e69656e742e3c2f703e, '', '2009-11-06 10:46:36', '2011-03-12 02:45:00', 1),
|
45 |
+
(5, 10, 'Furniture', '#', 2, 2, 'left', 'left', '', 0x3c703e3c7370616e207374796c653d22666f6e742d73697a653a20736d616c6c3b223e2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d3c2f7370616e3e3c7370616e207374796c653d22666f6e742d73697a653a20736d616c6c3b223e2d2d2d2d2d2d2d2d2d2d2d2d2d2d3c2f7370616e3e3c7370616e207374796c653d22666f6e742d73697a653a20736d616c6c3b223e2d2d2d2d2d2d2d2d2d2d2d2d2d2d3c2f7370616e3e3c7370616e207374796c653d22666f6e742d73697a653a20736d616c6c3b223e2d2d2d2d2d2d2d2d2d2d3c2f7370616e3e3c2f703e0d0a3c703e3c7370616e207374796c653d22666f6e742d73697a653a20736d616c6c3b223e4d6567616d656e75322d2667743b4974656d732d2667743b4974656d4e616d652d2667743b436f6e74656e7420466f6f7465723c2f7370616e3e3c2f703e0d0a3c703e3c7370616e207374796c653d22666f6e742d73697a653a20736d616c6c3b223e2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d3c2f7370616e3e3c7370616e207374796c653d22666f6e742d73697a653a20736d616c6c3b223e2d2d2d2d2d2d2d2d2d2d2d2d2d2d3c2f7370616e3e3c7370616e207374796c653d22666f6e742d73697a653a20736d616c6c3b223e2d2d2d2d2d2d2d2d2d2d2d2d2d2d3c2f7370616e3e3c2f703e, '2011-02-27 16:47:02', NULL, 1),
|
46 |
+
(6, 18, 'Apparel', '#', 1, 12, 'left', 'left', '', 0x3c703e4353533320616e642043726f73732042726f7773657220537570706f72742e3c2f703e, '2001-03-12 16:52:09', '2016-03-31 16:52:09', 1),
|
47 |
+
(7, 3, 'Root', '#', 3, 1, 'left', 'left', 0x3c703e3c7370616e207374796c653d22666f6e742d73697a653a20736d616c6c3b223e2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d3c2f7370616e3e3c7370616e207374796c653d22666f6e742d73697a653a20736d616c6c3b223e2d2d2d2d3c2f7370616e3e3c7370616e207374796c653d22666f6e742d73697a653a20736d616c6c3b223e2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d3c2f7370616e3e3c7370616e207374796c653d22666f6e742d73697a653a20736d616c6c3b223e2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d3c2f7370616e3e3c7370616e207374796c653d22666f6e742d73697a653a20736d616c6c3b223e2d2d3c2f7370616e3e3c7370616e207374796c653d22666f6e742d73697a653a20736d616c6c3b223e2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d3c2f7370616e3e3c7370616e207374796c653d22666f6e742d73697a653a20736d616c6c3b223e2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d3c2f7370616e3e3c2f703e0d0a3c703e3c7370616e207374796c653d22666f6e742d73697a653a20736d616c6c3b223e546f206368616e6765206974656d2068656164657220676f20746f204d6567616d656e75322d2667743b4974656d732d2667743b4974656d4e616d652d2667743b436f6e74656e7420546f703c6272202f3e3c2f7370616e3e3c2f703e0d0a3c703e3c7370616e207374796c653d22666f6e742d73697a653a20736d616c6c3b223e2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d3c2f7370616e3e3c7370616e207374796c653d22666f6e742d73697a653a20736d616c6c3b223e2d2d2d2d3c2f7370616e3e3c7370616e207374796c653d22666f6e742d73697a653a20736d616c6c3b223e2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d3c2f7370616e3e3c7370616e207374796c653d22666f6e742d73697a653a20736d616c6c3b223e2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d3c2f7370616e3e3c7370616e207374796c653d22666f6e742d73697a653a20736d616c6c3b223e2d2d3c2f7370616e3e3c7370616e207374796c653d22666f6e742d73697a653a20736d616c6c3b223e2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d3c2f7370616e3e3c7370616e207374796c653d22666f6e742d73697a653a20736d616c6c3b223e2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d3c2f7370616e3e3c2f703e, '', '2011-03-13 23:18:23', NULL, 1);
|
48 |
+
|
49 |
+
-- --------------------------------------------------------
|
50 |
+
|
51 |
+
--
|
52 |
+
-- Table structure for table `ip_megamenusidebar_category_store`
|
53 |
+
--
|
54 |
+
|
55 |
+
CREATE TABLE IF NOT EXISTS `ip_megamenusidebar_category_store` (
|
56 |
+
`category_id` smallint(6) unsigned DEFAULT NULL,
|
57 |
+
`store_id` smallint(6) unsigned DEFAULT NULL
|
58 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
59 |
+
|
60 |
+
--
|
61 |
+
-- Dumping data for table `ip_megamenusidebar_category_store`
|
62 |
+
--
|
63 |
+
|
64 |
+
INSERT INTO `ip_megamenusidebar_category_store` (`category_id`, `store_id`) VALUES
|
65 |
+
(6, 0),
|
66 |
+
(2, 0),
|
67 |
+
(5, 0),
|
68 |
+
(7, 0);
|
69 |
+
|
70 |
+
-- --------------------------------------------------------
|
71 |
+
|
72 |
+
--
|
73 |
+
-- Table structure for table `ip_megamenusidebar_item`
|
74 |
+
--
|
75 |
+
|
76 |
+
CREATE TABLE IF NOT EXISTS `ip_megamenusidebar_item` (
|
77 |
+
`item_id` smallint(6) NOT NULL AUTO_INCREMENT,
|
78 |
+
`title` varchar(255) NOT NULL,
|
79 |
+
`url` text NOT NULL,
|
80 |
+
`column` tinyint(4) NOT NULL DEFAULT '2',
|
81 |
+
`align_item` varchar(10) NOT NULL DEFAULT 'left',
|
82 |
+
`align_content` varchar(10) NOT NULL DEFAULT 'right',
|
83 |
+
`position` tinyint(10) NOT NULL DEFAULT '0',
|
84 |
+
`content` text NOT NULL,
|
85 |
+
`from_time` datetime DEFAULT NULL,
|
86 |
+
`to_time` datetime DEFAULT NULL,
|
87 |
+
`is_active` tinyint(1) NOT NULL DEFAULT '1',
|
88 |
+
`columnsize` tinyint(4) NOT NULL,
|
89 |
+
PRIMARY KEY (`item_id`)
|
90 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=13 ;
|
91 |
+
|
92 |
+
--
|
93 |
+
-- Dumping data for table `ip_megamenusidebar_item`
|
94 |
+
--
|
95 |
+
|
96 |
+
INSERT INTO `ip_megamenusidebar_item` (`item_id`, `title`, `url`, `column`, `align_item`, `align_content`, `position`, `content`, `from_time`, `to_time`, `is_active`, `columnsize`) VALUES
|
97 |
+
(5, 'Lists', '#', 4, 'right', 'right', 1, '<h4>Paragraphs with Borders</h4>\r\n<p class="dark">Nulla quis metus a dolor feugiat porta. Phasellus sapien magna, gravida congue fermentum vel, gravida sit amet sapien. Quisque elit est, ullamcorper ac hendrerit eget, porta id enim. Phasellus in velit velit.</p>\r\n<p class="brown">Praesent a dolor sem. Sed scelerisque, tellus id pulvinar tristique, erat eros rutrum mi, id adipiscing arcu sem vel est. Ut ac turpis ipsum. Mauris leo nulla, vestibulum id bibendum nec, auctor eu quam.</p>\r\n<p class="yellow">Nulla quis metus a dolor feugiat porta. Phasellus sapien magna, gravida congue fermentum vel, gravida sit amet sapien. Quisque elit est, ullamcorper ac hendrerit eget, porta id enim. Phasellus in velit velit.</p>\r\n<p class="red">Curabitur vulputate, massa sit amet mollis sodales, arcu quam scelerisque augue, ac elementum velit mauris ac tellus. Nunc dapibus mollis ante a sollicitudin. Nullam adipiscing ante.</p>\r\n<p class="blue">Quisque varius, erat nec fermentum aliquam, erat urna venenatis orci, in semper lorem ante at dolor. Quisque scelerisque mattis magna ut lobortis. Cras porttitor scelerisque ligula eget condimentum.</p>\r\n<p class="green">Vestibulum sed elit ut arcu. Donec leo dui, mollis ut volutpat et, suscipit a mauris. Etiam molestie, purus id dapibus volutpat, nunc nisl ornare odio, sit amet ornare. Maecenas rutrum venenatis diam ac luctus.</p>', '2011-03-09 12:00:00', '2011-03-12 12:00:00', 1, 0),
|
98 |
+
(9, 'Video', '#', 3, 'right', 'right', 9, '<b>Welcome to Magento</b>\r\n<iframe width="450" height="320" frameborder="0" allowfullscreen="" src="http://www.youtube.com/embed/BBvsB5PcitQ" title="YouTube video player"></iframe>', '2011-03-14 01:52:21', '2016-07-14 01:52:21', 1, 0),
|
99 |
+
(10, 'Forms', '#', 3, 'left', 'left', 1, '<form id="contactForm" action="http://magento1420.dev/contacts/index/post/" method="post">\r\n<h2 class="legend">Contact Information</h2>\r\n<ul class="form-list">\r\n<li>\r\n<div class="field"><label class="required" for="name"><em>*</em>Name</label>\r\n<div class="input-box"><input id="name" class="input-text" title="Email" name="name" type="text" value="John Doe" /></div>\r\n</div>\r\n</li>\r\n<li>\r\n<div class="field"><label class="required" for="email"><em>*</em>Email</label>\r\n<div class="input-box"><input id="email" class="input-text" title="Email" name="email" type="text" value="sample@mail.com" /></div>\r\n</div>\r\n</li>\r\n<li>\r\n<div class="field"><label class="required" for="name"><em>*</em>Telephone</label>\r\n<div class="input-box"><input id="telephone" class="input-text" title="Telephone" name="telephone" type="text" value="+1 0000 0000" /></div>\r\n</div>\r\n</li>\r\n<li class="wide"> <label class="required" for="comment"><em>*</em>Comment</label>\r\n<div class="input-box"><textarea id="comment" class="required-entry input-text" title="Comment" cols="5" rows="3" name="comment">Write message here ... </textarea></div>\r\n</li>\r\n</ul>\r\n<div class="buttons-set">\r\n<p class="required">* Required Fields0</p>\r\n<input id="hideit" style="display: none !important;" name="hideit" type="text" /> <button class="button" title="Submit"><span><span>Submit</span></span></button></div>\r\n</form>', '2011-03-14 09:16:00', '2015-03-14 02:16:45', 0, 0),
|
100 |
+
(12, 'Tables', '#', 4, 'right', 'right', 1, '<h4>This is a dark table</h4>\r\n<table id="table_dark" cellspacing="0">\r\n<tbody>\r\n<tr>\r\n<th>Title 1</th><th>Title 2</th><th>Title 3</th><th>Title 4</th>\r\n</tr>\r\n<tr>\r\n<td>Cell 1</td>\r\n<td>Cell 2</td>\r\n<td>Cell 3</td>\r\n<td>Cell 4</td>\r\n</tr>\r\n<tr>\r\n<td>Cell 1</td>\r\n<td>Cell 2</td>\r\n<td>Cell 3</td>\r\n<td>Cell 4</td>\r\n</tr>\r\n<tr>\r\n<td>Cell 1</td>\r\n<td>Cell 2</td>\r\n<td>Cell 3</td>\r\n<td>Cell 4</td>\r\n</tr>\r\n<tr>\r\n<td>Cell 1</td>\r\n<td>Cell 2</td>\r\n<td>Cell 3</td>\r\n<td>Cell 4</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<h4>This is a light table</h4>\r\n<table id="table_light" cellspacing="0">\r\n<tbody>\r\n<tr>\r\n<th>Title 1</th><th>Title 2</th><th>Title 3</th><th>Title 4</th>\r\n</tr>\r\n<tr>\r\n<td>Cell 1</td>\r\n<td>Cell 2</td>\r\n<td>Cell 3</td>\r\n<td>Cell 4</td>\r\n</tr>\r\n<tr>\r\n<td>Cell 1</td>\r\n<td>Cell 2</td>\r\n<td>Cell 3</td>\r\n<td>Cell 4</td>\r\n</tr>\r\n<tr>\r\n<td>Cell 1</td>\r\n<td>Cell 2</td>\r\n<td>Cell 3</td>\r\n<td>Cell 4</td>\r\n</tr>\r\n<tr>\r\n<td>Cell 1</td>\r\n<td>Cell 2</td>\r\n<td>Cell 3</td>\r\n<td>Cell 4</td>\r\n</tr>\r\n</tbody>\r\n</table>', '2011-03-26 21:01:46', NULL, 1, 0);
|
101 |
+
|
102 |
+
-- --------------------------------------------------------
|
103 |
+
|
104 |
+
--
|
105 |
+
-- Table structure for table `ip_megamenusidebar_item_store`
|
106 |
+
--
|
107 |
+
|
108 |
+
CREATE TABLE IF NOT EXISTS `ip_megamenusidebar_item_store` (
|
109 |
+
`item_id` smallint(6) unsigned DEFAULT NULL,
|
110 |
+
`store_id` smallint(6) unsigned DEFAULT NULL
|
111 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
112 |
+
|
113 |
+
--
|
114 |
+
-- Dumping data for table `ip_megamenusidebar_item_store`
|
115 |
+
--
|
116 |
+
|
117 |
+
INSERT INTO `ip_megamenusidebar_item_store` (`item_id`, `store_id`) VALUES
|
118 |
+
(10, 0),
|
119 |
+
(5, 0),
|
120 |
+
(12, 0),
|
121 |
+
(9, 0);
|
app/code/community/Ip/Robots/sql/robots_setup/mysql4-install-1.0.0.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Aug 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com
|
5 |
+
* Copyright Proskuryakov Ivan. Ip.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
$installer = $this;
|
11 |
+
$installer->startSetup();
|
12 |
+
|
13 |
+
|
14 |
+
$sql.= "
|
15 |
+
CREATE TABLE IF NOT EXISTS {$this->getTable('ip_robots_item')} (
|
16 |
+
`item_id` smallint(6) NOT NULL AUTO_INCREMENT,
|
17 |
+
`type` tinyint(1) NOT NULL DEFAULT '0',
|
18 |
+
`url` text NOT NULL,
|
19 |
+
`comment` text NOT NULL,
|
20 |
+
`is_active` tinyint(1) NOT NULL DEFAULT '1',
|
21 |
+
PRIMARY KEY (`item_id`)
|
22 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=64 ;
|
23 |
+
";
|
24 |
+
|
25 |
+
$cms_page = $this->getTable('cms_page');
|
26 |
+
$cms_page_store = $this->getTable('cms_page_store');
|
27 |
+
$sql.= '
|
28 |
+
INSERT INTO `'.$cms_page.'` (`page_id`, `title`, `root_template`, `meta_keywords`, `meta_description`, `identifier`, `content_heading`, `content`, `creation_time`, `update_time`, `is_active`, `sort_order`, `layout_update_xml`, `custom_theme`, `custom_root_template`, `custom_layout_update_xml`, `custom_theme_from`, `custom_theme_to`) VALUES
|
29 |
+
(7000, \'Magento development\', \'one_column\', \'magento development, magento developer, magento store development\', \'Wide range of services related to the e-shops development,\r\n their design and installation as well as their configuration on Magento e-commerce \r\n platform.\', \'magento-store-development\', \'Magento development\', \'<h3>PROFESSIONAL MAGENTO DEVELOPMENT</h3>\r\n<p>There are no limits to creativity with us and <strong>Magento</strong>. Control every facet of your store, from merchandising to promotions and more. We are <strong>professional developers </strong>we provide premium <a title=\"magento development\" href=\"http://www.ecommerceoffice.com/\">MAGENTO DEVELOPMENT</a> for Business, Corporate built with the latest innovations in web-development and SEO niche. You will pay less to go live with our wide range of solutions and services.</p>\r\n<p>Our magento programmers are ready to set up your online store starting from the very beginning. All you need to do is to tell us what kind of business you plan to organize and what products you intend to sell. As a company, we provide a wide range of services related to the e-shops <strong>development</strong>, their design and installation as well as their configuration on <strong>Magento </strong>e-commerce platform.</p>\r\n<p>As a company, we provide a wide range of services related to the e-shops <strong>development</strong>, their design and installation as well as their configuration on Magento e-commerce platform. The platform itself is extremely scalable and flexible, being suitable for the unique solutions on a “turnkey” basis implementation. Magento has the advantages of outstanding safety and reliability, thus satisfying the basic requirements of high quality online business needs.</p>\r\n<p>Given that the primary focus of the ecommerceoffice.com is an Online-business and development services. We offer our invitation to web-developers, web-designers, Business Owners, internet investors, entrepreneurs and organizations interested in developing websites, online stores and other forms of online business.</p>\r\n<p>In partnership, we focus on stability and reliability because it will achieve the best results when working together. As part of the partnership, we are ready to consider any form of cooperation, such as mediation services in attracting customers, win-win implementation of joint projects, providing favorable conditions of our systems and services, and so on.</p>\', \'2011-10-14 09:03:52\', \'2011-10-14 09:08:38\', 1, 0, NULL, NULL, NULL, NULL, NULL, NULL);
|
30 |
+
|
31 |
+
INSERT INTO `'.$cms_page_store.'` (`page_id`, `store_id`) VALUES
|
32 |
+
(7000, 0);
|
33 |
+
|
34 |
+
'
|
35 |
+
|
36 |
+
;
|
37 |
+
|
38 |
+
|
39 |
+
$installer->run($sql);
|
40 |
+
|
41 |
+
$installer->endSetup();
|
42 |
+
|
43 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('robots')->__('
|
44 |
+
|
45 |
+
robots.txt was successfully installed!
|
46 |
+
Now you have 0 rules.
|
47 |
+
If you want to add standard Magento rules go to "CMS"->"Robots.txt"->"Manage"->"Install standard rules for your Magento"
|
48 |
+
|
49 |
+
|
50 |
+
'));
|
51 |
+
|
52 |
+
|
53 |
+
|
54 |
+
?>
|
app/etc/modules/Ip_Robots.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Ip_Robots>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Ip_Robots>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>ip_robots</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license>Single user license</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Magento comes without robots.txt functionality. This is the out of box module for generating Robots.txt file for Magento.</summary>
|
10 |
+
<description>Module generates robots.txt file based on your magento configuration. With it you could manage your robots.txt rules directly from Magento BE, without any FTP's,Filezilla's,Notepad's, etc..</description>
|
11 |
+
<notes>1.0.0</notes>
|
12 |
+
<authors><author><name>officeecommerce</name><user>auto-converted</user><email>office.ecommerce@gmail.com</email></author></authors>
|
13 |
+
<date>2011-10-16</date>
|
14 |
+
<time>14:11:44</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Ip"><dir name="Robots"><dir name="Block"><dir name="Admin"><dir name="Item"><dir name="Edit"><dir name="Tab"><file name="Form.php" hash="dafab01b3266738dc2961e3f595692d4"/><file name="Other.php" hash="07c91118940ff18e24578d7bf244ba42"/></dir><file name="Form.php" hash="782e32c6210a3da395c167e25ccb941f"/><file name="Tabs.php" hash="a38a1b2391a794605e208a248ed35610"/></dir><dir name="Grid"><dir name="Renderer"><file name="Action.php" hash="ca627c27c1cef4ac22d8f4255675574a"/></dir></dir><file name="Edit.php" hash="1bfdf5f5f35472e9cfbeeb25f5491d9c"/><file name="Grid.php" hash="b3f0d05fc2c3155d75e3b8ff881b0e02"/></dir><file name="Item.php" hash="809b8500732e07173005d6103161456a"/></dir><file name="Developer.php" hash="d164f7ec6c6d77b5f6c97877f5c6a091"/></dir><dir name="Helper"><file name="Data.php" hash="5e0afb0f87516435240dcf39b5685ba6"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Item"><file name="Collection.php" hash="ef3315a347043713d3bf356210564302"/></dir><file name="Item.php" hash="5fc2efeb9ddc222548da725a6dad09b4"/></dir><dir name="Source"><file name="Crawldelay.php" hash="c5e68d3123e4f1ca14b24f312e33b0cd"/></dir><dir name="Wysiwyg"><file name="Config.php" hash="a8ba471ce81f03382257307eb12c2e76"/></dir><file name="Data.php" hash="5ef84de65f7f0e9e83e2f88b317ccd6c"/><file name="Item.php" hash="2e7e4555979d33fef7da1d2c4fc55543"/></dir><dir name="controllers"><dir name="Admin"><file name="ItemController.php" hash="34ed79b18a729444cfb101e0fdd124fe"/></dir></dir><dir name="etc"><file name="config.xml" hash="08d916fe63ba41fa3507d02d1eb47d60"/><file name="system.xml" hash="744394fb8cbfef6ecca5de755812cf5a"/></dir><dir name="sql"><dir name="robots_setup"><file name="data.sql" hash="2ff42fba8a7ae92cf7bcd3cdd0ee86c3"/><file name="mysql4-install-1.0.0.php" hash="334f8e83bd5227013f4acc4a86bd28a7"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ip_Robots.xml" hash="615601c65026a937a6f3e8987cc682d6"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="ip_robots"><file name="Untitled-1.jpg" hash="ecbf9caeca6d72d6d46c5e79f9cdabd5"/><file name="logo.png" hash="eb4bb9a8d0229cdc5343bbaa41cf55f4"/><file name="megamenu.png" hash="0bde161d161df5949553b08df9cf44bd"/><file name="megamenu_box.png" hash="5626fa316aa631059554fd8b4b4fa968"/><file name="menu_box.jpg" hash="f575edb128e06c5963185387579087db"/><file name="module-box-menu2.png" hash="e8347e2b64b8fc10a744dfd5ecec227e"/><file name="promo.jpg" hash="8e34bc79c2f2927ce674471e463cddc0"/><file name="sidebar_megamenu.png" hash="ce4065102118dc2cfa4068a880ec075e"/><file name="tee.png" hash="a43d0e83fca46f87e9294b7c19ec402e"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><file name="robots_developer.phtml" hash=""/></dir></dir></dir></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies/>
|
18 |
+
</package>
|
skin/frontend/base/default/ip_robots/Untitled-1.jpg
ADDED
Binary file
|
skin/frontend/base/default/ip_robots/logo.png
ADDED
Binary file
|
skin/frontend/base/default/ip_robots/megamenu.png
ADDED
Binary file
|
skin/frontend/base/default/ip_robots/megamenu_box.png
ADDED
Binary file
|
skin/frontend/base/default/ip_robots/menu_box.jpg
ADDED
Binary file
|
skin/frontend/base/default/ip_robots/module-box-menu2.png
ADDED
Binary file
|
skin/frontend/base/default/ip_robots/promo.jpg
ADDED
Binary file
|
skin/frontend/base/default/ip_robots/sidebar_megamenu.png
ADDED
Binary file
|
skin/frontend/base/default/ip_robots/tee.png
ADDED
Binary file
|