Version Notes
Upload Unique Background Image for Each CMS & Category Page. Product page will use Category Background Image.
Download this release
Release Info
Developer | CyberNetikz |
Extension | Cybernetikz_Background |
Version | 0.1.0 |
Comparing to | |
See all releases |
Version 0.1.0
- app/code/local/Cybernetikz/Background/Block/Background.php +63 -0
- app/code/local/Cybernetikz/Background/Helper/Data.php +4 -0
- app/code/local/Cybernetikz/Background/Model/Background.php +9 -0
- app/code/local/Cybernetikz/Background/Model/Mysql4/Background.php +8 -0
- app/code/local/Cybernetikz/Background/Model/Mysql4/Background/Collection.php +18 -0
- app/code/local/Cybernetikz/Background/controllers/Adminhtml/MyformController.php +130 -0
- app/code/local/Cybernetikz/Background/etc/config.xml +125 -0
- app/code/local/Cybernetikz/Background/sql/background_setup/mysql4-install-0.1.0.php +15 -0
- app/design/adminhtml/default/default/layout/background.xml +23 -0
- app/design/adminhtml/default/default/template/background/editpage.phtml +123 -0
- app/design/adminhtml/default/default/template/background/myform.phtml +112 -0
- app/design/adminhtml/default/default/template/background/pagemanage.phtml +66 -0
- app/design/frontend/default/default/layout/background.xml +8 -0
- app/design/frontend/default/default/template/background/background.phtml +14 -0
- app/etc/modules/Cybernetikz_Background.xml +9 -0
- package.xml +18 -0
app/code/local/Cybernetikz/Background/Block/Background.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Cybernetikz_Background_Block_Background extends Mage_Core_Block_Template{
|
3 |
+
|
4 |
+
protected $_backgroundCollection = null;
|
5 |
+
|
6 |
+
protected function _getCollection()
|
7 |
+
{
|
8 |
+
$collection=Mage::getResourceModel('background/background_collection');
|
9 |
+
|
10 |
+
$ccontrollername = Mage::app()->getFrontController()->getRequest()->getControllerName();
|
11 |
+
$cmodulename = Mage::app()->getFrontController()->getRequest()->getModuleName();
|
12 |
+
|
13 |
+
if($ccontrollername=='category' || $ccontrollername=="product"){
|
14 |
+
$currentcategory = Mage::registry('current_category');
|
15 |
+
if( $ccontrollername=="product"){
|
16 |
+
$catid = Mage::getModel('catalog/layer')->getCurrentCategory()->getId();
|
17 |
+
if(empty($catid) || ($catid==2) ){
|
18 |
+
$cat = Mage::registry('current_product')->getCategoryIds();
|
19 |
+
if($cat[0]==2){
|
20 |
+
$catid = $cat[1];
|
21 |
+
}else{
|
22 |
+
$catid = $cat[0];
|
23 |
+
}
|
24 |
+
}
|
25 |
+
$collection->addFieldToFilter('page_id',"{$catid}");
|
26 |
+
$collection->addFieldToFilter('bg_type',"category");
|
27 |
+
}else{
|
28 |
+
$collection->addFieldToFilter('page_id',"{$currentcategory->getEntityId()}");
|
29 |
+
$collection->addFieldToFilter('bg_type',"category");
|
30 |
+
}
|
31 |
+
|
32 |
+
}
|
33 |
+
|
34 |
+
if($cmodulename=="cms"){
|
35 |
+
$pageid = Mage::getSingleton('cms/page')->getId();
|
36 |
+
$collection->addFieldToFilter('page_id',"{$pageid}");
|
37 |
+
$collection->addFieldToFilter('bg_type',"{$cmodulename}");
|
38 |
+
}
|
39 |
+
|
40 |
+
$collection->getSelect()->order('id','ASC');
|
41 |
+
$collection->getSelect()->limit(1);
|
42 |
+
|
43 |
+
//echo $collection->getSelect()->__toString();
|
44 |
+
//print_r($collection->getData());
|
45 |
+
//exit;
|
46 |
+
|
47 |
+
return $collection;
|
48 |
+
|
49 |
+
}
|
50 |
+
|
51 |
+
public function getBackgroundCollection()
|
52 |
+
{
|
53 |
+
if (is_null($this->_backgroundCollection)) {
|
54 |
+
$this->_backgroundCollection = $this->_getCollection();
|
55 |
+
}
|
56 |
+
return $this->_backgroundCollection;
|
57 |
+
}
|
58 |
+
|
59 |
+
public function getImageUrl($url)
|
60 |
+
{
|
61 |
+
return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$url;
|
62 |
+
}
|
63 |
+
}
|
app/code/local/Cybernetikz/Background/Helper/Data.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Cybernetikz_Background_Helper_Data extends Mage_Core_Helper_Abstract {
|
3 |
+
|
4 |
+
}
|
app/code/local/Cybernetikz/Background/Model/Background.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Cybernetikz_Background_Model_Background extends Mage_Core_Model_Abstract
|
3 |
+
{
|
4 |
+
|
5 |
+
protected function _construct()
|
6 |
+
{
|
7 |
+
$this->_init('background/background');
|
8 |
+
}
|
9 |
+
}
|
app/code/local/Cybernetikz/Background/Model/Mysql4/Background.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Cybernetikz_Background_Model_Mysql4_Background extends Mage_Core_Model_Mysql4_Abstract
|
3 |
+
{
|
4 |
+
protected function _construct()
|
5 |
+
{
|
6 |
+
$this->_init('background/background', 'id');
|
7 |
+
}
|
8 |
+
}
|
app/code/local/Cybernetikz/Background/Model/Mysql4/Background/Collection.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Cybernetikz_Background_Model_Mysql4_Background_Collection extends Varien_Data_Collection_Db
|
3 |
+
{
|
4 |
+
protected $_backgroundTable;
|
5 |
+
|
6 |
+
public function __construct()
|
7 |
+
{
|
8 |
+
$resources = Mage::getSingleton('core/resource');
|
9 |
+
parent::__construct($resources->getConnection('background_read'));
|
10 |
+
$this->_backgroundTable= $resources->getTableName('background/background');
|
11 |
+
|
12 |
+
$this->_select->from(
|
13 |
+
array('background'=>$this->_backgroundTable),
|
14 |
+
array('*')
|
15 |
+
);
|
16 |
+
$this->setItemObjectClass(Mage::getConfig()->getModelClassName('background/background'));
|
17 |
+
}
|
18 |
+
}
|
app/code/local/Cybernetikz/Background/controllers/Adminhtml/MyformController.php
ADDED
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Cybernetikz_Background_Adminhtml_MyformController extends Mage_Adminhtml_Controller_Action
|
4 |
+
{
|
5 |
+
public function indexAction()
|
6 |
+
{
|
7 |
+
$this->loadLayout()->renderLayout();
|
8 |
+
}
|
9 |
+
|
10 |
+
public function pagemanageAction()
|
11 |
+
{
|
12 |
+
$this->loadLayout()->renderLayout();
|
13 |
+
}
|
14 |
+
|
15 |
+
public function deleteAction()
|
16 |
+
{
|
17 |
+
$id = $this->getRequest()->getParam('id', false);
|
18 |
+
|
19 |
+
try {
|
20 |
+
Mage::getModel('background/background')->setId($id)->delete();
|
21 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('background')->__('Background Image successfully deleted.'));
|
22 |
+
} catch (Exception $e){
|
23 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
24 |
+
}
|
25 |
+
|
26 |
+
$this->_redirectReferer();
|
27 |
+
}
|
28 |
+
|
29 |
+
|
30 |
+
public function postAction()
|
31 |
+
{
|
32 |
+
if ($data = $this->getRequest()->getPost()) {
|
33 |
+
if(!empty($data['page_id'])){
|
34 |
+
$data['page_id']= $data['page_id'];
|
35 |
+
}else{
|
36 |
+
$data['page_id']= $data['category_id'];
|
37 |
+
}
|
38 |
+
|
39 |
+
$collection=Mage::getResourceModel('background/background_collection');
|
40 |
+
$collection->addFieldToFilter('page_id',$data['page_id']);
|
41 |
+
$collection->addFieldToFilter('bg_type',$data['bg_type']);
|
42 |
+
$collection->getSelect()->order('id','ASC');
|
43 |
+
$collection->getSelect()->limit(1);
|
44 |
+
$backgroundCollection=$collection->getData();
|
45 |
+
$count=count($backgroundCollection);
|
46 |
+
if($count<=0){
|
47 |
+
if(isset($_FILES['image_url']['name']) && $_FILES['image_url']['name'] != '') {
|
48 |
+
try {
|
49 |
+
/* Starting upload */
|
50 |
+
$uploader = new Varien_File_Uploader('image_url');
|
51 |
+
// Any extention would work
|
52 |
+
$uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
|
53 |
+
$uploader->setAllowRenameFiles(false);
|
54 |
+
$uploader->setFilesDispersion(false);
|
55 |
+
// We set media as the upload dir
|
56 |
+
$path = Mage::getBaseDir('media'). DS . "background" . DS ;
|
57 |
+
$filename = $_FILES['image_url']['name'];
|
58 |
+
$image_file_name = time().'-'.$filename;
|
59 |
+
$retrnimage=$uploader->save($path, $image_file_name);
|
60 |
+
} catch (Exception $e) {
|
61 |
+
$this->_getSession()->addException($e, Mage::helper('background')->__('Error uploading file. Please try again later.'));
|
62 |
+
}
|
63 |
+
$data['image_url'] = "background/".$retrnimage['file'];
|
64 |
+
}
|
65 |
+
$background = Mage::getModel('background/background')->setData($data);
|
66 |
+
try {
|
67 |
+
$background->save();
|
68 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('background')->__('Background Image was successfully saved.'));
|
69 |
+
$this->getResponse()->setRedirect($this->getUrl('*/*/pagemanage'));
|
70 |
+
return;
|
71 |
+
} catch (Exception $e){
|
72 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
73 |
+
}
|
74 |
+
}else{
|
75 |
+
Mage::getSingleton('adminhtml/session')->addError("Already uplaod background for this page.");
|
76 |
+
$this->_redirectReferer();
|
77 |
+
return;
|
78 |
+
}
|
79 |
+
|
80 |
+
}
|
81 |
+
$this->getResponse()->setRedirect($this->getUrl('*/*/pagemanage'));
|
82 |
+
return;
|
83 |
+
}
|
84 |
+
|
85 |
+
public function editpageAction()
|
86 |
+
{
|
87 |
+
$this->loadLayout()->renderLayout();
|
88 |
+
}
|
89 |
+
|
90 |
+
public function saveAction()
|
91 |
+
{
|
92 |
+
$data = $this->getRequest()->getPost();
|
93 |
+
$id = $data['id'];
|
94 |
+
if ($data = $this->getRequest()->getPost()) {
|
95 |
+
//Slider Image file
|
96 |
+
if(isset($_FILES['image_url']['name']) && $_FILES['image_url']['name'] != '') {
|
97 |
+
try {
|
98 |
+
/* Starting upload */
|
99 |
+
$uploader = new Varien_File_Uploader('image_url');
|
100 |
+
// Any extention would work
|
101 |
+
$uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
|
102 |
+
$uploader->setAllowRenameFiles(false);
|
103 |
+
$uploader->setFilesDispersion(false);
|
104 |
+
// We set media as the upload dir
|
105 |
+
$path = Mage::getBaseDir('media'). DS . "background" . DS ;
|
106 |
+
|
107 |
+
$filename = $_FILES['image_url']['name'];
|
108 |
+
$image_file_name = time().'-'.$filename;
|
109 |
+
$retrnimage=$uploader->save($path, $image_file_name );
|
110 |
+
} catch (Exception $e) {
|
111 |
+
$this->_getSession()->addException($e, Mage::helper('background')->__('Error uploading file. Please try again later.'));
|
112 |
+
}
|
113 |
+
$data['image_url'] = "background/".$retrnimage['file'];
|
114 |
+
}
|
115 |
+
|
116 |
+
$background = Mage::getModel('background/background')->load($id)->addData($data);
|
117 |
+
try {
|
118 |
+
$background->setId($id)->save();
|
119 |
+
|
120 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('background')->__('Background Image successfully updated.'));
|
121 |
+
$this->getResponse()->setRedirect($this->getUrl('*/*/pagemanage'));
|
122 |
+
return;
|
123 |
+
} catch (Exception $e){
|
124 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
125 |
+
}
|
126 |
+
}
|
127 |
+
$this->getResponse()->setRedirect($this->getUrl('*/*/pagemanage'));
|
128 |
+
}
|
129 |
+
}
|
130 |
+
?>
|
app/code/local/Cybernetikz/Background/etc/config.xml
ADDED
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Cybernetikz_Background>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</Cybernetikz_Background>
|
7 |
+
</modules>
|
8 |
+
|
9 |
+
<global>
|
10 |
+
<models>
|
11 |
+
<background>
|
12 |
+
<class>Cybernetikz_Background_Model</class>
|
13 |
+
<resourceModel>background_mysql4</resourceModel>
|
14 |
+
</background>
|
15 |
+
<background_mysql4>
|
16 |
+
<class>Cybernetikz_Background_Model_Mysql4</class>
|
17 |
+
<entities>
|
18 |
+
<background>
|
19 |
+
<table>background_uploader</table>
|
20 |
+
</background>
|
21 |
+
</entities>
|
22 |
+
</background_mysql4>
|
23 |
+
</models>
|
24 |
+
<blocks>
|
25 |
+
<background>
|
26 |
+
<class>Cybernetikz_Background_Block</class>
|
27 |
+
</background>
|
28 |
+
</blocks>
|
29 |
+
<helpers>
|
30 |
+
<background>
|
31 |
+
<class>Cybernetikz_Background_Helper</class>
|
32 |
+
</background>
|
33 |
+
</helpers>
|
34 |
+
<resources>
|
35 |
+
<background_setup>
|
36 |
+
<setup>
|
37 |
+
<module>Cybernetikz_Background</module>
|
38 |
+
</setup>
|
39 |
+
<connection>
|
40 |
+
<use>core_setup</use>
|
41 |
+
</connection>
|
42 |
+
</background_setup>
|
43 |
+
<background_write>
|
44 |
+
<connection>
|
45 |
+
<use>core_write</use>
|
46 |
+
</connection>
|
47 |
+
</background_write>
|
48 |
+
<background_read>
|
49 |
+
<connection>
|
50 |
+
<use>core_read</use>
|
51 |
+
</connection>
|
52 |
+
</background_read>
|
53 |
+
</resources>
|
54 |
+
</global>
|
55 |
+
|
56 |
+
<admin>
|
57 |
+
<routers>
|
58 |
+
<background>
|
59 |
+
<use>admin</use>
|
60 |
+
<args>
|
61 |
+
<module>Cybernetikz_Background</module>
|
62 |
+
<frontName>background</frontName>
|
63 |
+
</args>
|
64 |
+
</background>
|
65 |
+
</routers>
|
66 |
+
</admin>
|
67 |
+
|
68 |
+
<frontend>
|
69 |
+
<layout>
|
70 |
+
<updates>
|
71 |
+
<background>
|
72 |
+
<file>background.xml</file>
|
73 |
+
</background>
|
74 |
+
</updates>
|
75 |
+
</layout>
|
76 |
+
</frontend>
|
77 |
+
|
78 |
+
<adminhtml>
|
79 |
+
<translate>
|
80 |
+
<modules>
|
81 |
+
<mage_adminhtml>
|
82 |
+
<files>
|
83 |
+
<background>Cybernetikz_Background.csv</background>
|
84 |
+
</files>
|
85 |
+
</mage_adminhtml>
|
86 |
+
</modules>
|
87 |
+
</translate>
|
88 |
+
|
89 |
+
<menu>
|
90 |
+
<cms>
|
91 |
+
<children>
|
92 |
+
<background_adminform translate="title" module="background">
|
93 |
+
<title>Manage Background</title>
|
94 |
+
<sort_order>106</sort_order>
|
95 |
+
<action>background/adminhtml_myform/pagemanage</action>
|
96 |
+
</background_adminform>
|
97 |
+
</children>
|
98 |
+
</cms>
|
99 |
+
</menu>
|
100 |
+
|
101 |
+
<acl>
|
102 |
+
<resources>
|
103 |
+
<admin>
|
104 |
+
<children>
|
105 |
+
<cms>
|
106 |
+
<children>
|
107 |
+
<background_adminform>
|
108 |
+
<title>Manage Background</title>
|
109 |
+
</background_adminform>
|
110 |
+
</children>
|
111 |
+
</cms>
|
112 |
+
</children>
|
113 |
+
</admin>
|
114 |
+
</resources>
|
115 |
+
</acl>
|
116 |
+
|
117 |
+
<layout>
|
118 |
+
<updates>
|
119 |
+
<background>
|
120 |
+
<file>background.xml</file>
|
121 |
+
</background>
|
122 |
+
</updates>
|
123 |
+
</layout>
|
124 |
+
</adminhtml>
|
125 |
+
</config>
|
app/code/local/Cybernetikz/Background/sql/background_setup/mysql4-install-0.1.0.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
$installer->startSetup();
|
4 |
+
|
5 |
+
$installer->run("
|
6 |
+
CREATE TABLE {$this->getTable('background/background')} (
|
7 |
+
`id` INT(10) NOT NULL AUTO_INCREMENT,
|
8 |
+
`bg_type` VARCHAR(100) NOT NULL,
|
9 |
+
`page_id` INT NOT NULL,
|
10 |
+
`image_url` VARCHAR(255) NOT NULL,
|
11 |
+
PRIMARY KEY (`id`)
|
12 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
13 |
+
");
|
14 |
+
|
15 |
+
$installer->endSetup();
|
app/design/adminhtml/default/default/layout/background.xml
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout>
|
3 |
+
<background_adminhtml_myform_index>
|
4 |
+
<update handle="background_myform_index"/>
|
5 |
+
<reference name="content">
|
6 |
+
<block type="adminhtml/template" name="myform" template="background/myform.phtml"/>
|
7 |
+
</reference>
|
8 |
+
</background_adminhtml_myform_index>
|
9 |
+
|
10 |
+
<background_adminhtml_myform_pagemanage>
|
11 |
+
<update handle="background_myform_pagemanage"/>
|
12 |
+
<reference name="content">
|
13 |
+
<block type="adminhtml/template" name="myform" template="background/pagemanage.phtml"/>
|
14 |
+
</reference>
|
15 |
+
</background_adminhtml_myform_pagemanage>
|
16 |
+
|
17 |
+
<background_adminhtml_myform_editpage>
|
18 |
+
<update handle="background_myform_editpage"/>
|
19 |
+
<reference name="content">
|
20 |
+
<block type="adminhtml/template" name="myform" template="background/editpage.phtml"/>
|
21 |
+
</reference>
|
22 |
+
</background_adminhtml_myform_editpage>
|
23 |
+
</layout>
|
app/design/adminhtml/default/default/template/background/editpage.phtml
ADDED
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
2 |
+
<script type="text/javascript">
|
3 |
+
jQuery.noConflict();
|
4 |
+
</script>
|
5 |
+
<?php
|
6 |
+
$id = $this->getRequest()->getParam('id',true);
|
7 |
+
$connection = Mage::getSingleton('core/resource')->getConnection('core_write');
|
8 |
+
$signgleinfo = Mage::getModel('background/background')->load($id, 'id')->getData();
|
9 |
+
?>
|
10 |
+
<div class="content-header">
|
11 |
+
<table cellspacing="0" class="grid-header">
|
12 |
+
<tr>
|
13 |
+
<td><h3><?php echo $this->__('Edit Background')?></h3></td>
|
14 |
+
<td class="a-right">
|
15 |
+
<button onclick="editForm.submit()" class="scalable save" type="button"><span>Submit</span></button>
|
16 |
+
</td>
|
17 |
+
</tr>
|
18 |
+
</table>
|
19 |
+
</div>
|
20 |
+
<div id="containment-wrapper" class="entry-edit">
|
21 |
+
<form id="edit_form" name="edit_form" method="post" action="<?php echo $this->getUrl('*/*/save')?>" enctype="multipart/form-data">
|
22 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
23 |
+
<fieldset id="my-fieldset">
|
24 |
+
<table cellspacing="0" class="form-list">
|
25 |
+
<tr>
|
26 |
+
<td class="label"><?php echo $this->__('Page Type')?> <span class="required">*</span></td>
|
27 |
+
<td class="input-ele">
|
28 |
+
<select name="bg_type" id="bg_type" class="required-entry" style="width:200px;" onchange="catgeturl(this.value);" disabled="disabled">
|
29 |
+
<option value="">Select Page Type</option>
|
30 |
+
<option value="cms" <?php echo ($signgleinfo['bg_type']=="cms")?'selected="selected"':"";?>>CMS Page</option>
|
31 |
+
<option value="category" <?php echo ($signgleinfo['bg_type']=="category")?'selected="selected"':"";?>>Category</option>
|
32 |
+
</select>
|
33 |
+
</td>
|
34 |
+
</tr>
|
35 |
+
<tr id="cms_page_list" style="<?php echo ($signgleinfo['bg_type']!="cms")?'display:none':''?>;">
|
36 |
+
<td class="label"><?php echo $this->__('Page')?> <span class="required">*</span></td>
|
37 |
+
<td class="input-ele">
|
38 |
+
<?php $store = Mage::app()->getStore('default')->getCode();
|
39 |
+
$cms_pages = Mage::getModel('cms/page')->getCollection();
|
40 |
+
//$cms_pages->addStoreFilter($store);
|
41 |
+
$cms_pages->load();
|
42 |
+
?>
|
43 |
+
|
44 |
+
<select name="page_id" id="page_id" style="width:200px;" disabled="disabled">
|
45 |
+
<option value="">Select Page</option>
|
46 |
+
<?php foreach($cms_pages as $_page): ?>
|
47 |
+
<?php $data = $_page->getData();
|
48 |
+
//if($data['identifier'] !='no-route' && $data['identifier'] !='enable-cookies'/* && $data['identifier'] !='customer-service'*/):
|
49 |
+
?>
|
50 |
+
<option value="<?php echo $data['page_id'] ?>" <?php if(($signgleinfo['bg_type']=="cms") && ($signgleinfo['page_id']==$data['page_id'])){?> selected="selected" <?php } ?>><?php echo $data['title']; ?></option>
|
51 |
+
<?php //endif; ?>
|
52 |
+
<?php endforeach; ?>
|
53 |
+
</select>
|
54 |
+
</td>
|
55 |
+
</tr>
|
56 |
+
|
57 |
+
<tr id="category_list" style="<?php echo ($signgleinfo['bg_type']!="category")?'display:none':'';?>;">
|
58 |
+
<td class="label"><?php echo $this->__('Category')?> <span class="required">*</span></td>
|
59 |
+
<td class="input-ele">
|
60 |
+
<?php $_category = Mage::getModel('catalog/category')->load(2) ?>
|
61 |
+
<?php $_subcategories = $_category->getChildrenCategories(); ?>
|
62 |
+
<select name="category_id" id="category_id" style="width:200px;" <?php echo ($signgleinfo['bg_type']=="category")?'disabled="disabled"':''?>>
|
63 |
+
<option value="">Select Category</option>
|
64 |
+
<?php foreach($_subcategories as $_subcategory): ?>
|
65 |
+
<?php if($_subcategory->getIsActive()): ?>
|
66 |
+
<option value="<?php echo $_subcategory->getId() ?>" <?php if(($signgleinfo['bg_type']=="category") && ($signgleinfo['page_id']==$_subcategory->getId())){?> selected="selected" <?php } ?>><?php echo $_subcategory->getName() ?></option>
|
67 |
+
<?php endif; ?>
|
68 |
+
<?php endforeach; ?>
|
69 |
+
</select>
|
70 |
+
</td>
|
71 |
+
</tr>
|
72 |
+
|
73 |
+
<tr>
|
74 |
+
<td class="label"><?php echo $this->__('Background Image')?> <span class="required">*</span></td>
|
75 |
+
<td class="input-ele">
|
76 |
+
<input type="file" name="image_url" id="image_url" class="required-entry" />
|
77 |
+
<?php if($signgleinfo['image_url']){?>
|
78 |
+
<br /><?php /*?><input type="checkbox" name="[image_url][delete]" id="delete" value="1" onclick="jQuery('#image_url').removeClass('required-entry');" /><?php */?><br />
|
79 |
+
<a href="javascript:void(0);" onclick="window.open('<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$signgleinfo['image_url'];?>','','width=600,height=400');"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$signgleinfo['image_url'];?>" height="30" width="30" alt="Uplaod Image" border="0" style="border:none;" /></a>
|
80 |
+
<?php }?>
|
81 |
+
</td>
|
82 |
+
</tr>
|
83 |
+
|
84 |
+
|
85 |
+
</table>
|
86 |
+
</fieldset>
|
87 |
+
<input type="hidden" id="id" name="id" value="<?php echo $id; ?>" />
|
88 |
+
</form>
|
89 |
+
|
90 |
+
</div>
|
91 |
+
<script type="text/javascript">
|
92 |
+
function catgeturl(e){
|
93 |
+
if(e=="cms"){
|
94 |
+
jQuery("#cms_page_list").show();
|
95 |
+
jQuery("#cms_page_list select").addClass("required-entry");
|
96 |
+
jQuery("#category_list select").removeClass("required-entry");
|
97 |
+
jQuery("#category_list select").val("");
|
98 |
+
jQuery("#category_list").hide();
|
99 |
+
|
100 |
+
}
|
101 |
+
if(e=="category"){
|
102 |
+
jQuery("#category_list").show();
|
103 |
+
jQuery("#category_list select").addClass("required-entry");
|
104 |
+
jQuery("#cms_page_list select").removeClass("required-entry");
|
105 |
+
jQuery("#cms_page_list select").val("");
|
106 |
+
jQuery("#cms_page_list").hide();
|
107 |
+
}
|
108 |
+
if(e==""){
|
109 |
+
jQuery("#cms_page_list").hide();
|
110 |
+
jQuery("#category_list").hide();
|
111 |
+
jQuery("#category_list select").removeClass("required-entry");
|
112 |
+
jQuery("#cms_page_list select").removeClass("required-entry");
|
113 |
+
jQuery("#category_list select").val("");
|
114 |
+
jQuery("#cms_page_list select").val("");
|
115 |
+
}
|
116 |
+
}
|
117 |
+
|
118 |
+
jQuery(document).ready(function(){
|
119 |
+
|
120 |
+
});
|
121 |
+
|
122 |
+
var editForm = new varienForm('edit_form');
|
123 |
+
</script>
|
app/design/adminhtml/default/default/template/background/myform.phtml
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
2 |
+
<script type="text/javascript">
|
3 |
+
jQuery.noConflict();
|
4 |
+
</script>
|
5 |
+
<div class="content-header">
|
6 |
+
<table cellspacing="0" class="grid-header">
|
7 |
+
<tr>
|
8 |
+
<td><h3><?php echo $this->__('New Background')?></h3></td>
|
9 |
+
<td class="a-right">
|
10 |
+
<button onclick="editForm.submit()" class="scalable save" type="button"><span>Submit</span></button>
|
11 |
+
</td>
|
12 |
+
</tr>
|
13 |
+
</table>
|
14 |
+
</div>
|
15 |
+
<div id="containment-wrapper" class="entry-edit">
|
16 |
+
<form id="edit_form" name="edit_form" method="post" action="<?php echo $this->getUrl('*/*/post')?>" enctype="multipart/form-data">
|
17 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
18 |
+
|
19 |
+
<fieldset id="my-fieldset">
|
20 |
+
<table cellspacing="0" class="form-list">
|
21 |
+
<tr>
|
22 |
+
<td class="label"><?php echo $this->__('Page Type')?> <span class="required">*</span></td>
|
23 |
+
<td class="input-ele">
|
24 |
+
<select name="bg_type" id="bg_type" class="required-entry" style="width:200px;" onchange="catgeturl(this.value);">
|
25 |
+
<option value="">Select Page Type</option>
|
26 |
+
<option value="cms">CMS Page</option>
|
27 |
+
<option value="category">Category</option>
|
28 |
+
</select>
|
29 |
+
</td>
|
30 |
+
</tr>
|
31 |
+
<tr id="cms_page_list" style="display:none;">
|
32 |
+
<td class="label"><?php echo $this->__('Page')?> <span class="required">*</span></td>
|
33 |
+
<td class="input-ele">
|
34 |
+
<?php $store = Mage::app()->getStore('default')->getCode();
|
35 |
+
$cms_pages = Mage::getModel('cms/page')->getCollection();
|
36 |
+
//$cms_pages->addStoreFilter($store);
|
37 |
+
$cms_pages->load();
|
38 |
+
?>
|
39 |
+
|
40 |
+
<select name="page_id" id="page_id" style="width:200px;">
|
41 |
+
<option value="">Select Page</option>
|
42 |
+
<?php foreach($cms_pages as $_page): ?>
|
43 |
+
<?php $data = $_page->getData();
|
44 |
+
//if(/*$data['identifier'] !='no-route' &&*/ $data['identifier'] !='enable-cookies' /*&& $data['identifier'] !='customer-service'*/):
|
45 |
+
?>
|
46 |
+
<option value="<?php echo $data['page_id'] ?>"><?php echo $data['title']; ?></option>
|
47 |
+
<?php //endif; ?>
|
48 |
+
<?php endforeach; ?>
|
49 |
+
</select>
|
50 |
+
</td>
|
51 |
+
</tr>
|
52 |
+
|
53 |
+
<tr id="category_list" style="display:none;">
|
54 |
+
<td class="label"><?php echo $this->__('Category')?> <span class="required">*</span></td>
|
55 |
+
<td class="input-ele">
|
56 |
+
<?php $_category = Mage::getModel('catalog/category')->load(2) ?>
|
57 |
+
<?php $_subcategories = $_category->getChildrenCategories(); ?>
|
58 |
+
<select name="category_id" id="category_id" style="width:200px;">
|
59 |
+
<option value="">Select Category</option>
|
60 |
+
<?php foreach($_subcategories as $_subcategory): ?>
|
61 |
+
<?php if($_subcategory->getIsActive()): ?>
|
62 |
+
<option value="<?php echo $_subcategory->getId() ?>"><?php echo $_subcategory->getName() ?></option>
|
63 |
+
<?php endif; ?>
|
64 |
+
<?php endforeach; ?>
|
65 |
+
</select>
|
66 |
+
</td>
|
67 |
+
</tr>
|
68 |
+
|
69 |
+
<tr>
|
70 |
+
<td class="label"><?php echo $this->__('Background Image')?> <span class="required">*</span></td>
|
71 |
+
<td class="input-ele">
|
72 |
+
<input type="file" name="image_url" id="image_url" class="required-entry" />
|
73 |
+
</td>
|
74 |
+
</tr>
|
75 |
+
|
76 |
+
</table>
|
77 |
+
</fieldset>
|
78 |
+
</form>
|
79 |
+
</div>
|
80 |
+
<script type="text/javascript">
|
81 |
+
function catgeturl(e){
|
82 |
+
if(e=="cms"){
|
83 |
+
jQuery("#cms_page_list").show();
|
84 |
+
jQuery("#cms_page_list select").addClass("required-entry");
|
85 |
+
jQuery("#category_list select").removeClass("required-entry");
|
86 |
+
jQuery("#category_list select").val("");
|
87 |
+
jQuery("#category_list").hide();
|
88 |
+
|
89 |
+
}
|
90 |
+
if(e=="category"){
|
91 |
+
jQuery("#category_list").show();
|
92 |
+
jQuery("#category_list select").addClass("required-entry");
|
93 |
+
jQuery("#cms_page_list select").removeClass("required-entry");
|
94 |
+
jQuery("#cms_page_list select").val("");
|
95 |
+
jQuery("#cms_page_list").hide();
|
96 |
+
}
|
97 |
+
if(e==""){
|
98 |
+
jQuery("#cms_page_list").hide();
|
99 |
+
jQuery("#category_list").hide();
|
100 |
+
jQuery("#category_list select").removeClass("required-entry");
|
101 |
+
jQuery("#cms_page_list select").removeClass("required-entry");
|
102 |
+
jQuery("#category_list select").val("");
|
103 |
+
jQuery("#cms_page_list select").val("");
|
104 |
+
}
|
105 |
+
}
|
106 |
+
|
107 |
+
jQuery(document).ready(function(){
|
108 |
+
|
109 |
+
});
|
110 |
+
|
111 |
+
var editForm = new varienForm('edit_form');
|
112 |
+
</script>
|
app/design/adminhtml/default/default/template/background/pagemanage.phtml
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="content-header">
|
2 |
+
<table cellspacing="0" class="grid-header">
|
3 |
+
<tr>
|
4 |
+
<td><h3><?php echo $this->__('Manage Background')?></h3></td>
|
5 |
+
<td class="a-right">
|
6 |
+
<button onclick="javascript:location.href='<?php echo $this->getUrl("background/adminhtml_myform/index"); ?>'" class="scalable save" type="button"><span>Add New Background</span></button>
|
7 |
+
</td>
|
8 |
+
</tr>
|
9 |
+
</table>
|
10 |
+
</div>
|
11 |
+
<div class="entry-edit grid">
|
12 |
+
<?php
|
13 |
+
$totalbackground = Mage::getModel('background/background')->getCollection()->getItems();
|
14 |
+
|
15 |
+
?>
|
16 |
+
<table cellspacing="0" id="cmsPageGrid_table" class="data" width="100%">
|
17 |
+
<thead>
|
18 |
+
<tr class="headings">
|
19 |
+
<th width="35%" align="center"><?php echo $this->__('Page Title'); ?></th>
|
20 |
+
<th width="20%" align="center"><?php echo $this->__('Page Type'); ?></th>
|
21 |
+
<th width="20%" align="center" class=" no-link last"><span class="nobr"><?php echo $this->__('Action'); ?></span></th>
|
22 |
+
</tr>
|
23 |
+
</thead>
|
24 |
+
|
25 |
+
<tbody id="">
|
26 |
+
<?php if(count($totalbackground)>=1): ?>
|
27 |
+
<?php $i=0; foreach($totalbackground as $i=>$page): ?>
|
28 |
+
<tr class="<?php echo ($i%2==0)?"even":"odd"; ?>">
|
29 |
+
<td align="center">
|
30 |
+
<?php
|
31 |
+
if($page->getBgType()=="cms"){
|
32 |
+
$_page = Mage::getModel('cms/page')->load($page->getPageId());
|
33 |
+
echo $_page->getTitle();
|
34 |
+
}else{
|
35 |
+
$_category = Mage::getModel('catalog/category')->load($page->getPageId());
|
36 |
+
echo $_category->getName();
|
37 |
+
}
|
38 |
+
?>
|
39 |
+
</td>
|
40 |
+
<td align="center">
|
41 |
+
<?php
|
42 |
+
if($page->getBgType()=="cms"){
|
43 |
+
echo "CMS Page";
|
44 |
+
}else{
|
45 |
+
echo "Category Page";
|
46 |
+
}
|
47 |
+
?>
|
48 |
+
</td>
|
49 |
+
<td align="center">
|
50 |
+
<a href="<?php echo $this->getUrl("*/*/editpage/id/{$page->getId()}"); ?>" title="Edit">Edit</a> / <a href="<?php echo $this->getUrl("*/*/delete/id/{$page->getId()}"); ?>" title="Delete">Delete</a>
|
51 |
+
</td>
|
52 |
+
</tr>
|
53 |
+
<?php $i++; endforeach; ?>
|
54 |
+
<?php else: ?>
|
55 |
+
<tr class="<?php echo ($i%2==0)?"even":"odd"; ?>">
|
56 |
+
<td colspan="3" align="center">No background found.</td>
|
57 |
+
</tr>
|
58 |
+
<?php endif; ?>
|
59 |
+
</tbody>
|
60 |
+
</table>
|
61 |
+
</div>
|
62 |
+
<style type="text/css">
|
63 |
+
table tr td,table tr th{
|
64 |
+
text-align:center;
|
65 |
+
}
|
66 |
+
</style>
|
app/design/frontend/default/default/layout/background.xml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<default>
|
4 |
+
<reference name="head">
|
5 |
+
<block type="background/background" name="background" template="background/background.phtml" />
|
6 |
+
</reference>
|
7 |
+
</default>
|
8 |
+
</layout>
|
app/design/frontend/default/default/template/background/background.phtml
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$_backgroundCollection=$this->getBackgroundCollection()->getData();
|
3 |
+
$background=false;
|
4 |
+
$count=count($_backgroundCollection);
|
5 |
+
if($count>0){
|
6 |
+
$background=true;
|
7 |
+
}
|
8 |
+
?>
|
9 |
+
|
10 |
+
<?php if($background===true):?>
|
11 |
+
<style type="text/css">
|
12 |
+
body{background:#000 url(<?php echo $this->getImageUrl($_backgroundCollection[0]['image_url']); ?>)repeat top center fixed;}
|
13 |
+
</style>
|
14 |
+
<?php endif;?>
|
app/etc/modules/Cybernetikz_Background.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Cybernetikz_Background>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
</Cybernetikz_Background>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Cybernetikz_Background</name>
|
4 |
+
<version>0.1.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Upload Unique Background Image for Each CMS & Category Page. Product page will use Category Background Image.</summary>
|
10 |
+
<description>Background Uploader Magento Extension is made for Store CMS and Category Page Background Image Change. Admin will able to easily change background image for CMS page and Category Page. Admin can upload unique background image. Product page will use there category Background Image.</description>
|
11 |
+
<notes>Upload Unique Background Image for Each CMS & Category Page. Product page will use Category Background Image.</notes>
|
12 |
+
<authors><author><name>CyberNetikz</name><user>CyberNetikz</user><email>admin@cybernetikz.com</email></author></authors>
|
13 |
+
<date>2013-07-19</date>
|
14 |
+
<time>11:27:44</time>
|
15 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Cybernetikz_Background.xml" hash="62fbb8010ada4e672b36101145c5dc5a"/></dir></target><target name="magelocal"><dir name="Cybernetikz"><dir name="Background"><dir name="Block"><file name="Background.php" hash="88a1bc1b72ecc0202444d8d59a162ea4"/></dir><dir name="Helper"><file name="Data.php" hash="ed004387bb74393082e11af95378ab0f"/></dir><dir name="Model"><file name="Background.php" hash="f6fa810151c1d5eccbfaec96f25930d1"/><dir name="Mysql4"><dir name="Background"><file name="Collection.php" hash="2cc15973dcc9aae2339fcd0f3fe5740d"/></dir><file name="Background.php" hash="2659a9da799392f8b96fa8d90440837c"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="MyformController.php" hash="3f899c2edab3ef733a171c2766c1ba33"/></dir></dir><dir name="etc"><file name="config.xml" hash="272c88a1e7002c454ec8cab5f2806516"/></dir><dir name="sql"><dir name="background_setup"><file name="mysql4-install-0.1.0.php" hash="f1342309acacfa446aa81994a2da937e"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="background"><file name="editpage.phtml" hash="8a37ba0e3a6370eb230fb425f33c9a45"/><file name="myform.phtml" hash="0b4623e4a84b7db0cc52ebacd03f4fb5"/><file name="pagemanage.phtml" hash="f79624239b04492ba8c920e9e42ca831"/></dir></dir><dir name="layout"><file name="background.xml" hash="a551cd8c7497c934f18419a9d9df9b7c"/></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="background.xml" hash="c2df88e1cab087ed24f380be120592a2"/></dir><dir name="template"><dir name="background"><file name="background.phtml" hash="9a3d1b2746d8a0f47f17d4605face331"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
+
</package>
|