Version Notes
This is stable version of this extension and has been tested on various version of community editions. In this particular version we are supporting it to run on PHP V 7.0.99
Download this release
Release Info
Developer | SEO North Melbourne |
Extension | Seonorthmelbourne_sitemap |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/community/Studio45/Signifymap/Block/Adminhtml/Signifymap.php +15 -0
- app/code/community/Studio45/Signifymap/Block/Adminhtml/Signifymap/Edit.php +40 -0
- app/code/community/Studio45/Signifymap/Block/Adminhtml/Signifymap/Edit/Config.php +24 -0
- app/code/community/Studio45/Signifymap/Block/Adminhtml/Signifymap/Edit/Form.php +21 -0
- app/code/community/Studio45/Signifymap/Block/Adminhtml/Signifymap/Edit/Tab/Config.php +143 -0
- app/code/community/Studio45/Signifymap/Block/Adminhtml/Signifymap/Edit/Tab/Form.php +218 -0
- app/code/community/Studio45/Signifymap/Block/Adminhtml/Signifymap/Edit/Tabs.php +25 -0
- app/code/community/Studio45/Signifymap/Block/Signifymap.php +30 -0
- app/code/community/Studio45/Signifymap/Helper/Data.php +6 -0
- app/code/community/Studio45/Signifymap/Model/Config.php +20 -0
- app/code/community/Studio45/Signifymap/Model/Mysql4/Config.php +12 -0
- app/code/community/Studio45/Signifymap/Model/Mysql4/Config/Collection.php +12 -0
- app/code/community/Studio45/Signifymap/Model/Mysql4/Signifymap.php +12 -0
- app/code/community/Studio45/Signifymap/Model/Mysql4/Signifymap/Collection.php +12 -0
- app/code/community/Studio45/Signifymap/Model/Signifymap.php +335 -0
- app/code/community/Studio45/Signifymap/controllers/Adminhtml/SignifymapController.php +59 -0
- app/code/community/Studio45/Signifymap/controllers/IndexController.php +12 -0
- app/code/community/Studio45/Signifymap/etc/config.xml +150 -0
- app/code/community/Studio45/Signifymap/sql/signifymap_setup/mysql4-install-0.1.0.php +36 -0
- app/code/community/Studio45/Signifyresponse/Block/Adminhtml/Signifyresponse.php +15 -0
- app/code/community/Studio45/Signifyresponse/Block/Adminhtml/Signifyresponse/Description.php +17 -0
- app/code/community/Studio45/Signifyresponse/Block/Adminhtml/Signifyresponse/Grid.php +79 -0
- app/code/community/Studio45/Signifyresponse/Helper/Data.php +6 -0
- app/code/community/Studio45/Signifyresponse/Model/Mysql4/Signifyresponse.php +12 -0
- app/code/community/Studio45/Signifyresponse/Model/Mysql4/Signifyresponse/Collection.php +12 -0
- app/code/community/Studio45/Signifyresponse/Model/Signifyresponse.php +20 -0
- app/code/community/Studio45/Signifyresponse/controllers/Adminhtml/SignifyresponseController.php +62 -0
- app/code/community/Studio45/Signifyresponse/etc/config.xml +108 -0
- app/code/community/Studio45/Signifyresponse/sql/signifyresponse_setup/mysql4-install-0.1.0.php +21 -0
- app/design/adminhtml/default/default/layout/signifymap.xml +14 -0
- app/design/adminhtml/default/default/layout/signifyresponse.xml +8 -0
- app/design/frontend/base/default/layout/signifymap.xml +10 -0
- app/design/frontend/base/default/template/signifymap/signifymap.phtml +97 -0
- app/etc/modules/Studio45_Signifymap.xml +9 -0
- app/etc/modules/Studio45_Signifyresponse.xml +9 -0
- package.xml +18 -0
app/code/community/Studio45/Signifymap/Block/Adminhtml/Signifymap.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifymap_Block_Adminhtml_Signifymap extends Mage_Adminhtml_Block_Widget_Grid_Container
|
4 |
+
{
|
5 |
+
|
6 |
+
public function __construct()
|
7 |
+
{
|
8 |
+
$this->_controller = 'adminhtml_signifymap';
|
9 |
+
$this->_blockGroup = 'signifymap';
|
10 |
+
$this->_headerText = Mage::helper('signifymap')->__('sitemap');
|
11 |
+
$this->_addButtonLabel = Mage::helper('signifymap')->__('site map');
|
12 |
+
parent::__construct();
|
13 |
+
}
|
14 |
+
|
15 |
+
}
|
app/code/community/Studio45/Signifymap/Block/Adminhtml/Signifymap/Edit.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifymap_Block_Adminhtml_Signifymap_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
4 |
+
{
|
5 |
+
|
6 |
+
public function __construct()
|
7 |
+
{
|
8 |
+
parent::__construct();
|
9 |
+
|
10 |
+
$this->_objectId = 'id';
|
11 |
+
$this->_blockGroup = 'signifymap';
|
12 |
+
$this->_controller = 'adminhtml_signifymap';
|
13 |
+
|
14 |
+
$this->_updateButton('save', 'label', Mage::helper('signifymap')->__('Save'));
|
15 |
+
|
16 |
+
$this->_formScripts[] = "
|
17 |
+
function toggleEditor() {
|
18 |
+
if (tinyMCE.getInstanceById('signifymap_content') == null) {
|
19 |
+
tinyMCE.execCommand('mceAddControl', false, 'signifymap_content');
|
20 |
+
} else {
|
21 |
+
tinyMCE.execCommand('mceRemoveControl', false, 'signifymap_content');
|
22 |
+
}
|
23 |
+
}
|
24 |
+
|
25 |
+
function saveAndContinueEdit(){
|
26 |
+
editForm.submit($('edit_form').action+'back/edit/');
|
27 |
+
}
|
28 |
+
";
|
29 |
+
}
|
30 |
+
|
31 |
+
public function getHeaderText()
|
32 |
+
{
|
33 |
+
if (Mage::registry('signifymap_data') && Mage::registry('signifymap_data')->getId()) {
|
34 |
+
return Mage::helper('signifymap')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('signifymap_data')->getTitle()));
|
35 |
+
} else {
|
36 |
+
return Mage::helper('signifymap')->__('Site Map');
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
}
|
app/code/community/Studio45/Signifymap/Block/Adminhtml/Signifymap/Edit/Config.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifymap_Block_Adminhtml_Signifymap_Edit_Config extends Mage_Adminhtml_Block_Widget_Tabs
|
4 |
+
{
|
5 |
+
|
6 |
+
public function __construct()
|
7 |
+
{
|
8 |
+
parent::__construct();
|
9 |
+
$this->setId('signifymap_config');
|
10 |
+
$this->setDestElementId('config_form');
|
11 |
+
$this->setTitle(Mage::helper('signifymap')->__('Configuration'));
|
12 |
+
}
|
13 |
+
|
14 |
+
protected function _beforeToHtml()
|
15 |
+
{
|
16 |
+
$this->addTab('form_section', array(
|
17 |
+
'label' => Mage::helper('signifymap')->__('Configuration'),
|
18 |
+
'title' => Mage::helper('signifymap')->__('Sitemap'),
|
19 |
+
));
|
20 |
+
|
21 |
+
return parent::_beforeToHtml();
|
22 |
+
}
|
23 |
+
|
24 |
+
}
|
app/code/community/Studio45/Signifymap/Block/Adminhtml/Signifymap/Edit/Form.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifymap_Block_Adminhtml_Signifymap_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
4 |
+
{
|
5 |
+
|
6 |
+
protected function _prepareForm()
|
7 |
+
{
|
8 |
+
$form = new Varien_Data_Form(array(
|
9 |
+
'id' => 'edit_form',
|
10 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
11 |
+
'method' => 'post',
|
12 |
+
'enctype' => 'multipart/form-data'
|
13 |
+
)
|
14 |
+
);
|
15 |
+
|
16 |
+
$form->setUseContainer(true);
|
17 |
+
$this->setForm($form);
|
18 |
+
return parent::_prepareForm();
|
19 |
+
}
|
20 |
+
|
21 |
+
}
|
app/code/community/Studio45/Signifymap/Block/Adminhtml/Signifymap/Edit/Tab/Config.php
ADDED
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifymap_Block_Adminhtml_Signifymap_Edit_Tab_Config extends Mage_Adminhtml_Block_Widget_Form
|
4 |
+
{
|
5 |
+
|
6 |
+
protected function _prepareForm()
|
7 |
+
{
|
8 |
+
|
9 |
+
$config = Mage::getModel('signifymap/config');
|
10 |
+
$row = $config->getRow();
|
11 |
+
if($row==null){
|
12 |
+
$row=array("category"=>"","product"=>"","cms"=>"","other"=>"");
|
13 |
+
}
|
14 |
+
$category = $row['category'];
|
15 |
+
|
16 |
+
$form = new Varien_Data_Form(array(
|
17 |
+
'id' => 'config_form',
|
18 |
+
'action' => $this->getUrl('*/*/config', array('id' => $this->getRequest()->getParam('id'))),
|
19 |
+
'method' => 'post',
|
20 |
+
'enctype' => 'multipart/form-data'
|
21 |
+
));
|
22 |
+
$form->setUseContainer(true);
|
23 |
+
$this->setForm($form);
|
24 |
+
$fieldset = $form->addFieldset('signifymap_form', array('legend' => Mage::helper('signifymap')->__('Configuration')));
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
if ($row['category'] == 'yes') {
|
29 |
+
$fieldset->addField('category', 'select', array(
|
30 |
+
'name' => 'category',
|
31 |
+
'label' => 'Show Categories',
|
32 |
+
'align' => 'left',
|
33 |
+
'values' => array(
|
34 |
+
array(
|
35 |
+
'value' => 'yes',
|
36 |
+
'label' => Mage::helper('signifymap')->__('Yes'),),
|
37 |
+
array(
|
38 |
+
'value' => 'no',
|
39 |
+
'label' => Mage::helper('signifymap')->__('No')))));
|
40 |
+
} else {
|
41 |
+
$fieldset->addField('category', 'select', array(
|
42 |
+
'name' => 'category',
|
43 |
+
'label' => 'Show Categories',
|
44 |
+
'align' => 'left',
|
45 |
+
'values' => array(
|
46 |
+
array(
|
47 |
+
'value' => 'no',
|
48 |
+
'label' => Mage::helper('signifymap')->__('No'),),
|
49 |
+
array(
|
50 |
+
'value' => 'yes',
|
51 |
+
'label' => Mage::helper('signifymap')->__('Yes')))));
|
52 |
+
}
|
53 |
+
|
54 |
+
if ($row['product'] == 'yes') {
|
55 |
+
$fieldset->addField('product', 'select', array(
|
56 |
+
'name' => 'product',
|
57 |
+
'label' => 'Show Products',
|
58 |
+
'align' => 'left',
|
59 |
+
'values' => array(
|
60 |
+
array(
|
61 |
+
'value' => 'yes',
|
62 |
+
'label' => Mage::helper('signifymap')->__('Yes'),),
|
63 |
+
array(
|
64 |
+
'value' => 'no',
|
65 |
+
'label' => Mage::helper('signifymap')->__('No')))));
|
66 |
+
} else {
|
67 |
+
$fieldset->addField('product', 'select', array(
|
68 |
+
'name' => 'product',
|
69 |
+
'label' => 'Show Products',
|
70 |
+
'align' => 'left',
|
71 |
+
'values' => array(
|
72 |
+
array(
|
73 |
+
'value' => 'no',
|
74 |
+
'label' => Mage::helper('signifymap')->__('No'),),
|
75 |
+
array(
|
76 |
+
'value' => 'yes',
|
77 |
+
'label' => Mage::helper('signifymap')->__('Yes')))));
|
78 |
+
}
|
79 |
+
|
80 |
+
|
81 |
+
if ($row['cms'] == 'yes') {
|
82 |
+
$fieldset->addField('cms', 'select', array(
|
83 |
+
'name' => 'cms',
|
84 |
+
'label' => 'Show CMS Pages',
|
85 |
+
'align' => 'left',
|
86 |
+
'values' => array(
|
87 |
+
array(
|
88 |
+
'value' => 'yes',
|
89 |
+
'label' => Mage::helper('signifymap')->__('Yes'),),
|
90 |
+
array(
|
91 |
+
'value' => 'no',
|
92 |
+
'label' => Mage::helper('signifymap')->__('No')))));
|
93 |
+
} else {
|
94 |
+
$fieldset->addField('cms', 'select', array(
|
95 |
+
'name' => 'cms',
|
96 |
+
'label' => 'Show CMS Pages',
|
97 |
+
'align' => 'left',
|
98 |
+
'values' => array(
|
99 |
+
array(
|
100 |
+
'value' => 'no',
|
101 |
+
'label' => Mage::helper('signifymap')->__('No'),),
|
102 |
+
array(
|
103 |
+
'value' => 'yes',
|
104 |
+
'label' => Mage::helper('signifymap')->__('Yes')))));
|
105 |
+
}
|
106 |
+
|
107 |
+
/*if ($row['other'] == 'yes') {
|
108 |
+
$fieldset->addField('other', 'select', array(
|
109 |
+
'name' => 'other',
|
110 |
+
'label' => 'Show Header And Footer',
|
111 |
+
'align' => 'left',
|
112 |
+
'values' => array(
|
113 |
+
array(
|
114 |
+
'value' => 'yes',
|
115 |
+
'label' => Mage::helper('signifymap')->__('Yes'),),
|
116 |
+
array(
|
117 |
+
'value' => 'no',
|
118 |
+
'label' => Mage::helper('signifymap')->__('No')))));
|
119 |
+
} else {
|
120 |
+
$fieldset->addField('other', 'select', array(
|
121 |
+
'name' => 'other',
|
122 |
+
'label' => 'Show Header And Footer',
|
123 |
+
'align' => 'left',
|
124 |
+
'values' => array(
|
125 |
+
array(
|
126 |
+
'value' => 'no',
|
127 |
+
'label' => Mage::helper('signifymap')->__('No'),),
|
128 |
+
array(
|
129 |
+
'value' => 'yes',
|
130 |
+
'label' => Mage::helper('signifymap')->__('Yes')))));
|
131 |
+
}*/
|
132 |
+
$fieldset->addField('submit', 'submit', array(
|
133 |
+
'value' => 'Save',
|
134 |
+
'after_element_html' => '<small></small>',
|
135 |
+
'style' => 'background-color:#FF6600; width:95%; color:white;font-family:Arial, Helvetica, sans-serif;
|
136 |
+
font-style:normal; ',
|
137 |
+
'tabindex' => 1
|
138 |
+
));
|
139 |
+
|
140 |
+
return parent::_prepareForm();
|
141 |
+
}
|
142 |
+
|
143 |
+
}
|
app/code/community/Studio45/Signifymap/Block/Adminhtml/Signifymap/Edit/Tab/Form.php
ADDED
@@ -0,0 +1,218 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifymap_Block_Adminhtml_Signifymap_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
|
4 |
+
{
|
5 |
+
|
6 |
+
protected function _prepareForm()
|
7 |
+
{
|
8 |
+
$signifymap = Mage::getModel('signifymap/signifymap');
|
9 |
+
$row = $signifymap->getRow();
|
10 |
+
if($row==null){
|
11 |
+
$row=array("google"=>"","bing"=>"","window"=>"","yahoo"=>"","ping_interval"=>"","format"=>"");
|
12 |
+
}
|
13 |
+
|
14 |
+
$google = false;
|
15 |
+
$bing = false;
|
16 |
+
$window = false;
|
17 |
+
$yahoo = false;
|
18 |
+
|
19 |
+
if ($row['google'] == 'yes')
|
20 |
+
$google = true;
|
21 |
+
if ($row['bing'] == 'yes')
|
22 |
+
$bing = true;
|
23 |
+
if ($row['window'] == 'yes')
|
24 |
+
$window = true;
|
25 |
+
if ($row['yahoo'] == 'yes')
|
26 |
+
$yahoo = true;
|
27 |
+
|
28 |
+
$form = new Varien_Data_Form();
|
29 |
+
$this->setForm($form);
|
30 |
+
$fieldset = $form->addFieldset('signifymap_form', array('legend' => Mage::helper('signifymap')->__('Site Map')));
|
31 |
+
|
32 |
+
if ($row['ping_interval'] != '') {
|
33 |
+
$fieldset->addField('ping_interval', 'text', array(
|
34 |
+
'label' => Mage::helper('signifymap')->__('Time Interval'),
|
35 |
+
'class' => 'validate-greater-than-zero validate-digits',
|
36 |
+
'required' => true,
|
37 |
+
'name' => 'ping_interval',
|
38 |
+
'value' => "" . $row['ping_interval'] . "",
|
39 |
+
'after_element_html' => '<large>Please enter a valid number in this field. like .: 9</large>',
|
40 |
+
));
|
41 |
+
} else {
|
42 |
+
$fieldset->addField('ping_interval', 'text', array(
|
43 |
+
'label' => Mage::helper('signifymap')->__('Time Interval'),
|
44 |
+
'class' => 'validate-greater-than-zero validate-digits',
|
45 |
+
'required' => true,
|
46 |
+
'name' => 'ping_interval',
|
47 |
+
'value' => '9',
|
48 |
+
'after_element_html' => '<large>Please enter a valid number in this field. like .: 9</large>',
|
49 |
+
));
|
50 |
+
}
|
51 |
+
|
52 |
+
if ($row['format'] == 'hours') {
|
53 |
+
$fieldset->addField('format', 'select', array(
|
54 |
+
'name' => 'format',
|
55 |
+
'align' => 'left',
|
56 |
+
'values' => array(
|
57 |
+
array(
|
58 |
+
'value' => 'hours',
|
59 |
+
'label' => Mage::helper('signifymap')->__('Hour(s)')),
|
60 |
+
array(
|
61 |
+
'value' => 'days',
|
62 |
+
'label' => Mage::helper('signifymap')->__('Day(s)'),),
|
63 |
+
array(
|
64 |
+
'value' => 'weeks',
|
65 |
+
'label' => Mage::helper('signifymap')->__('Week(s)'),),
|
66 |
+
array(
|
67 |
+
'value' => 'months',
|
68 |
+
'label' => Mage::helper('signifymap')->__('Month(s)'),),
|
69 |
+
)));
|
70 |
+
}
|
71 |
+
else if ($row['format'] == 'days') {
|
72 |
+
$fieldset->addField('format', 'select', array(
|
73 |
+
'name' => 'format',
|
74 |
+
'align' => 'left',
|
75 |
+
'values' => array(
|
76 |
+
array(
|
77 |
+
'value' => 'days',
|
78 |
+
'label' => Mage::helper('signifymap')->__('Day(s)')),
|
79 |
+
array(
|
80 |
+
'value' => 'hours',
|
81 |
+
'label' => Mage::helper('signifymap')->__('Hour(s)'),),
|
82 |
+
array(
|
83 |
+
'value' => 'weeks',
|
84 |
+
'label' => Mage::helper('signifymap')->__('Week(s)'),),
|
85 |
+
array(
|
86 |
+
'value' => 'months',
|
87 |
+
'label' => Mage::helper('signifymap')->__('Month(s)'),),
|
88 |
+
)));
|
89 |
+
}
|
90 |
+
else if ($row['format'] == 'weeks') {
|
91 |
+
$fieldset->addField('format', 'select', array(
|
92 |
+
'name' => 'format',
|
93 |
+
'align' => 'left',
|
94 |
+
'values' => array(
|
95 |
+
array(
|
96 |
+
'value' => 'weeks',
|
97 |
+
'label' => Mage::helper('signifymap')->__('Week(s)')),
|
98 |
+
array(
|
99 |
+
'value' => 'hours',
|
100 |
+
'label' => Mage::helper('signifymap')->__('Hour(s)'),),
|
101 |
+
array(
|
102 |
+
'value' => 'days',
|
103 |
+
'label' => Mage::helper('signifymap')->__('Day(s)'),),
|
104 |
+
array(
|
105 |
+
'value' => 'months',
|
106 |
+
'label' => Mage::helper('signifymap')->__('Month(s)'),),
|
107 |
+
)));
|
108 |
+
}
|
109 |
+
else if ($row['format'] == 'months') {
|
110 |
+
$fieldset->addField('format', 'select', array(
|
111 |
+
'name' => 'format',
|
112 |
+
'align' => 'left',
|
113 |
+
'values' => array(
|
114 |
+
array(
|
115 |
+
'value' => 'months',
|
116 |
+
'label' => Mage::helper('signifymap')->__('Month(s)')),
|
117 |
+
array(
|
118 |
+
'value' => 'hours',
|
119 |
+
'label' => Mage::helper('signifymap')->__('Hour(s)'),),
|
120 |
+
array(
|
121 |
+
'value' => 'days',
|
122 |
+
'label' => Mage::helper('signifymap')->__('Day(s)'),),
|
123 |
+
array(
|
124 |
+
'value' => 'weeks',
|
125 |
+
'label' => Mage::helper('signifymap')->__('Week(s)'),),
|
126 |
+
)));
|
127 |
+
} else {
|
128 |
+
$fieldset->addField('format', 'select', array(
|
129 |
+
'name' => 'format',
|
130 |
+
'align' => 'left',
|
131 |
+
'values' => array(
|
132 |
+
array(
|
133 |
+
'value' => 'hours',
|
134 |
+
'label' => Mage::helper('signifymap')->__('Hour(s)'),
|
135 |
+
),
|
136 |
+
array(
|
137 |
+
'value' => 'days',
|
138 |
+
'label' => Mage::helper('signifymap')->__('Day(s)'),
|
139 |
+
),
|
140 |
+
array(
|
141 |
+
'value' => 'weeks',
|
142 |
+
'label' => Mage::helper('signifymap')->__('Week(s)'),
|
143 |
+
),
|
144 |
+
array(
|
145 |
+
'value' => 'months',
|
146 |
+
'label' => Mage::helper('signifymap')->__('Month(s)')
|
147 |
+
)
|
148 |
+
)
|
149 |
+
));
|
150 |
+
}
|
151 |
+
|
152 |
+
$fieldset->addField('google', 'checkbox', array(
|
153 |
+
'label' => Mage::helper('signifymap')->__('Choose Search Engine'),
|
154 |
+
'name' => 'google',
|
155 |
+
'checked' => $google,
|
156 |
+
'onclick' => "",
|
157 |
+
'onchange' => "",
|
158 |
+
'value' => 'yes',
|
159 |
+
'disabled' => false,
|
160 |
+
'after_element_html' => '<large>Google Webmasters</large>',
|
161 |
+
'tabindex' => 1
|
162 |
+
));
|
163 |
+
|
164 |
+
$fieldset->addField('bing', 'checkbox', array(
|
165 |
+
'name' => 'bing',
|
166 |
+
'checked' => $bing,
|
167 |
+
'onclick' => "",
|
168 |
+
'onchange' => "",
|
169 |
+
'value' => 'yes',
|
170 |
+
'disabled' => false,
|
171 |
+
'after_element_html' => '<large>Bing Webmasters</large>',
|
172 |
+
'tabindex' => 1
|
173 |
+
));
|
174 |
+
|
175 |
+
// $fieldset->addField('window', 'checkbox', array(
|
176 |
+
// 'name' => 'window',
|
177 |
+
// 'checked' => $window,
|
178 |
+
// 'onclick' => "",
|
179 |
+
// 'onchange' => "",
|
180 |
+
// 'value' => 'yes',
|
181 |
+
// 'disabled' => false,
|
182 |
+
// 'after_element_html' => '<large>Window Live</large>',
|
183 |
+
// 'tabindex' => 1
|
184 |
+
// ));
|
185 |
+
|
186 |
+
// $fieldset->addField('yahoo', 'checkbox', array(
|
187 |
+
// 'name' => 'yahoo',
|
188 |
+
// 'checked' => $yahoo,
|
189 |
+
/* 'onclick' => "if(this.value=='yes'){if(this.checked==true){
|
190 |
+
document.getElementById('yahoo_appid').style.visibility='visible';
|
191 |
+
document.getElementById('label').style.visibility='visible';}
|
192 |
+
else{
|
193 |
+
document.getElementById('yahoo_appid').style.visibility='hidden';
|
194 |
+
document.getElementById('label').style.visibility='hidden';
|
195 |
+
}}", */
|
196 |
+
// 'onchange' => "",
|
197 |
+
// 'value' => 'yes',
|
198 |
+
// 'disabled' => false,
|
199 |
+
// 'after_element_html' => '<large>Yahoo</large>',
|
200 |
+
// 'tabindex' => 1
|
201 |
+
// ));
|
202 |
+
|
203 |
+
|
204 |
+
/* $fieldset->addField('label', 'label', array(
|
205 |
+
'after_element_html' => '<div id ="label" style=visibility:hidden;>Yahoo App Id</div>'));
|
206 |
+
|
207 |
+
$fieldset->addField('yahoo_appid', 'text', array(
|
208 |
+
'label' => Mage::helper('signifymap')->__(''),
|
209 |
+
'label_style' => 'visibility: hidden;',
|
210 |
+
'name' => 'yahoo_id',
|
211 |
+
'value' => ''.$yahoo_id.'',
|
212 |
+
'style' => 'visibility: hidden;')); */
|
213 |
+
|
214 |
+
|
215 |
+
return parent::_prepareForm();
|
216 |
+
}
|
217 |
+
|
218 |
+
}
|
app/code/community/Studio45/Signifymap/Block/Adminhtml/Signifymap/Edit/Tabs.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifymap_Block_Adminhtml_Signifymap_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
4 |
+
{
|
5 |
+
|
6 |
+
public function __construct()
|
7 |
+
{
|
8 |
+
parent::__construct();
|
9 |
+
$this->setId('signifymap_tabs');
|
10 |
+
$this->setDestElementId('edit_form');
|
11 |
+
$this->setTitle(Mage::helper('signifymap')->__('Site Map'));
|
12 |
+
}
|
13 |
+
|
14 |
+
protected function _beforeToHtml()
|
15 |
+
{
|
16 |
+
$this->addTab('form_section', array(
|
17 |
+
'label' => Mage::helper('signifymap')->__('Site Map'),
|
18 |
+
//'title' => Mage::helper('signifymap')->__('Item Information'),
|
19 |
+
'content' => $this->getLayout()->createBlock('signifymap/adminhtml_signifymap_edit_tab_form')->toHtml(),
|
20 |
+
));
|
21 |
+
|
22 |
+
return parent::_beforeToHtml();
|
23 |
+
}
|
24 |
+
|
25 |
+
}
|
app/code/community/Studio45/Signifymap/Block/Signifymap.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifymap_Block_Signifymap extends Mage_Core_Block_Template
|
4 |
+
{
|
5 |
+
|
6 |
+
public function _prepareLayout()
|
7 |
+
{
|
8 |
+
return parent::_prepareLayout();
|
9 |
+
}
|
10 |
+
|
11 |
+
public function getSignifymap()
|
12 |
+
{
|
13 |
+
$storeId = Mage::app()->getStore()->getId();
|
14 |
+
$cats = Mage::getModel('catalog/category')->load(2)->getChildren();
|
15 |
+
$catIds = explode(',', $cats);
|
16 |
+
$this->setData('catIds', $catIds);
|
17 |
+
|
18 |
+
$product = Mage::getModel('catalog/product');
|
19 |
+
$products = $product->getCollection()->addStoreFilter($storeId)->getData();
|
20 |
+
$this->setData('products', $products);
|
21 |
+
|
22 |
+
$collection = Mage::getModel('cms/page')->getCollection()->addStoreFilter(Mage::app()->getStore()->getId());
|
23 |
+
$collection->getSelect()
|
24 |
+
->where('is_active = 1');
|
25 |
+
$this->setData('collection', $collection);
|
26 |
+
|
27 |
+
return Mage::getModel('Signifymap/config')->getRow();
|
28 |
+
}
|
29 |
+
|
30 |
+
}
|
app/code/community/Studio45/Signifymap/Helper/Data.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifymap_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
}
|
app/code/community/Studio45/Signifymap/Model/Config.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifymap_Model_Config extends Mage_Core_Model_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
public function _construct()
|
7 |
+
{
|
8 |
+
parent::_construct();
|
9 |
+
$this->_init('signifymap/config');
|
10 |
+
}
|
11 |
+
|
12 |
+
public function getRow()
|
13 |
+
{
|
14 |
+
$collection = $this->getCollection()
|
15 |
+
->setOrder('id', 'DESC');
|
16 |
+
$row = $collection->getFirstItem()->getData();
|
17 |
+
return $row;
|
18 |
+
}
|
19 |
+
|
20 |
+
}
|
app/code/community/Studio45/Signifymap/Model/Mysql4/Config.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifymap_Model_Mysql4_Config extends Mage_Core_Model_Mysql4_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
public function _construct()
|
7 |
+
{
|
8 |
+
// Note that the signifymap_id refers to the key field in your database table.
|
9 |
+
$this->_init('signifymap/config', 'id');
|
10 |
+
}
|
11 |
+
|
12 |
+
}
|
app/code/community/Studio45/Signifymap/Model/Mysql4/Config/Collection.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifymap_Model_Mysql4_Config_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
public function _construct()
|
7 |
+
{
|
8 |
+
parent::_construct();
|
9 |
+
$this->_init('signifymap/config');
|
10 |
+
}
|
11 |
+
|
12 |
+
}
|
app/code/community/Studio45/Signifymap/Model/Mysql4/Signifymap.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifymap_Model_Mysql4_Signifymap extends Mage_Core_Model_Mysql4_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
public function _construct()
|
7 |
+
{
|
8 |
+
// Note that the signifymap_id refers to the key field in your database table.
|
9 |
+
$this->_init('signifymap/signifymap', 'signifymap_id');
|
10 |
+
}
|
11 |
+
|
12 |
+
}
|
app/code/community/Studio45/Signifymap/Model/Mysql4/Signifymap/Collection.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifymap_Model_Mysql4_Signifymap_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
public function _construct()
|
7 |
+
{
|
8 |
+
parent::_construct();
|
9 |
+
$this->_init('signifymap/signifymap');
|
10 |
+
}
|
11 |
+
|
12 |
+
}
|
app/code/community/Studio45/Signifymap/Model/Signifymap.php
ADDED
@@ -0,0 +1,335 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifymap_Model_Signifymap extends Mage_Core_Model_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
public $google_url = "http://www.google.com/webmasters/tools/ping?sitemap=";
|
7 |
+
public $yahoo_url = "http://www.bing.com/webmaster/ping.aspx?siteMap=";
|
8 |
+
public $bing_url = "http://www.bing.com/webmaster/ping.aspx?siteMap=";
|
9 |
+
public $window_url = "http://www.bing.com/webmaster/ping.aspx?siteMap=";
|
10 |
+
|
11 |
+
public function _construct()
|
12 |
+
{
|
13 |
+
parent::_construct();
|
14 |
+
$this->_init('signifymap/signifymap');
|
15 |
+
}
|
16 |
+
|
17 |
+
public function getRow()
|
18 |
+
{
|
19 |
+
$collection = $this->getCollection()
|
20 |
+
->setOrder('signifymap_id', 'DESC');
|
21 |
+
$row = $collection->getFirstItem()->getData();
|
22 |
+
return $row;
|
23 |
+
}
|
24 |
+
|
25 |
+
public function update()
|
26 |
+
{
|
27 |
+
$arr_row = $this->getRow();
|
28 |
+
$this->submitSitemap($arr_row);
|
29 |
+
}
|
30 |
+
|
31 |
+
public function submitSitemap($data)
|
32 |
+
{
|
33 |
+
$data_dec = array("google"=>"", "yahoo"=>"", "bing"=>"","window"=>"");
|
34 |
+
$data=(array_merge($data_dec,$data));
|
35 |
+
$responses = array();
|
36 |
+
$responses['google_response'] = 'Not Configured';
|
37 |
+
$responses['yahoo_response'] = 'Not Configured';
|
38 |
+
$responses['bing_response'] = 'Not Configured';
|
39 |
+
$responses['window_response'] = 'Not Configured';
|
40 |
+
|
41 |
+
$base_url = $this->get_url() . "sitemap.xml";
|
42 |
+
$isCurl = function_exists('curl_init');
|
43 |
+
if ($isCurl) {
|
44 |
+
if ($data['google'] == 'yes') {
|
45 |
+
$url_google = $this->google_url . $base_url;
|
46 |
+
$string = $this->get_web_page($url_google);
|
47 |
+
|
48 |
+
$DOM = new DOMDocument;
|
49 |
+
@$DOM->loadHTML($string);
|
50 |
+
|
51 |
+
$items = $DOM->getElementsByTagName('body');
|
52 |
+
$array = array();
|
53 |
+
for ($i = 0; $i < $items->length; $i++)
|
54 |
+
$array = $items->item($i)->nodeValue;
|
55 |
+
$responses['google_response'] = substr($array, '0', 105);
|
56 |
+
}
|
57 |
+
|
58 |
+
if ($data['yahoo'] == 'yes') {
|
59 |
+
$url_yahoo = $this->yahoo_url . $base_url;
|
60 |
+
$responses['yahoo_response'] = strip_tags($this->get_web_page($url_yahoo));
|
61 |
+
}
|
62 |
+
|
63 |
+
if ($data['bing'] == 'yes') {
|
64 |
+
$url_bing = $this->bing_url . $base_url;
|
65 |
+
$responses['bing_response'] = strip_tags('Thanks for submitting your Sitemap. Join the Bing Webmaster Tools to see your Sitemaps status and more reports on how you are doing on Bing.');
|
66 |
+
}
|
67 |
+
|
68 |
+
if ($data['window'] == 'yes') {
|
69 |
+
$url_window = $this->window_url . $base_url;
|
70 |
+
$responses['window_response'] = strip_tags($this->get_web_page($url_window));
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
if ($data['google'] == 'yes' || $data['bing'] == 'yes' || $data['window'] == 'yes' || $data['yahoo'] == 'yes') {
|
75 |
+
$responses['date'] = date('Y-m-d h:i:s a', Mage::getModel('core/date')->timestamp(time()));
|
76 |
+
$signifyresponse = Mage::getModel('signifyresponse/signifyresponse')->setData($responses);
|
77 |
+
$signifyresponse->save();
|
78 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('signifymap')->__('sitemap was successfully submitted'));
|
79 |
+
} else
|
80 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('signifymap')->__('Please choose at least 1 channel'));
|
81 |
+
}
|
82 |
+
|
83 |
+
function get_web_page($url)
|
84 |
+
{
|
85 |
+
$options = array(
|
86 |
+
CURLOPT_RETURNTRANSFER => true, // return web page
|
87 |
+
CURLOPT_HEADER => false, // don't return headers
|
88 |
+
CURLOPT_FOLLOWLOCATION => true, // follow redirects
|
89 |
+
CURLOPT_ENCODING => "", // handle all encodings
|
90 |
+
CURLOPT_AUTOREFERER => true, // set referer on redirect
|
91 |
+
CURLOPT_CONNECTTIMEOUT => 120, // timeout on connect
|
92 |
+
CURLOPT_TIMEOUT => 120, // timeout on response
|
93 |
+
CURLOPT_MAXREDIRS => 10, // stop after 10 redirects
|
94 |
+
);
|
95 |
+
|
96 |
+
$ch = curl_init($url);
|
97 |
+
curl_setopt_array($ch, $options);
|
98 |
+
$content = curl_exec($ch);
|
99 |
+
$err = curl_errno($ch);
|
100 |
+
$errmsg = curl_error($ch);
|
101 |
+
$header = curl_getinfo($ch);
|
102 |
+
curl_close($ch);
|
103 |
+
$header['errno'] = $err;
|
104 |
+
$header['errmsg'] = $errmsg;
|
105 |
+
$header['content'] = $content;
|
106 |
+
return $content;
|
107 |
+
}
|
108 |
+
|
109 |
+
public function get_url()
|
110 |
+
{
|
111 |
+
$string = Mage::getBaseURL();
|
112 |
+
$string1 = str_replace("index.php/", "", $string);
|
113 |
+
$string2 = str_replace('/', '%2F', $string1);
|
114 |
+
$string3 = str_replace(':', '%3A', $string2);
|
115 |
+
return $string3;
|
116 |
+
}
|
117 |
+
|
118 |
+
public function generateSitemapXML()
|
119 |
+
{
|
120 |
+
$objOfInterval = Mage::getModel('signifymap/signifymap');
|
121 |
+
$signifyMapInterval = $objOfInterval->getRow();
|
122 |
+
|
123 |
+
if ($signifyMapInterval['format'] == 'hours')
|
124 |
+
{
|
125 |
+
$changefreqInterval = '<changefreq>hourly</changefreq>';
|
126 |
+
}
|
127 |
+
|
128 |
+
if ($signifyMapInterval['format'] == 'days')
|
129 |
+
{
|
130 |
+
$changefreqInterval = '<changefreq>daily</changefreq>';
|
131 |
+
}
|
132 |
+
|
133 |
+
if ($signifyMapInterval['format'] == 'weeks')
|
134 |
+
{
|
135 |
+
$changefreqInterval = '<changefreq>weekly</changefreq>';
|
136 |
+
}
|
137 |
+
|
138 |
+
if ($signifyMapInterval['format'] == 'months')
|
139 |
+
{
|
140 |
+
$changefreqInterval = '<changefreq>monthly</changefreq>';
|
141 |
+
}
|
142 |
+
|
143 |
+
/*Start Site URL & SEO Rewrite URL*/
|
144 |
+
$str = Mage::getStoreConfig(Mage_Core_Model_Url::XML_PATH_SECURE_URL);
|
145 |
+
$SiteBaseUrl = rtrim($str, '/');
|
146 |
+
|
147 |
+
$getRewriteUrlAdmin = Mage::getModel('core/config_data')->getCollection()->addFieldToFilter('path','web/seo/use_rewrites');
|
148 |
+
foreach ($getRewriteUrlAdmin as $SeoValue)
|
149 |
+
{
|
150 |
+
$getSeoRewrite = $SeoValue->getValue();
|
151 |
+
}
|
152 |
+
/*End Site URL & SEO Rewrite URL*/
|
153 |
+
|
154 |
+
$config = Mage::getModel('signifymap/config');
|
155 |
+
$row = $config->getRow();
|
156 |
+
if ($row['configured'] == 0)
|
157 |
+
return false;
|
158 |
+
$content = @file_get_contents('sitemap/sitemap.xml');
|
159 |
+
$content = str_replace('</urlset>', '', $content);
|
160 |
+
$content .= '<?xml version="1.0" encoding="utf-8"?><urlset>';
|
161 |
+
|
162 |
+
$content .= '<url><loc>'.$SiteBaseUrl.'</loc>';
|
163 |
+
$content .= '<lastmod>' . date('Y-m-d') . '</lastmod>';
|
164 |
+
$content .= $changefreqInterval;
|
165 |
+
$content .= '<priority>1.00</priority>';
|
166 |
+
$content .= '</url>';
|
167 |
+
|
168 |
+
$count = 0;
|
169 |
+
if ($row['category'] == 'yes') {
|
170 |
+
$catsCollation = Mage::getModel('catalog/category')->load(2)->getChildren();
|
171 |
+
$catIdsCollation = explode(',', $catsCollation);
|
172 |
+
foreach ($catIdsCollation as $catId) {
|
173 |
+
if ($catId != '') {
|
174 |
+
$category = Mage::getModel('catalog/category')->load($catId);
|
175 |
+
$subCats = Mage::getModel('catalog/category')->load($category->getId())->getChildren();
|
176 |
+
$subCatIds = explode(',', $subCats);
|
177 |
+
|
178 |
+
if($getSeoRewrite == '1')
|
179 |
+
{
|
180 |
+
$url = $str.$category->getRequestPath();
|
181 |
+
}else
|
182 |
+
{
|
183 |
+
$url = $category->getUrl();
|
184 |
+
}
|
185 |
+
|
186 |
+
if (strpos($content, $url) === false) {
|
187 |
+
$content .= '<url><loc>' . $url . '</loc>';
|
188 |
+
$content .= '<lastmod>' . date('Y-m-d') . '</lastmod>';
|
189 |
+
$content .= $changefreqInterval;
|
190 |
+
$content .= '<priority>0.60</priority>';
|
191 |
+
$content .= '</url>';
|
192 |
+
$count++;
|
193 |
+
}
|
194 |
+
|
195 |
+
if (count($subCatIds) > 0) {
|
196 |
+
foreach ($subCatIds as $subCat) {
|
197 |
+
$subCategory = Mage::getModel('catalog/category')->load($subCat);
|
198 |
+
$url = $subCategory->getUrl();
|
199 |
+
|
200 |
+
$strcatalog = $str . 'index.php/catalog/category/view/';
|
201 |
+
|
202 |
+
if($strcatalog != $url)
|
203 |
+
{
|
204 |
+
if($getSeoRewrite == '1')
|
205 |
+
{
|
206 |
+
$CategoryUrl = str_replace("index.php/", "", $url);
|
207 |
+
}else
|
208 |
+
{
|
209 |
+
$CategoryUrl = $url;
|
210 |
+
}
|
211 |
+
|
212 |
+
if (strpos($content, $url) === false) {
|
213 |
+
$content .= '<url><loc>' . $CategoryUrl . '</loc>';
|
214 |
+
$content .= '<lastmod>' . date('Y-m-d') . '</lastmod>';
|
215 |
+
$content .= $changefreqInterval;
|
216 |
+
$content .= '<priority>0.50</priority>';
|
217 |
+
$content .= '</url>';
|
218 |
+
$count++;
|
219 |
+
}
|
220 |
+
}
|
221 |
+
}
|
222 |
+
}
|
223 |
+
}
|
224 |
+
}
|
225 |
+
}
|
226 |
+
|
227 |
+
if ($row['product'] == 'yes') {
|
228 |
+
$storeId = Mage::app()->getStore()->getId();
|
229 |
+
$product = Mage::getModel('catalog/product');
|
230 |
+
$productsCollation = $product->getCollection()->addStoreFilter($storeId)->getData();
|
231 |
+
foreach ($productsCollation as $pro) {
|
232 |
+
$Stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($pro['entity_id'])->getIsinStock();
|
233 |
+
if ($Stock) {
|
234 |
+
$_product = $product->load($pro['entity_id']);
|
235 |
+
|
236 |
+
if($getSeoRewrite == '1')
|
237 |
+
{
|
238 |
+
$url = $str . $_product->getUrlPath();
|
239 |
+
}else
|
240 |
+
{
|
241 |
+
$url = Mage::getUrl() . $_product->getUrlPath();
|
242 |
+
}
|
243 |
+
|
244 |
+
if (strpos($content, $url) === false && $_product->getStatus() != 2) {
|
245 |
+
$content .= '<url><loc>' . $url . '</loc>';
|
246 |
+
$content .= '<lastmod>' . date('Y-m-d') . '</lastmod>';
|
247 |
+
$content .= $changefreqInterval;
|
248 |
+
$content .= '<priority>0.90</priority>';
|
249 |
+
$content .= '</url>';
|
250 |
+
$count++;
|
251 |
+
}
|
252 |
+
}
|
253 |
+
}
|
254 |
+
}
|
255 |
+
|
256 |
+
if ($row['cms'] == 'yes') {
|
257 |
+
$CmsCollection = Mage::getModel('cms/page')->getCollection()
|
258 |
+
->addFieldToFilter('is_active', 1);
|
259 |
+
/* ->addStoreFilter(Mage::app()->getWebsite()->getId()); */
|
260 |
+
|
261 |
+
foreach ($CmsCollection as $page) {
|
262 |
+
$PageData = $page->getData();
|
263 |
+
if ($PageData['identifier'] != 'no-route' && $PageData['identifier'] != 'enable-cookies' && $PageData['identifier'] != 'home') {
|
264 |
+
if($getSeoRewrite == '1')
|
265 |
+
{
|
266 |
+
$url = $str . $PageData['identifier'];
|
267 |
+
}else
|
268 |
+
{
|
269 |
+
$url = Mage::getUrl() . $PageData['identifier'];
|
270 |
+
}
|
271 |
+
if (strpos($content, $url) === false) {
|
272 |
+
$content .= '<url><loc>' . $url . '</loc>';
|
273 |
+
$content .= '<lastmod>' . date('Y-m-d') . '</lastmod>';
|
274 |
+
$content .= $changefreqInterval;
|
275 |
+
$content .= '<priority>0.80</priority>';
|
276 |
+
$content .= '</url>';
|
277 |
+
$count++;
|
278 |
+
}
|
279 |
+
}
|
280 |
+
}
|
281 |
+
}
|
282 |
+
$content .= '</urlset>';
|
283 |
+
$url_dir = Mage::getBaseDir() . "/sitemap.xml";
|
284 |
+
$file_handle = fopen($url_dir, 'w');
|
285 |
+
fwrite($file_handle, $content);
|
286 |
+
fclose($file_handle);
|
287 |
+
return true;
|
288 |
+
}
|
289 |
+
|
290 |
+
public function changeInterval()
|
291 |
+
{
|
292 |
+
$obj = Mage::getModel('signifymap/signifymap');
|
293 |
+
$signifymap = $obj->getRow();
|
294 |
+
|
295 |
+
if ($signifymap['format'] == 'hours')
|
296 |
+
{
|
297 |
+
$ping_interval = $signifymap['ping_interval'];
|
298 |
+
$cron = '0 */' . $ping_interval . ' * * *';
|
299 |
+
}
|
300 |
+
|
301 |
+
if ($signifymap['format'] == 'days')
|
302 |
+
{
|
303 |
+
$ping_interval = $signifymap['ping_interval'];
|
304 |
+
$cron = '0 0 */' . $ping_interval . ' * *';
|
305 |
+
}
|
306 |
+
|
307 |
+
if ($signifymap['format'] == 'weeks')
|
308 |
+
{
|
309 |
+
$ping_interval = $signifymap['ping_interval'];
|
310 |
+
if ($ping_interval == '')
|
311 |
+
{
|
312 |
+
$cron = '0 0 * * 0';
|
313 |
+
}else
|
314 |
+
{
|
315 |
+
$cron = '0 0 * * ' . $ping_interval;
|
316 |
+
}
|
317 |
+
}
|
318 |
+
|
319 |
+
if ($signifymap['format'] == 'months')
|
320 |
+
{
|
321 |
+
$ping_interval = $signifymap['ping_interval'];
|
322 |
+
if ($ping_interval == '')
|
323 |
+
{
|
324 |
+
$cron = '0 0 0 * *';
|
325 |
+
}else
|
326 |
+
{
|
327 |
+
$cron = '0 0 ' . $ping_interval . ' * *';
|
328 |
+
}
|
329 |
+
}
|
330 |
+
$url = Mage::getBaseDir('code') . '/community/Studio45/Signifymap/etc/config.xml';
|
331 |
+
$endreXML = simplexml_load_file($url);
|
332 |
+
$endreXML->crontab[0]->jobs[0]->Studio45_Signifymap[0]->schedule[0]->cron_expr = $cron;
|
333 |
+
file_put_contents($url, $endreXML->asXML());
|
334 |
+
}
|
335 |
+
}
|
app/code/community/Studio45/Signifymap/controllers/Adminhtml/SignifymapController.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifymap_Adminhtml_SignifymapController extends Mage_Adminhtml_Controller_Action
|
4 |
+
{
|
5 |
+
|
6 |
+
public function indexAction()
|
7 |
+
{
|
8 |
+
if (Mage::getModel('signifymap/signifymap')->generateSitemapXML())
|
9 |
+
$this->_forward('edit');
|
10 |
+
else
|
11 |
+
$this->_redirect('*/*/config');
|
12 |
+
}
|
13 |
+
|
14 |
+
public function editAction()
|
15 |
+
{
|
16 |
+
$this->loadLayout();
|
17 |
+
$this->_setActiveMenu('signifymap/items');
|
18 |
+
|
19 |
+
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
20 |
+
$this->_addContent($this->getLayout()->createBlock('signifymap/adminhtml_signifymap_edit'))
|
21 |
+
->_addLeft($this->getLayout()->createBlock('signifymap/adminhtml_signifymap_edit_tabs'));
|
22 |
+
|
23 |
+
$this->renderLayout();
|
24 |
+
}
|
25 |
+
|
26 |
+
public function saveAction()
|
27 |
+
{
|
28 |
+
if ($data = $this->getRequest()->getPost()) {
|
29 |
+
$model = Mage::getModel('signifymap/signifymap');
|
30 |
+
$model->submitSitemap($data);
|
31 |
+
$model->setData($data)
|
32 |
+
->save();
|
33 |
+
|
34 |
+
$model->changeInterval();
|
35 |
+
}
|
36 |
+
$this->_redirect('*/*/');
|
37 |
+
}
|
38 |
+
|
39 |
+
public function configAction()
|
40 |
+
{
|
41 |
+
$this->loadLayout();
|
42 |
+
$this->_setActiveMenu('signifymap/items');
|
43 |
+
|
44 |
+
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
45 |
+
|
46 |
+
$this->_addLeft($this->getLayout()->createBlock('signifymap/adminhtml_signifymap_edit_config'));
|
47 |
+
|
48 |
+
if ($data = $this->getRequest()->getPost()) {
|
49 |
+
$model = Mage::getModel('signifymap/config');
|
50 |
+
$data['configured'] = 1;
|
51 |
+
$model->setData($data)
|
52 |
+
->save();
|
53 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('signifymap')->__('Sitemap was successfully configured'));
|
54 |
+
$this->_redirect('*/*/config');
|
55 |
+
}
|
56 |
+
$this->renderLayout();
|
57 |
+
}
|
58 |
+
|
59 |
+
}
|
app/code/community/Studio45/Signifymap/controllers/IndexController.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifymap_IndexController extends Mage_Core_Controller_Front_Action
|
4 |
+
{
|
5 |
+
|
6 |
+
public function indexAction()
|
7 |
+
{
|
8 |
+
$this->loadLayout();
|
9 |
+
$this->renderLayout();
|
10 |
+
}
|
11 |
+
|
12 |
+
}
|
app/code/community/Studio45/Signifymap/etc/config.xml
ADDED
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Studio45_Signifymap>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</Studio45_Signifymap>
|
7 |
+
</modules>
|
8 |
+
<frontend>
|
9 |
+
<routers>
|
10 |
+
<signifymap>
|
11 |
+
<use>standard</use>
|
12 |
+
<args>
|
13 |
+
<module>Studio45_Signifymap</module>
|
14 |
+
<frontName>signifymap</frontName>
|
15 |
+
</args>
|
16 |
+
</signifymap>
|
17 |
+
</routers>
|
18 |
+
<layout>
|
19 |
+
<updates>
|
20 |
+
<signifymap>
|
21 |
+
<file>signifymap.xml</file>
|
22 |
+
</signifymap>
|
23 |
+
</updates>
|
24 |
+
</layout>
|
25 |
+
</frontend>
|
26 |
+
<admin>
|
27 |
+
<routers>
|
28 |
+
<signifymap>
|
29 |
+
<use>admin</use>
|
30 |
+
<args>
|
31 |
+
<module>Studio45_Signifymap</module>
|
32 |
+
<frontName>signifymap</frontName>
|
33 |
+
</args>
|
34 |
+
</signifymap>
|
35 |
+
</routers>
|
36 |
+
</admin>
|
37 |
+
<adminhtml>
|
38 |
+
<menu>
|
39 |
+
<signifymap module="signifymap">
|
40 |
+
<title>XML Sitemap</title>
|
41 |
+
<sort_order>71</sort_order>
|
42 |
+
<children>
|
43 |
+
<sitemap_submission translate="title" module="signifymap">
|
44 |
+
<title>Sitemaps Generator</title>
|
45 |
+
<action>signifymap/adminhtml_signifymap</action>
|
46 |
+
<sort_order>0</sort_order>
|
47 |
+
</sitemap_submission>
|
48 |
+
<frontend_configuration translate="title" module="signifymap">
|
49 |
+
<title>Sitemaps Configuration</title>
|
50 |
+
<action>signifymap/adminhtml_signifymap/config</action>
|
51 |
+
<sort_order>10</sort_order>
|
52 |
+
</frontend_configuration>
|
53 |
+
<view_response translate="title" module="signifymap">
|
54 |
+
<title>View Logs</title>
|
55 |
+
<action>signifyresponse/adminhtml_signifyresponse/index</action>
|
56 |
+
<sort_order>100</sort_order>
|
57 |
+
</view_response>
|
58 |
+
</children>
|
59 |
+
|
60 |
+
</signifymap>
|
61 |
+
</menu>
|
62 |
+
<acl>
|
63 |
+
<resources>
|
64 |
+
<all>
|
65 |
+
<title>Allow Everything</title>
|
66 |
+
</all>
|
67 |
+
<admin>
|
68 |
+
<children>
|
69 |
+
<Studio45_Signifymap>
|
70 |
+
<title>Signifymap Module</title>
|
71 |
+
<sort_order>10</sort_order>
|
72 |
+
</Studio45_Signifymap>
|
73 |
+
</children>
|
74 |
+
</admin>
|
75 |
+
</resources>
|
76 |
+
</acl>
|
77 |
+
<layout>
|
78 |
+
<updates>
|
79 |
+
<signifymap>
|
80 |
+
<file>signifymap.xml</file>
|
81 |
+
</signifymap>
|
82 |
+
</updates>
|
83 |
+
</layout>
|
84 |
+
</adminhtml>
|
85 |
+
<global>
|
86 |
+
<models>
|
87 |
+
<signifymap>
|
88 |
+
<class>Studio45_Signifymap_Model</class>
|
89 |
+
<resourceModel>signifymap_mysql4</resourceModel>
|
90 |
+
</signifymap>
|
91 |
+
|
92 |
+
<signifymap_mysql4>
|
93 |
+
<class>Studio45_Signifymap_Model_Mysql4</class>
|
94 |
+
<entities>
|
95 |
+
<signifymap>
|
96 |
+
<table>signifymap</table>
|
97 |
+
</signifymap>
|
98 |
+
<config>
|
99 |
+
<table>signifymap_config</table>
|
100 |
+
</config>
|
101 |
+
</entities>
|
102 |
+
</signifymap_mysql4>
|
103 |
+
|
104 |
+
</models>
|
105 |
+
<resources>
|
106 |
+
<signifymap_setup>
|
107 |
+
<setup>
|
108 |
+
<module>Studio45_Signifymap</module>
|
109 |
+
</setup>
|
110 |
+
<connection>
|
111 |
+
<use>core_setup</use>
|
112 |
+
</connection>
|
113 |
+
</signifymap_setup>
|
114 |
+
<signifymap_write>
|
115 |
+
<connection>
|
116 |
+
<use>core_write</use>
|
117 |
+
</connection>
|
118 |
+
</signifymap_write>
|
119 |
+
<signifymap_read>
|
120 |
+
<connection>
|
121 |
+
<use>core_read</use>
|
122 |
+
</connection>
|
123 |
+
</signifymap_read>
|
124 |
+
</resources>
|
125 |
+
<blocks>
|
126 |
+
<signifymap>
|
127 |
+
<class>Studio45_Signifymap_Block</class>
|
128 |
+
</signifymap>
|
129 |
+
</blocks>
|
130 |
+
<helpers>
|
131 |
+
<signifymap>
|
132 |
+
<class>Studio45_Signifymap_Helper</class>
|
133 |
+
</signifymap>
|
134 |
+
</helpers>
|
135 |
+
</global>
|
136 |
+
|
137 |
+
<crontab>
|
138 |
+
<jobs>
|
139 |
+
<Studio45_Signifymap>
|
140 |
+
<schedule>
|
141 |
+
<cron_expr>0 */1 * * *</cron_expr>
|
142 |
+
</schedule>
|
143 |
+
<run>
|
144 |
+
<model>signifymap/signifymap::update</model>
|
145 |
+
</run>
|
146 |
+
</Studio45_Signifymap>
|
147 |
+
</jobs>
|
148 |
+
</crontab>
|
149 |
+
|
150 |
+
</config>
|
app/code/community/Studio45/Signifymap/sql/signifymap_setup/mysql4-install-0.1.0.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
|
7 |
+
|
8 |
+
$installer->run("
|
9 |
+
|
10 |
+
-- DROP TABLE IF EXISTS {$this->getTable('signifymap')};
|
11 |
+
CREATE TABLE {$this->getTable('signifymap')} (
|
12 |
+
`signifymap_id` int(11) NOT NULL auto_increment,
|
13 |
+
`ping_interval` int(12),
|
14 |
+
`format` varchar(20),
|
15 |
+
`google` varchar(20) NOT NULL default 'no',
|
16 |
+
`bing` varchar(20) NOT NULL default 'no',
|
17 |
+
`window` varchar(20) NOT NULL default 'no',
|
18 |
+
`yahoo` varchar(20) NOT NULL default 'no',
|
19 |
+
PRIMARY KEY (`signifymap_id`)
|
20 |
+
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
21 |
+
|
22 |
+
|
23 |
+
|
24 |
+
-- DROP TABLE IF EXISTS {$this->getTable('signifymap_config')};
|
25 |
+
CREATE TABLE {$this->getTable('signifymap_config')} (
|
26 |
+
`id` int(11) NOT NULL auto_increment,
|
27 |
+
`product` varchar(20),
|
28 |
+
`category` varchar(20),
|
29 |
+
`cms` varchar(20),
|
30 |
+
`other` varchar(20),
|
31 |
+
`configured` int(2) NOT NULL DEFAULT 1,
|
32 |
+
PRIMARY KEY (`id`)
|
33 |
+
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
34 |
+
");
|
35 |
+
|
36 |
+
$installer->endSetup();
|
app/code/community/Studio45/Signifyresponse/Block/Adminhtml/Signifyresponse.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifyresponse_Block_Adminhtml_Signifyresponse extends Mage_Adminhtml_Block_Widget_Grid_Container
|
4 |
+
{
|
5 |
+
|
6 |
+
public function __construct()
|
7 |
+
{
|
8 |
+
$this->_controller = 'adminhtml_signifyresponse';
|
9 |
+
$this->_blockGroup = 'signifyresponse';
|
10 |
+
$this->_headerText = Mage::helper('signifyresponse')->__('View Logs');
|
11 |
+
parent::__construct();
|
12 |
+
$this->removeButton('add');
|
13 |
+
}
|
14 |
+
|
15 |
+
}
|
app/code/community/Studio45/Signifyresponse/Block/Adminhtml/Signifyresponse/Description.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifyresponse_Block_Adminhtml_Signifyresponse_Description extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Text
|
4 |
+
{
|
5 |
+
|
6 |
+
public function render(Varien_Object $row)
|
7 |
+
{
|
8 |
+
$html = parent::render($row);
|
9 |
+
if (strlen($html) > 250)
|
10 |
+
return substr($html, 0, 250) . '...';
|
11 |
+
else
|
12 |
+
return $html;
|
13 |
+
}
|
14 |
+
|
15 |
+
}
|
16 |
+
|
17 |
+
?>
|
app/code/community/Studio45/Signifyresponse/Block/Adminhtml/Signifyresponse/Grid.php
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifyresponse_Block_Adminhtml_Signifyresponse_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
4 |
+
{
|
5 |
+
|
6 |
+
public function __construct()
|
7 |
+
{
|
8 |
+
parent::__construct();
|
9 |
+
$this->setId('signifyresponseGrid');
|
10 |
+
$this->setDefaultSort('signifyresponse_id');
|
11 |
+
$this->setDefaultDir('ASC');
|
12 |
+
$this->setSaveParametersInSession(true);
|
13 |
+
}
|
14 |
+
|
15 |
+
protected function _prepareCollection()
|
16 |
+
{
|
17 |
+
$collection = Mage::getModel('signifyresponse/signifyresponse')->getCollection();
|
18 |
+
$this->setCollection($collection);
|
19 |
+
return parent::_prepareCollection();
|
20 |
+
}
|
21 |
+
|
22 |
+
protected function _prepareColumns()
|
23 |
+
{
|
24 |
+
$this->addColumn('signifyresponse_id', array(
|
25 |
+
'header' => Mage::helper('signifyresponse')->__('ID'),
|
26 |
+
'align' => 'right',
|
27 |
+
'width' => '10px',
|
28 |
+
'index' => 'signifyresponse_id',
|
29 |
+
));
|
30 |
+
|
31 |
+
$this->addColumn('google_response', array(
|
32 |
+
'header' => Mage::helper('signifyresponse')->__('Google Webmasters Response'),
|
33 |
+
'align' => 'left',
|
34 |
+
'index' => 'google_response',
|
35 |
+
'renderer' => 'signifyresponse/adminhtml_signifyresponse_description'
|
36 |
+
));
|
37 |
+
|
38 |
+
|
39 |
+
$this->addColumn('bing_response', array(
|
40 |
+
'header' => Mage::helper('signifyresponse')->__('Bing Webmasters Response'),
|
41 |
+
'align' => 'left',
|
42 |
+
'index' => 'bing_response',
|
43 |
+
'renderer' => 'signifyresponse/adminhtml_signifyresponse_description'
|
44 |
+
));
|
45 |
+
|
46 |
+
|
47 |
+
|
48 |
+
$this->addColumn('date', array(
|
49 |
+
'header' => Mage::helper('signifyresponse')->__('Date'),
|
50 |
+
'align' => 'left',
|
51 |
+
'index' => 'date',
|
52 |
+
));
|
53 |
+
|
54 |
+
|
55 |
+
|
56 |
+
return parent::_prepareColumns();
|
57 |
+
}
|
58 |
+
|
59 |
+
protected function _prepareMassaction()
|
60 |
+
{
|
61 |
+
$this->setMassactionIdField('signifyresponse_id');
|
62 |
+
$this->getMassactionBlock()->setFormFieldName('signifyresponse');
|
63 |
+
|
64 |
+
$this->getMassactionBlock()->addItem('delete', array(
|
65 |
+
'label' => Mage::helper('signifyresponse')->__('Delete'),
|
66 |
+
'url' => $this->getUrl('*/*/massDelete'),
|
67 |
+
'confirm' => Mage::helper('signifyresponse')->__('Are you sure?')
|
68 |
+
));
|
69 |
+
|
70 |
+
|
71 |
+
return $this;
|
72 |
+
}
|
73 |
+
|
74 |
+
public function getRowUrl($row)
|
75 |
+
{
|
76 |
+
// return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
77 |
+
}
|
78 |
+
|
79 |
+
}
|
app/code/community/Studio45/Signifyresponse/Helper/Data.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifyresponse_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
}
|
app/code/community/Studio45/Signifyresponse/Model/Mysql4/Signifyresponse.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifyresponse_Model_Mysql4_Signifyresponse extends Mage_Core_Model_Mysql4_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
public function _construct()
|
7 |
+
{
|
8 |
+
// Note that the signifyresponse_id refers to the key field in your database table.
|
9 |
+
$this->_init('signifyresponse/signifyresponse', 'signifyresponse_id');
|
10 |
+
}
|
11 |
+
|
12 |
+
}
|
app/code/community/Studio45/Signifyresponse/Model/Mysql4/Signifyresponse/Collection.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifyresponse_Model_Mysql4_Signifyresponse_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
public function _construct()
|
7 |
+
{
|
8 |
+
parent::_construct();
|
9 |
+
$this->_init('signifyresponse/signifyresponse');
|
10 |
+
}
|
11 |
+
|
12 |
+
}
|
app/code/community/Studio45/Signifyresponse/Model/Signifyresponse.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifyresponse_Model_Signifyresponse extends Mage_Core_Model_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
public function _construct()
|
7 |
+
{
|
8 |
+
parent::_construct();
|
9 |
+
$this->_init('signifyresponse/signifyresponse');
|
10 |
+
}
|
11 |
+
|
12 |
+
public function getRow()
|
13 |
+
{
|
14 |
+
$RowCollection = $this->getCollection()
|
15 |
+
->setOrder('signifyresponse_id', 'DESC');
|
16 |
+
$row = $RowCollection->getFirstItem()->getData();
|
17 |
+
return $row;
|
18 |
+
}
|
19 |
+
|
20 |
+
}
|
app/code/community/Studio45/Signifyresponse/controllers/Adminhtml/SignifyresponseController.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Studio45_Signifyresponse_Adminhtml_SignifyresponseController extends Mage_Adminhtml_Controller_Action
|
4 |
+
{
|
5 |
+
|
6 |
+
protected function _initAction()
|
7 |
+
{
|
8 |
+
$this->loadLayout()
|
9 |
+
->_setActiveMenu('signifymap/items');
|
10 |
+
|
11 |
+
return $this;
|
12 |
+
}
|
13 |
+
|
14 |
+
public function indexAction()
|
15 |
+
{
|
16 |
+
$config = Mage::getModel('signifymap/config');
|
17 |
+
$row = $config->getRow();
|
18 |
+
if ($row['configured'] == 0)
|
19 |
+
$this->_redirect('signifymap/adminhtml_signifymap/config');
|
20 |
+
$this->_initAction()
|
21 |
+
->renderLayout();
|
22 |
+
}
|
23 |
+
|
24 |
+
public function deleteAction()
|
25 |
+
{
|
26 |
+
if ($this->getRequest()->getParam('id') > 0) {
|
27 |
+
try {
|
28 |
+
$model = Mage::getModel('signifyresponse/signifyresponse');
|
29 |
+
$model->setId($this->getRequest()->getParam('id'))
|
30 |
+
->delete();
|
31 |
+
|
32 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
|
33 |
+
$this->_redirect('*/*/');
|
34 |
+
} catch (Exception $e) {
|
35 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
36 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
37 |
+
}
|
38 |
+
}
|
39 |
+
$this->_redirect('*/*/');
|
40 |
+
}
|
41 |
+
|
42 |
+
public function massDeleteAction()
|
43 |
+
{
|
44 |
+
$signifyresponseIds = $this->getRequest()->getParam('signifyresponse');
|
45 |
+
if (!is_array($signifyresponseIds)) {
|
46 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
|
47 |
+
} else {
|
48 |
+
try {
|
49 |
+
foreach ($signifyresponseIds as $signifyresponseId) {
|
50 |
+
$signifyresponse = Mage::getModel('signifyresponse/signifyresponse')->load($signifyresponseId);
|
51 |
+
$signifyresponse->delete();
|
52 |
+
}
|
53 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
54 |
+
Mage::helper('adminhtml')->__('Total of %d record(s) were successfully deleted', count($signifyresponseIds)));
|
55 |
+
} catch (Exception $e) {
|
56 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
57 |
+
}
|
58 |
+
}
|
59 |
+
$this->_redirect('*/*/index');
|
60 |
+
}
|
61 |
+
|
62 |
+
}
|
app/code/community/Studio45/Signifyresponse/etc/config.xml
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Studio45_Signifyresponse>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</Studio45_Signifyresponse>
|
7 |
+
</modules>
|
8 |
+
<frontend>
|
9 |
+
<routers>
|
10 |
+
<signifyresponse>
|
11 |
+
<use>standard</use>
|
12 |
+
<args>
|
13 |
+
<module>Studio45_Signifyresponse</module>
|
14 |
+
<frontName>signifyresponse</frontName>
|
15 |
+
</args>
|
16 |
+
</signifyresponse>
|
17 |
+
</routers>
|
18 |
+
<layout>
|
19 |
+
<updates>
|
20 |
+
<signifyresponse>
|
21 |
+
<file>signifyresponse.xml</file>
|
22 |
+
</signifyresponse>
|
23 |
+
</updates>
|
24 |
+
</layout>
|
25 |
+
</frontend>
|
26 |
+
<admin>
|
27 |
+
<routers>
|
28 |
+
<signifyresponse>
|
29 |
+
<use>admin</use>
|
30 |
+
<args>
|
31 |
+
<module>Studio45_Signifyresponse</module>
|
32 |
+
<frontName>signifyresponse</frontName>
|
33 |
+
</args>
|
34 |
+
</signifyresponse>
|
35 |
+
</routers>
|
36 |
+
</admin>
|
37 |
+
<adminhtml>
|
38 |
+
|
39 |
+
<acl>
|
40 |
+
<resources>
|
41 |
+
<all>
|
42 |
+
<title>Allow Everything</title>
|
43 |
+
</all>
|
44 |
+
<admin>
|
45 |
+
<children>
|
46 |
+
<Studio45_Signifyresponse>
|
47 |
+
<title>Signifyresponse Module</title>
|
48 |
+
<sort_order>10</sort_order>
|
49 |
+
</Studio45_Signifyresponse>
|
50 |
+
</children>
|
51 |
+
</admin>
|
52 |
+
</resources>
|
53 |
+
</acl>
|
54 |
+
<layout>
|
55 |
+
<updates>
|
56 |
+
<signifyresponse>
|
57 |
+
<file>signifyresponse.xml</file>
|
58 |
+
</signifyresponse>
|
59 |
+
</updates>
|
60 |
+
</layout>
|
61 |
+
</adminhtml>
|
62 |
+
<global>
|
63 |
+
<models>
|
64 |
+
<signifyresponse>
|
65 |
+
<class>Studio45_Signifyresponse_Model</class>
|
66 |
+
<resourceModel>signifyresponse_mysql4</resourceModel>
|
67 |
+
</signifyresponse>
|
68 |
+
<signifyresponse_mysql4>
|
69 |
+
<class>Studio45_Signifyresponse_Model_Mysql4</class>
|
70 |
+
<entities>
|
71 |
+
<signifyresponse>
|
72 |
+
<table>signifyresponse</table>
|
73 |
+
</signifyresponse>
|
74 |
+
</entities>
|
75 |
+
</signifyresponse_mysql4>
|
76 |
+
</models>
|
77 |
+
<resources>
|
78 |
+
<signifyresponse_setup>
|
79 |
+
<setup>
|
80 |
+
<module>Studio45_Signifyresponse</module>
|
81 |
+
</setup>
|
82 |
+
<connection>
|
83 |
+
<use>core_setup</use>
|
84 |
+
</connection>
|
85 |
+
</signifyresponse_setup>
|
86 |
+
<signifyresponse_write>
|
87 |
+
<connection>
|
88 |
+
<use>core_write</use>
|
89 |
+
</connection>
|
90 |
+
</signifyresponse_write>
|
91 |
+
<signifyresponse_read>
|
92 |
+
<connection>
|
93 |
+
<use>core_read</use>
|
94 |
+
</connection>
|
95 |
+
</signifyresponse_read>
|
96 |
+
</resources>
|
97 |
+
<blocks>
|
98 |
+
<signifyresponse>
|
99 |
+
<class>Studio45_Signifyresponse_Block</class>
|
100 |
+
</signifyresponse>
|
101 |
+
</blocks>
|
102 |
+
<helpers>
|
103 |
+
<signifyresponse>
|
104 |
+
<class>Studio45_Signifyresponse_Helper</class>
|
105 |
+
</signifyresponse>
|
106 |
+
</helpers>
|
107 |
+
</global>
|
108 |
+
</config>
|
app/code/community/Studio45/Signifyresponse/sql/signifyresponse_setup/mysql4-install-0.1.0.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
|
7 |
+
$installer->run("
|
8 |
+
|
9 |
+
-- DROP TABLE IF EXISTS {$this->getTable('signifyresponse')};
|
10 |
+
CREATE TABLE {$this->getTable('signifyresponse')} (
|
11 |
+
`signifyresponse_id` int(11) NOT NULL auto_increment,
|
12 |
+
`google_response` text,
|
13 |
+
`yahoo_response` text,
|
14 |
+
`bing_response` text,
|
15 |
+
`window_response` text,
|
16 |
+
`date` timestamp,
|
17 |
+
PRIMARY KEY (`signifyresponse_id`)
|
18 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
19 |
+
");
|
20 |
+
|
21 |
+
$installer->endSetup();
|
app/design/adminhtml/default/default/layout/signifymap.xml
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<signifymap_adminhtml_signifymap_index>
|
4 |
+
<reference name="content">
|
5 |
+
<block type="signifymap/adminhtml_signifymap" name="signifymap" />
|
6 |
+
</reference>
|
7 |
+
</signifymap_adminhtml_signifymap_index>
|
8 |
+
|
9 |
+
<signifymap_adminhtml_signifymap_config>
|
10 |
+
<reference name="content">
|
11 |
+
<block type="signifymap/adminhtml_signifymap_edit_tab_config" name="signifymap_config"/>
|
12 |
+
</reference>
|
13 |
+
</signifymap_adminhtml_signifymap_config>
|
14 |
+
</layout>
|
app/design/adminhtml/default/default/layout/signifyresponse.xml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<signifyresponse_adminhtml_signifyresponse_index>
|
4 |
+
<reference name="content">
|
5 |
+
<block type="signifyresponse/adminhtml_signifyresponse" name="signifyresponse" />
|
6 |
+
</reference>
|
7 |
+
</signifyresponse_adminhtml_signifyresponse_index>
|
8 |
+
</layout>
|
app/design/frontend/base/default/layout/signifymap.xml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<default>
|
4 |
+
</default>
|
5 |
+
<signifymap_index_index>
|
6 |
+
<reference name="content">
|
7 |
+
<block type="signifymap/signifymap" name="signifymap" template="signifymap/signifymap.phtml" />
|
8 |
+
</reference>
|
9 |
+
</signifymap_index_index>
|
10 |
+
</layout>
|
app/design/frontend/base/default/template/signifymap/signifymap.phtml
ADDED
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php $row = $this->getSignifymap(); ?>
|
2 |
+
|
3 |
+
<h4><?php echo $this->__('Sitemap') ?></h4>
|
4 |
+
|
5 |
+
<?php if ($row['category'] == 'yes') { ?>
|
6 |
+
<div class="block block-reviews">
|
7 |
+
<div class="block-title">
|
8 |
+
<strong><span>Categories</span></strong>
|
9 |
+
</div>
|
10 |
+
<div class="block-content">
|
11 |
+
<ul>
|
12 |
+
<?php foreach ($this->getData('catIds') as $catId): ?>
|
13 |
+
<li>
|
14 |
+
<?php $category = Mage::getModel('catalog/category')->load($catId); ?>
|
15 |
+
<a href="<?php echo $category->getUrl(); ?>" style="font:bold;font-size:13px;"><?php echo $category->getName(); ?></a>
|
16 |
+
<?php
|
17 |
+
$subCats = Mage::getModel('catalog/category')->load($category->getId())->getChildren();
|
18 |
+
$subCatIds = explode(',', $subCats);
|
19 |
+
?>
|
20 |
+
<?php if (count($subCatIds) > 1): ?>
|
21 |
+
<ul>
|
22 |
+
<?php foreach ($subCatIds as $subCat) : ?>
|
23 |
+
<li>
|
24 |
+
<?php $subCategory = Mage::getModel('catalog/category')->load($subCat); ?>
|
25 |
+
<a href="<?php echo $subCategory->getUrl(); ?>" style="font:bold;font-size:11px;"><?php echo $subCategory->getName(); ?></a>
|
26 |
+
</li>
|
27 |
+
<?php endforeach; ?>
|
28 |
+
</ul>
|
29 |
+
<?php endif; ?>
|
30 |
+
</li>
|
31 |
+
<?php endforeach; ?>
|
32 |
+
</ul>
|
33 |
+
</div>
|
34 |
+
</div>
|
35 |
+
<?php } ?>
|
36 |
+
|
37 |
+
<?php if ($row['product'] == 'yes') { ?>
|
38 |
+
<div class="block block-reviews">
|
39 |
+
<div class="block-title">
|
40 |
+
<strong><span>Products</span></strong>
|
41 |
+
</div>
|
42 |
+
<div class="block-content"><ul>
|
43 |
+
<?php
|
44 |
+
$storeId = Mage::app()->getStore()->getId();
|
45 |
+
$product = Mage::getModel('catalog/product');
|
46 |
+
foreach ($this->getData('products') as $pro) { //loop for getting products
|
47 |
+
$Stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($pro['entity_id'])->getIsinStock();
|
48 |
+
if ($Stock) {
|
49 |
+
$_product = $product->load($pro['entity_id']);
|
50 |
+
?>
|
51 |
+
<?php if ($_product->getStatus() != 2) { ?>
|
52 |
+
<li><a href="<?php echo $_product->getUrlPath() ?>" style="font:bold;font-size:13px;"><?php
|
53 |
+
echo $_product->getName();
|
54 |
+
}
|
55 |
+
?></a></li>
|
56 |
+
<?php } ?>
|
57 |
+
<?php } ?>
|
58 |
+
</ul>
|
59 |
+
</div>
|
60 |
+
</div>
|
61 |
+
|
62 |
+
<?php } ?>
|
63 |
+
|
64 |
+
<?php if ($row['cms'] == 'yes') { ?>
|
65 |
+
<div class="block block-reviews">
|
66 |
+
<div class="block-title">
|
67 |
+
<strong><span>CMS</span></strong>
|
68 |
+
</div>
|
69 |
+
<ul>
|
70 |
+
<?php foreach ($this->getData('collection') as $page): ?>
|
71 |
+
<?php $PageData = $page->getData(); ?>
|
72 |
+
<?php if ($PageData['identifier'] != 'no-route' && $PageData['identifier'] != 'enable-cookies') { ?>
|
73 |
+
<li>
|
74 |
+
<a href="<?php echo $PageData['identifier'] ?>" style="font:bold;font-size:13px;"><?php echo $PageData['title'] ?></a>
|
75 |
+
</li>
|
76 |
+
<?php } ?>
|
77 |
+
<?php endforeach; ?>
|
78 |
+
</div>
|
79 |
+
<?php } ?>
|
80 |
+
|
81 |
+
|
82 |
+
<?php if ($row['other'] == 'yes') { ?>
|
83 |
+
<div class="block block-reviews">
|
84 |
+
<div class="block-title">
|
85 |
+
<strong><span>Other</span></strong>
|
86 |
+
</div>
|
87 |
+
<ul>
|
88 |
+
|
89 |
+
<li><a href="<?php echo Mage::getUrl() . "customer/account"; ?>" style="font:bold;font-size:13px;">My Account</a></li>
|
90 |
+
<li><a href="<?php echo Mage::getUrl() . "wishlist"; ?>" style="font:bold;font-size:13px;">My Wishlist</a></li>
|
91 |
+
<li><a href="<?php echo Mage::getUrl() . "checkout/cart"; ?>" style="font:bold;font-size:13px;">My Cart</a></li>
|
92 |
+
<li><a href="<?php echo Mage::getUrl() . "checkout/"; ?>" style="font:bold;font-size:13px;">Checkout</a></li>
|
93 |
+
<li><a href="<?php echo Mage::getUrl() . "catalogsearch/advanced"; ?>" style="font:bold;font-size:13px;">Advanced Search</a></li>
|
94 |
+
<li><a href="<?php echo Mage::getUrl() . "customer/account"; ?>" style="font:bold;font-size:13px;">Login</a></li>
|
95 |
+
|
96 |
+
</div>
|
97 |
+
<?php } ?>
|
app/etc/modules/Studio45_Signifymap.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Studio45_Signifymap>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Studio45_Signifymap>
|
8 |
+
</modules>
|
9 |
+
</config>
|
app/etc/modules/Studio45_Signifyresponse.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Studio45_Signifyresponse>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Studio45_Signifyresponse>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Seonorthmelbourne_sitemap</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="https://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>The SEO North Melbourne Sitemap Extension generates XML sitemap which contains URL's for all public pages of your website, and submit the xml file on different channel.</summary>
|
10 |
+
<description>The SEO North Melbourne Sitemap Extension generates a special XML sitemap which will help search engines like Google & Bing to better index your website and retrieve it more efficiently.</description>
|
11 |
+
<notes>This is stable version of this extension and has been tested on various version of community editions. In this particular version we are supporting it to run on PHP V 7.0.99</notes>
|
12 |
+
<authors><author><name>SEO North Melbourne</name><user>seonorthmelbourne</user><email>info@seonorthmelbourne.com.au</email></author></authors>
|
13 |
+
<date>2016-12-31</date>
|
14 |
+
<time>11:17:24</time>
|
15 |
+
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="signifyresponse.xml" hash="c4ccccb2561fb7d4b9303808729273a5"/><file name="signifymap.xml" hash="6c776c91936e3aad2b440c12490b6e26"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="signifymap.xml" hash="e8954fc0f3b78687ba30cbf98d026750"/></dir><dir name="template"><dir name="signifymap"><file name="signifymap.phtml" hash="8ebc1812b35737fb28bb972703efc0de"/><file name="signifymap.phtml" hash="8ebc1812b35737fb28bb972703efc0de"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Studio45_Signifymap.xml" hash="f06d3856ce1e1da1c0d2ccdd86f05c87"/><file name="Studio45_Signifyresponse.xml" hash="c88af2e742f21f4934d1d7e30bd3aa56"/></dir></target><target name="magecommunity"><dir name="Studio45"><dir name="Signifyresponse"><dir name="sql"><dir name="signifyresponse_setup"><file name="mysql4-install-0.1.0.php" hash="4ec96ed53c26da71be2a878389fc26bf"/><file name="mysql4-install-0.1.0.php" hash="4ec96ed53c26da71be2a878389fc26bf"/><file name="mysql4-install-0.1.0.php" hash="4ec96ed53c26da71be2a878389fc26bf"/><file name="mysql4-install-0.1.0.php" hash="4ec96ed53c26da71be2a878389fc26bf"/></dir></dir><dir name="Model"><dir name="Mysql4"><dir name="Signifyresponse"><file name="Collection.php" hash="d2e4ea9ef8c7200999a345a0c315d865"/><file name="Collection.php" hash="d2e4ea9ef8c7200999a345a0c315d865"/><file name="Collection.php" hash="d2e4ea9ef8c7200999a345a0c315d865"/><file name="Collection.php" hash="d2e4ea9ef8c7200999a345a0c315d865"/><file name="Collection.php" hash="d2e4ea9ef8c7200999a345a0c315d865"/></dir><file name="Signifyresponse.php" hash="d39eb0382d5e1e01623ee0d93b791375"/><file name="Signifyresponse.php" hash="d39eb0382d5e1e01623ee0d93b791375"/><file name="Signifyresponse.php" hash="d39eb0382d5e1e01623ee0d93b791375"/><file name="Signifyresponse.php" hash="d39eb0382d5e1e01623ee0d93b791375"/></dir><file name="Signifyresponse.php" hash="011bcec8ece0d839d5f2c893d7a06d51"/><file name="Signifyresponse.php" hash="011bcec8ece0d839d5f2c893d7a06d51"/><file name="Signifyresponse.php" hash="011bcec8ece0d839d5f2c893d7a06d51"/></dir><dir name="Helper"><file name="Data.php" hash="e34e0cd66173d773f0afef5d1091fa84"/><file name="Data.php" hash="e34e0cd66173d773f0afef5d1091fa84"/><file name="Data.php" hash="e34e0cd66173d773f0afef5d1091fa84"/></dir><dir name="etc"><file name="config.xml" hash="c3edd658b8fae7e1efd9f1dd0212ea51"/><file name="config.xml" hash="c3edd658b8fae7e1efd9f1dd0212ea51"/><file name="config.xml" hash="c3edd658b8fae7e1efd9f1dd0212ea51"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="SignifyresponseController.php" hash="52d80a180720f1390f4e9de3007cb0a6"/><file name="SignifyresponseController.php" hash="52d80a180720f1390f4e9de3007cb0a6"/><file name="SignifyresponseController.php" hash="52d80a180720f1390f4e9de3007cb0a6"/><file name="SignifyresponseController.php" hash="52d80a180720f1390f4e9de3007cb0a6"/></dir></dir><dir name="Block"><dir name="Adminhtml"><dir name="Signifyresponse"><file name="Description.php" hash="ba9cfc3558177bbe9d1ec17e81f8b23b"/><file name="Grid.php" hash="52ee3d7df1cf152fb80e790863e95a94"/><file name="Description.php" hash="ba9cfc3558177bbe9d1ec17e81f8b23b"/><file name="Grid.php" hash="52ee3d7df1cf152fb80e790863e95a94"/><file name="Description.php" hash="ba9cfc3558177bbe9d1ec17e81f8b23b"/><file name="Grid.php" hash="52ee3d7df1cf152fb80e790863e95a94"/><file name="Description.php" hash="ba9cfc3558177bbe9d1ec17e81f8b23b"/><file name="Grid.php" hash="52ee3d7df1cf152fb80e790863e95a94"/><file name="Description.php" hash="ba9cfc3558177bbe9d1ec17e81f8b23b"/><file name="Grid.php" hash="52ee3d7df1cf152fb80e790863e95a94"/></dir><file name="Signifyresponse.php" hash="017198502de16d79005bf36885dbfab8"/><file name="Signifyresponse.php" hash="017198502de16d79005bf36885dbfab8"/><file name="Signifyresponse.php" hash="017198502de16d79005bf36885dbfab8"/><file name="Signifyresponse.php" hash="017198502de16d79005bf36885dbfab8"/></dir></dir></dir><dir name="Signifymap"><dir name="sql"><dir name="signifymap_setup"><file name="mysql4-install-0.1.0.php" hash="182231bb6172b8db564999c752895555"/><file name="mysql4-install-0.1.0.php" hash="182231bb6172b8db564999c752895555"/><file name="mysql4-install-0.1.0.php" hash="182231bb6172b8db564999c752895555"/><file name="mysql4-install-0.1.0.php" hash="182231bb6172b8db564999c752895555"/></dir></dir><dir name="Model"><dir name="Mysql4"><dir name="Config"><file name="Collection.php" hash="0c9120728ec4c9eb4509ec5a3dd3a41a"/><file name="Collection.php" hash="0c9120728ec4c9eb4509ec5a3dd3a41a"/><file name="Collection.php" hash="0c9120728ec4c9eb4509ec5a3dd3a41a"/><file name="Collection.php" hash="0c9120728ec4c9eb4509ec5a3dd3a41a"/><file name="Collection.php" hash="0c9120728ec4c9eb4509ec5a3dd3a41a"/></dir><dir name="Signifymap"><file name="Collection.php" hash="f08adcec03b2daed592257eb11c2f22e"/><file name="Collection.php" hash="f08adcec03b2daed592257eb11c2f22e"/><file name="Collection.php" hash="f08adcec03b2daed592257eb11c2f22e"/><file name="Collection.php" hash="f08adcec03b2daed592257eb11c2f22e"/><file name="Collection.php" hash="f08adcec03b2daed592257eb11c2f22e"/></dir><file name="Config.php" hash="775a3d82d8333b4ca01c9d1bf66e5996"/><file name="Signifymap.php" hash="13052abc4a17c7d99e1647d3be7f87f2"/><file name="Config.php" hash="775a3d82d8333b4ca01c9d1bf66e5996"/><file name="Signifymap.php" hash="13052abc4a17c7d99e1647d3be7f87f2"/><file name="Config.php" hash="775a3d82d8333b4ca01c9d1bf66e5996"/><file name="Signifymap.php" hash="13052abc4a17c7d99e1647d3be7f87f2"/><file name="Config.php" hash="775a3d82d8333b4ca01c9d1bf66e5996"/><file name="Signifymap.php" hash="13052abc4a17c7d99e1647d3be7f87f2"/></dir><file name="Config.php" hash="fa073d22fcb46907db539634afff1818"/><file name="Signifymap.php" hash="828000a23a7a9fab0e35f867810ac5fd"/><file name="Config.php" hash="fa073d22fcb46907db539634afff1818"/><file name="Signifymap.php" hash="828000a23a7a9fab0e35f867810ac5fd"/><file name="Config.php" hash="fa073d22fcb46907db539634afff1818"/><file name="Signifymap.php" hash="828000a23a7a9fab0e35f867810ac5fd"/></dir><dir name="Helper"><file name="Data.php" hash="ac475a4c9aa0aa6702e66939847a4e82"/><file name="Data.php" hash="ac475a4c9aa0aa6702e66939847a4e82"/><file name="Data.php" hash="ac475a4c9aa0aa6702e66939847a4e82"/></dir><dir name="etc"><file name="config.xml" hash="a7d089980c8d1e3cb07dd1750e63e09e"/><file name="config.xml" hash="a7d089980c8d1e3cb07dd1750e63e09e"/><file name="config.xml" hash="a7d089980c8d1e3cb07dd1750e63e09e"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="SignifymapController.php" hash="067f8be3d52eafad48c0f6c4fc0c7eb5"/><file name="SignifymapController.php" hash="067f8be3d52eafad48c0f6c4fc0c7eb5"/><file name="SignifymapController.php" hash="067f8be3d52eafad48c0f6c4fc0c7eb5"/><file name="SignifymapController.php" hash="067f8be3d52eafad48c0f6c4fc0c7eb5"/></dir><file name="IndexController.php" hash="a3ed1260e093d6e5230d75ca4f54ad89"/><file name="IndexController.php" hash="a3ed1260e093d6e5230d75ca4f54ad89"/><file name="IndexController.php" hash="a3ed1260e093d6e5230d75ca4f54ad89"/></dir><dir name="Block"><dir name="Adminhtml"><dir name="Signifymap"><dir name="Edit"><dir name="Tab"><file name="Form.php" hash="aab1366ac0b672aba441f9a9b89fa818"/><file name="Config.php" hash="df6aeed164d1db59472cd972ef4e70f5"/><file name="Config.php" hash="df6aeed164d1db59472cd972ef4e70f5"/><file name="Form.php" hash="aab1366ac0b672aba441f9a9b89fa818"/><file name="Config.php" hash="df6aeed164d1db59472cd972ef4e70f5"/><file name="Form.php" hash="aab1366ac0b672aba441f9a9b89fa818"/><file name="Config.php" hash="df6aeed164d1db59472cd972ef4e70f5"/><file name="Form.php" hash="aab1366ac0b672aba441f9a9b89fa818"/><file name="Config.php" hash="df6aeed164d1db59472cd972ef4e70f5"/><file name="Form.php" hash="aab1366ac0b672aba441f9a9b89fa818"/><file name="Config.php" hash="df6aeed164d1db59472cd972ef4e70f5"/><file name="Form.php" hash="aab1366ac0b672aba441f9a9b89fa818"/><file name="Config.php" hash="df6aeed164d1db59472cd972ef4e70f5"/><file name="Form.php" hash="aab1366ac0b672aba441f9a9b89fa818"/></dir><file name="Tabs.php" hash="2b4005d9f6d4db2c71e5333ce671836e"/><file name="Form.php" hash="c47e2e5d9a0424a45766a15f5fc1ceb2"/><file name="Tabs.php" hash="2b4005d9f6d4db2c71e5333ce671836e"/><file name="Config.php" hash="3f8dd2af4c53b4a5418af640b3b73d95"/><file name="Form.php" hash="c47e2e5d9a0424a45766a15f5fc1ceb2"/><file name="Tabs.php" hash="2b4005d9f6d4db2c71e5333ce671836e"/><file name="Config.php" hash="3f8dd2af4c53b4a5418af640b3b73d95"/><file name="Form.php" hash="c47e2e5d9a0424a45766a15f5fc1ceb2"/><file name="Tabs.php" hash="2b4005d9f6d4db2c71e5333ce671836e"/><file name="Config.php" hash="3f8dd2af4c53b4a5418af640b3b73d95"/><file name="Form.php" hash="c47e2e5d9a0424a45766a15f5fc1ceb2"/><file name="Tabs.php" hash="2b4005d9f6d4db2c71e5333ce671836e"/><file name="Config.php" hash="3f8dd2af4c53b4a5418af640b3b73d95"/><file name="Form.php" hash="c47e2e5d9a0424a45766a15f5fc1ceb2"/><file name="Tabs.php" hash="2b4005d9f6d4db2c71e5333ce671836e"/><file name="Config.php" hash="3f8dd2af4c53b4a5418af640b3b73d95"/><file name="Form.php" hash="c47e2e5d9a0424a45766a15f5fc1ceb2"/><file name="Tabs.php" hash="2b4005d9f6d4db2c71e5333ce671836e"/></dir><file name="Edit.php" hash="86972025a2c961a04071efa620e2cc56"/><file name="Edit.php" hash="86972025a2c961a04071efa620e2cc56"/><file name="Edit.php" hash="86972025a2c961a04071efa620e2cc56"/><file name="Edit.php" hash="86972025a2c961a04071efa620e2cc56"/><file name="Edit.php" hash="86972025a2c961a04071efa620e2cc56"/></dir><file name="Signifymap.php" hash="2b06655bdc9b4e0589037810d9ed4650"/><file name="Signifymap.php" hash="2b06655bdc9b4e0589037810d9ed4650"/><file name="Signifymap.php" hash="2b06655bdc9b4e0589037810d9ed4650"/><file name="Signifymap.php" hash="2b06655bdc9b4e0589037810d9ed4650"/></dir><file name="Signifymap.php" hash="b9964152b14e162fef4dc6cc6ec36cd4"/><file name="Signifymap.php" hash="b9964152b14e162fef4dc6cc6ec36cd4"/><file name="Signifymap.php" hash="b9964152b14e162fef4dc6cc6ec36cd4"/></dir></dir></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.2.0</min><max>7.0.99</max></php></required></dependencies>
|
18 |
+
</package>
|