Version Notes
Backup file before installation
Download this release
Release Info
Developer | Magento Core Team |
Extension | OnlineBiz_GoogleSocial |
Version | 5.0 |
Comparing to | |
See all releases |
Code changes from version 3.0 to 5.0
- app/code/local/OnlineBiz/ExtensionManager/Block/Notification/Window.php +59 -0
- app/code/local/OnlineBiz/ExtensionManager/Block/System/Config/Form/Fieldset/Extensions.php +135 -0
- app/code/local/OnlineBiz/ExtensionManager/Helper/Config.php +27 -0
- app/code/local/OnlineBiz/ExtensionManager/Helper/Data.php +26 -0
- app/code/local/OnlineBiz/ExtensionManager/Model/Feed.php +89 -0
- app/code/local/OnlineBiz/ExtensionManager/Model/Feed/Abstract.php +68 -0
- app/code/local/OnlineBiz/ExtensionManager/Model/Feed/Extensions.php +64 -0
- app/code/local/OnlineBiz/ExtensionManager/Model/Feed/Updates.php +126 -0
- app/code/local/OnlineBiz/ExtensionManager/Model/Source/Updates/Type.php +79 -0
- app/code/local/OnlineBiz/ExtensionManager/etc/adminhtml.xml +33 -0
- app/code/local/OnlineBiz/ExtensionManager/etc/config.xml +85 -0
- app/code/local/OnlineBiz/ExtensionManager/etc/system.xml +31 -0
- app/code/local/{OnlineBiz_GoogleSocial/app/code/local/OnlineBiz → OnlineBiz}/Googlesocial/Block/Widget.php +0 -0
- app/code/local/{OnlineBiz_GoogleSocial/app/code/local/OnlineBiz → OnlineBiz}/Googlesocial/Block/vssver.scc +0 -0
- app/code/local/{OnlineBiz_GoogleSocial/app/code/local/OnlineBiz → OnlineBiz}/Googlesocial/Helper/Data.php +0 -0
- app/code/local/{OnlineBiz_GoogleSocial/app/code/local/OnlineBiz → OnlineBiz}/Googlesocial/Helper/vssver.scc +0 -0
- app/code/local/{OnlineBiz_GoogleSocial/app/code/local/OnlineBiz → OnlineBiz}/Googlesocial/Model/Config/DisplayPositionOptions.php +0 -0
- app/code/local/{OnlineBiz_GoogleSocial/app/code/local/OnlineBiz → OnlineBiz}/Googlesocial/Model/Config/vssver.scc +0 -0
- app/code/local/{OnlineBiz_GoogleSocial/app/code/local/OnlineBiz → OnlineBiz}/Googlesocial/etc/config.xml +1 -1
- app/code/local/{OnlineBiz_GoogleSocial/app/code/local/OnlineBiz → OnlineBiz}/Googlesocial/etc/system.xml +0 -0
- app/code/local/OnlineBiz/Googlesocial/etc/vssver.scc +0 -0
- app/code/local/OnlineBiz_GoogleSocial/app/code/local/OnlineBiz/Googlesocial/etc/vssver.scc +0 -0
- app/code/local/OnlineBiz_GoogleSocial/app/design/frontend/default/default/layout/vssver.scc +0 -0
- app/code/local/OnlineBiz_GoogleSocial/app/etc/modules/vssver.scc +0 -0
- app/design/adminhtml/default/default/layout/onlinebiz_extensionmanager.xml +8 -0
- app/design/adminhtml/default/default/template/onlinebiz_extensionmanager/notification/window.phtml +78 -0
- app/design/adminhtml/default/default/template/onlinebiz_extensionmanager/notification/window/first-run.phtml +61 -0
- app/{code/local/OnlineBiz_GoogleSocial/app/design → design}/frontend/default/default/layout/googlesocial.xml +0 -0
- app/{code/local/OnlineBiz_GoogleSocial/app/design → design}/frontend/default/default/template/googlesocial/vssver.scc +0 -0
- app/{code/local/OnlineBiz_GoogleSocial/app/design → design}/frontend/default/default/template/googlesocial/widget.phtml +0 -0
- app/etc/modules/OnlineBiz_ExtensionManager.xml +9 -0
- app/{code/local/OnlineBiz_GoogleSocial/app/etc → etc}/modules/OnlineBiz_Googlesocial.xml +0 -0
- package.xml +7 -7
app/code/local/OnlineBiz/ExtensionManager/Block/Notification/Window.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Extensions Manager Extension
|
4 |
+
*
|
5 |
+
* PHP versions 4 and 5
|
6 |
+
*
|
7 |
+
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
8 |
+
* that is available through the world-wide-web at the following URI:
|
9 |
+
* http://store.onlinebizsoft.com/license.txt. If you did not receive a copy of
|
10 |
+
* the PHP License and are unable to obtain it through the web, please
|
11 |
+
* send a note to admin@onlinebizsoft.com so we can mail you a copy immediately.
|
12 |
+
*
|
13 |
+
* @category Magento Extensions
|
14 |
+
* @package ExtensionManager
|
15 |
+
* @author OnlineBiz <sales@onlinebizsoft.com>
|
16 |
+
* @copyright 2007-2011 OnlineBiz
|
17 |
+
* @license http://store.onlinebizsoft.com/license.txt
|
18 |
+
* @version 1.0.1
|
19 |
+
* @link http://store.onlinebizsoft.com
|
20 |
+
*/
|
21 |
+
|
22 |
+
class OnlineBiz_ExtensionManager_Block_Notification_Window extends Mage_Adminhtml_Block_Notification_Window{
|
23 |
+
protected function _construct(){
|
24 |
+
parent::_construct();
|
25 |
+
|
26 |
+
if(!Mage::getStoreConfig('onlinebiz_extensionmanager/install/run')){
|
27 |
+
$c = Mage::getModel('core/config_data');
|
28 |
+
$c
|
29 |
+
->setScope('default')
|
30 |
+
->setPath('onlinebiz_extensionmanager/install/run')
|
31 |
+
->setValue(time())
|
32 |
+
->save();
|
33 |
+
$this->setHeaderText($this->__("OnlineBiz Notifications Setup"));
|
34 |
+
$this->setIsFirstRun(1);
|
35 |
+
$this->setIsHtml(1);
|
36 |
+
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
protected function _toHtml(){
|
41 |
+
if($this->getIsHtml()){
|
42 |
+
$this->setTemplate('onlinebiz_extensionmanager/notification/window.phtml');
|
43 |
+
}
|
44 |
+
return parent::_toHtml();
|
45 |
+
}
|
46 |
+
public function presetFirstSetup(){
|
47 |
+
|
48 |
+
}
|
49 |
+
public function getNoticeMessageText(){
|
50 |
+
if($this->getIsFirstRun()){
|
51 |
+
$child = $this->getLayout()->createBlock('core/template')->setTemplate('onlinebiz_extensionmanager/notification/window/first-run.phtml')->toHtml();
|
52 |
+
return $child;
|
53 |
+
}else{
|
54 |
+
return $this->getData('notice_message_text');
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
|
59 |
+
}
|
app/code/local/OnlineBiz/ExtensionManager/Block/System/Config/Form/Fieldset/Extensions.php
ADDED
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Extensions Manager Extension
|
4 |
+
*
|
5 |
+
* PHP versions 4 and 5
|
6 |
+
*
|
7 |
+
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
8 |
+
* that is available through the world-wide-web at the following URI:
|
9 |
+
* http://store.onlinebizsoft.com/license.txt. If you did not receive a copy of
|
10 |
+
* the PHP License and are unable to obtain it through the web, please
|
11 |
+
* send a note to admin@onlinebizsoft.com so we can mail you a copy immediately.
|
12 |
+
*
|
13 |
+
* @category Magento Extensions
|
14 |
+
* @package ExtensionManager
|
15 |
+
* @author OnlineBiz <sales@onlinebizsoft.com>
|
16 |
+
* @copyright 2007-2011 OnlineBiz
|
17 |
+
* @license http://store.onlinebizsoft.com/license.txt
|
18 |
+
* @version 1.0.1
|
19 |
+
* @link http://store.onlinebizsoft.com
|
20 |
+
*/
|
21 |
+
|
22 |
+
|
23 |
+
class OnlineBiz_ExtensionManager_Block_System_Config_Form_Fieldset_Extensions
|
24 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Fieldset
|
25 |
+
{
|
26 |
+
protected $_dummyElement;
|
27 |
+
protected $_fieldRenderer;
|
28 |
+
protected $_values;
|
29 |
+
|
30 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
31 |
+
{
|
32 |
+
$html = $this->_getHeaderHtml($element);
|
33 |
+
$modules = array_keys((array)Mage::getConfig()->getNode('modules')->children());
|
34 |
+
sort($modules);
|
35 |
+
|
36 |
+
foreach ($modules as $moduleName) {
|
37 |
+
if (strstr($moduleName,'OnlineBiz_') === false) {
|
38 |
+
continue;
|
39 |
+
}
|
40 |
+
|
41 |
+
if($moduleName == 'OnlineBiz_Core' || $moduleName == 'OnlineBiz_ExtensionManager'){
|
42 |
+
continue;
|
43 |
+
}
|
44 |
+
|
45 |
+
$html.= $this->_getFieldHtml($element, $moduleName);
|
46 |
+
}
|
47 |
+
$html .= $this->_getFooterHtml($element);
|
48 |
+
|
49 |
+
return $html;
|
50 |
+
}
|
51 |
+
|
52 |
+
protected function _getDummyElement()
|
53 |
+
{
|
54 |
+
if (empty($this->_dummyElement)) {
|
55 |
+
$this->_dummyElement = new Varien_Object(array('show_in_default'=>1, 'show_in_website'=>1));
|
56 |
+
}
|
57 |
+
return $this->_dummyElement;
|
58 |
+
}
|
59 |
+
|
60 |
+
protected function _getFieldRenderer()
|
61 |
+
{
|
62 |
+
if (empty($this->_fieldRenderer)) {
|
63 |
+
$this->_fieldRenderer = Mage::getBlockSingleton('adminhtml/system_config_form_field');
|
64 |
+
}
|
65 |
+
return $this->_fieldRenderer;
|
66 |
+
}
|
67 |
+
|
68 |
+
protected function _getFieldHtml($fieldset, $moduleName)
|
69 |
+
{
|
70 |
+
$configData = $this->getConfigData();
|
71 |
+
$path = 'advanced/modules_disable_output/'.$moduleName; //TODO: move as property of form
|
72 |
+
$data = isset($configData[$path]) ? $configData[$path] : array();
|
73 |
+
|
74 |
+
$e = $this->_getDummyElement();
|
75 |
+
|
76 |
+
$moduleKey = substr($moduleName, strpos($moduleName,'_')+1);
|
77 |
+
$ver = (Mage::getConfig()->getModuleConfig($moduleName)->version);
|
78 |
+
$id = $moduleName;
|
79 |
+
|
80 |
+
$hasUpdate = false;
|
81 |
+
if($displayNames = Mage::app()->loadCache('onlinebiz_extensions_feed')){
|
82 |
+
if($displayNames = unserialize($displayNames)){
|
83 |
+
if(isset($displayNames[$moduleName])){
|
84 |
+
$url = @$displayNames[$moduleName]['url'];
|
85 |
+
$name = @$displayNames[$moduleName]['display_name'];
|
86 |
+
$version = @$displayNames[$moduleName]['version'];
|
87 |
+
|
88 |
+
$moduleName = '<a href="'.$url.'" target="_blank" title="'.$name.'">'.$name."</a>";
|
89 |
+
|
90 |
+
|
91 |
+
if($this->_convertVersion($ver) < $this->_convertVersion($version)){
|
92 |
+
$update = '<a href="'.$url.'" target="_blank"><img src="'.$this->getSkinUrl('onlinebiz/images/update.gif').'" title="'.$this->__("Update available").'"/></a>';
|
93 |
+
$hasUpdate = 1;
|
94 |
+
$moduleName ="$update $moduleName";
|
95 |
+
}
|
96 |
+
}
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
if(!$hasUpdate){
|
101 |
+
$update = '<a target="_blank"><img src="'.$this->getSkinUrl('onlinebiz/images/ok.gif').'" title="'.$this->__("Installed").'"/></a>';
|
102 |
+
$moduleName ="$update $moduleName";
|
103 |
+
}
|
104 |
+
|
105 |
+
if($ver){
|
106 |
+
|
107 |
+
|
108 |
+
|
109 |
+
$field = $fieldset->addField($id, 'label',
|
110 |
+
array(
|
111 |
+
'name' => 'ssssss',
|
112 |
+
'label' => $moduleName,
|
113 |
+
'value' => $ver,
|
114 |
+
|
115 |
+
))->setRenderer($this->_getFieldRenderer());
|
116 |
+
return $field->toHtml();
|
117 |
+
}
|
118 |
+
return '';
|
119 |
+
|
120 |
+
}
|
121 |
+
|
122 |
+
|
123 |
+
|
124 |
+
protected function _convertVersion($v){
|
125 |
+
$digits = @explode(".", $v);
|
126 |
+
$version = 0;
|
127 |
+
if(is_array($digits)){
|
128 |
+
foreach($digits as $k=>$v){
|
129 |
+
$version += ($v * pow(10, max(0, (3-$k))));
|
130 |
+
}
|
131 |
+
|
132 |
+
}
|
133 |
+
return $version;
|
134 |
+
}
|
135 |
+
}
|
app/code/local/OnlineBiz/ExtensionManager/Helper/Config.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Extensions Manager Extension
|
4 |
+
*
|
5 |
+
* PHP versions 4 and 5
|
6 |
+
*
|
7 |
+
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
8 |
+
* that is available through the world-wide-web at the following URI:
|
9 |
+
* http://store.onlinebizsoft.com/license.txt. If you did not receive a copy of
|
10 |
+
* the PHP License and are unable to obtain it through the web, please
|
11 |
+
* send a note to admin@onlinebizsoft.com so we can mail you a copy immediately.
|
12 |
+
*
|
13 |
+
* @category Magento Extensions
|
14 |
+
* @package ExtensionManager
|
15 |
+
* @author OnlineBiz <sales@onlinebizsoft.com>
|
16 |
+
* @copyright 2007-2011 OnlineBiz
|
17 |
+
* @license http://store.onlinebizsoft.com/license.txt
|
18 |
+
* @version 1.0.1
|
19 |
+
* @link http://store.onlinebizsoft.com
|
20 |
+
*/
|
21 |
+
|
22 |
+
class OnlineBiz_ExtensionManager_Helper_Config extends Mage_Core_Helper_Abstract{
|
23 |
+
/** Extensions feed path */
|
24 |
+
const EXTENSIONS_FEED_URL = 'http://onlinebizsoft.com/feeds/extensions.xml';
|
25 |
+
/** Updates Feed path */
|
26 |
+
const UPDATES_FEED_URL = 'http://onlinebizsoft.com/feeds/updates.xml';
|
27 |
+
}
|
app/code/local/OnlineBiz/ExtensionManager/Helper/Data.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Extensions Manager Extension
|
4 |
+
*
|
5 |
+
* PHP versions 4 and 5
|
6 |
+
*
|
7 |
+
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
8 |
+
* that is available through the world-wide-web at the following URI:
|
9 |
+
* http://store.onlinebizsoft.com/license.txt. If you did not receive a copy of
|
10 |
+
* the PHP License and are unable to obtain it through the web, please
|
11 |
+
* send a note to admin@onlinebizsoft.com so we can mail you a copy immediately.
|
12 |
+
*
|
13 |
+
* @category Magento Extensions
|
14 |
+
* @package ExtensionManager
|
15 |
+
* @author OnlineBiz <sales@onlinebizsoft.com>
|
16 |
+
* @copyright 2007-2011 OnlineBiz
|
17 |
+
* @license http://store.onlinebizsoft.com/license.txt
|
18 |
+
* @version 1.0.1
|
19 |
+
* @link http://store.onlinebizsoft.com
|
20 |
+
*/
|
21 |
+
|
22 |
+
class OnlineBiz_ExtensionManager_Helper_Data extends Mage_Core_Helper_Abstract{
|
23 |
+
|
24 |
+
}
|
25 |
+
|
26 |
+
|
app/code/local/OnlineBiz/ExtensionManager/Model/Feed.php
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Extensions Manager Extension
|
4 |
+
*
|
5 |
+
* PHP versions 4 and 5
|
6 |
+
*
|
7 |
+
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
8 |
+
* that is available through the world-wide-web at the following URI:
|
9 |
+
* http://store.onlinebizsoft.com/license.txt. If you did not receive a copy of
|
10 |
+
* the PHP License and are unable to obtain it through the web, please
|
11 |
+
* send a note to admin@onlinebizsoft.com so we can mail you a copy immediately.
|
12 |
+
*
|
13 |
+
* @category Magento Extensions
|
14 |
+
* @package ExtensionManager
|
15 |
+
* @author OnlineBiz <sales@onlinebizsoft.com>
|
16 |
+
* @copyright 2007-2011 OnlineBiz
|
17 |
+
* @license http://store.onlinebizsoft.com/license.txt
|
18 |
+
* @version 1.0.1
|
19 |
+
* @link http://store.onlinebizsoft.com
|
20 |
+
*/
|
21 |
+
|
22 |
+
class OnlineBiz_ExtensionManager_Model_Feed extends Mage_AdminNotification_Model_Feed
|
23 |
+
{
|
24 |
+
const XML_USE_HTTPS_PATH = 'onlinebiz_extensionmanager/feed/use_https';
|
25 |
+
const XML_FEED_URL_PATH = 'onlinebiz_extensionmanager/feed/url';
|
26 |
+
const XML_FREQUENCY_PATH = 'onlinebiz_extensionmanager/feed/check_frequency';
|
27 |
+
const XML_FREQUENCY_ENABLE = 'onlinebiz_extensionmanager/feed/enabled';
|
28 |
+
const XML_LAST_UPDATE_PATH = 'onlinebiz_extensionmanager/feed/last_update';
|
29 |
+
|
30 |
+
|
31 |
+
public static function check(){
|
32 |
+
if(!Mage::getStoreConfig(self::XML_FREQUENCY_ENABLE)){
|
33 |
+
return;
|
34 |
+
}
|
35 |
+
return Mage::getModel('onlinebiz_extensionmanager/feed')->checkUpdate();
|
36 |
+
}
|
37 |
+
|
38 |
+
public function getFrequency(){
|
39 |
+
return Mage::getStoreConfig(self::XML_FREQUENCY_PATH) * 3600;
|
40 |
+
}
|
41 |
+
|
42 |
+
public function getLastUpdate(){
|
43 |
+
//return 100;
|
44 |
+
return Mage::app()->loadCache('onlinebiz_extensionmanager_notifications_lastcheck');
|
45 |
+
}
|
46 |
+
|
47 |
+
public function setLastUpdate()
|
48 |
+
{
|
49 |
+
Mage::app()->saveCache(time(), 'onlinebiz_extensionmanager_notifications_lastcheck');
|
50 |
+
return $this;
|
51 |
+
}
|
52 |
+
public function getFeedUrl(){
|
53 |
+
if (is_null($this->_feedUrl)) {
|
54 |
+
$this->_feedUrl = (Mage::getStoreConfigFlag(self::XML_USE_HTTPS_PATH) ? 'https://' : 'http://')
|
55 |
+
. Mage::getStoreConfig(self::XML_FEED_URL_PATH);
|
56 |
+
}
|
57 |
+
return $this->_feedUrl;
|
58 |
+
}
|
59 |
+
|
60 |
+
public function checkUpdate(){
|
61 |
+
if (($this->getFrequency() + $this->getLastUpdate()) > time()) {
|
62 |
+
return $this;
|
63 |
+
}
|
64 |
+
|
65 |
+
$feedData = array();
|
66 |
+
|
67 |
+
$feedXml = $this->getFeedData();
|
68 |
+
|
69 |
+
if ($feedXml && $feedXml->channel && $feedXml->channel->item) {
|
70 |
+
foreach ($feedXml->channel->item as $item) {
|
71 |
+
$feedData[] = array(
|
72 |
+
'severity' => (int)$item->severity ? (int)$item->severity : 3,
|
73 |
+
'date_added' => $this->getDate((string)$item->pubDate),
|
74 |
+
'title' => (string)$item->title,
|
75 |
+
'description' => (string)$item->description,
|
76 |
+
'url' => (string)$item->link,
|
77 |
+
);
|
78 |
+
}
|
79 |
+
if ($feedData) {
|
80 |
+
Mage::getModel('adminnotification/inbox')->parse(array_reverse($feedData));
|
81 |
+
}
|
82 |
+
|
83 |
+
}
|
84 |
+
$this->setLastUpdate();
|
85 |
+
|
86 |
+
return $this;
|
87 |
+
}
|
88 |
+
|
89 |
+
}
|
app/code/local/OnlineBiz/ExtensionManager/Model/Feed/Abstract.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Extensions Manager Extension
|
4 |
+
*
|
5 |
+
* PHP versions 4 and 5
|
6 |
+
*
|
7 |
+
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
8 |
+
* that is available through the world-wide-web at the following URI:
|
9 |
+
* http://store.onlinebizsoft.com/license.txt. If you did not receive a copy of
|
10 |
+
* the PHP License and are unable to obtain it through the web, please
|
11 |
+
* send a note to admin@onlinebizsoft.com so we can mail you a copy immediately.
|
12 |
+
*
|
13 |
+
* @category Magento Extensions
|
14 |
+
* @package ExtensionManager
|
15 |
+
* @author OnlineBiz <sales@onlinebizsoft.com>
|
16 |
+
* @copyright 2007-2011 OnlineBiz
|
17 |
+
* @license http://store.onlinebizsoft.com/license.txt
|
18 |
+
* @version 1.0.1
|
19 |
+
* @link http://store.onlinebizsoft.com
|
20 |
+
*/
|
21 |
+
|
22 |
+
class OnlineBiz_ExtensionManager_Model_Feed_Abstract extends Mage_Core_Model_Abstract{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Retrieve feed data as XML element
|
26 |
+
*
|
27 |
+
* @return SimpleXMLElement
|
28 |
+
*/
|
29 |
+
public function getFeedData()
|
30 |
+
{
|
31 |
+
$curl = new Varien_Http_Adapter_Curl();
|
32 |
+
$curl->setConfig(array(
|
33 |
+
'timeout' => 1
|
34 |
+
));
|
35 |
+
$curl->write(Zend_Http_Client::GET, $this->getFeedUrl(), '1.0');
|
36 |
+
$data = $curl->read();
|
37 |
+
if ($data === false) {
|
38 |
+
return false;
|
39 |
+
}
|
40 |
+
$data = preg_split('/^\r?$/m', $data, 2);
|
41 |
+
$data = trim($data[1]);
|
42 |
+
$curl->close();
|
43 |
+
|
44 |
+
try {
|
45 |
+
$xml = new SimpleXMLElement($data);
|
46 |
+
}
|
47 |
+
catch (Exception $e) {
|
48 |
+
return false;
|
49 |
+
}
|
50 |
+
|
51 |
+
return $xml;
|
52 |
+
}
|
53 |
+
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Retrieve DB date from RSS date
|
57 |
+
*
|
58 |
+
* @param string $rssDate
|
59 |
+
* @return string YYYY-MM-DD YY:HH:SS
|
60 |
+
*/
|
61 |
+
public function getDate($rssDate)
|
62 |
+
{
|
63 |
+
return gmdate('Y-m-d H:i:s', strtotime($rssDate));
|
64 |
+
}
|
65 |
+
|
66 |
+
|
67 |
+
|
68 |
+
}
|
app/code/local/OnlineBiz/ExtensionManager/Model/Feed/Extensions.php
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Extensions Manager Extension
|
4 |
+
*
|
5 |
+
* PHP versions 4 and 5
|
6 |
+
*
|
7 |
+
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
8 |
+
* that is available through the world-wide-web at the following URI:
|
9 |
+
* http://store.onlinebizsoft.com/license.txt. If you did not receive a copy of
|
10 |
+
* the PHP License and are unable to obtain it through the web, please
|
11 |
+
* send a note to admin@onlinebizsoft.com so we can mail you a copy immediately.
|
12 |
+
*
|
13 |
+
* @category Magento Extensions
|
14 |
+
* @package ExtensionManager
|
15 |
+
* @author OnlineBiz <sales@onlinebizsoft.com>
|
16 |
+
* @copyright 2007-2011 OnlineBiz
|
17 |
+
* @license http://store.onlinebizsoft.com/license.txt
|
18 |
+
* @version 1.0.1
|
19 |
+
* @link http://store.onlinebizsoft.com
|
20 |
+
*/
|
21 |
+
|
22 |
+
class OnlineBiz_ExtensionManager_Model_Feed_Extensions extends OnlineBiz_Model_Feed_Abstract{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Retrieve feed url
|
26 |
+
*
|
27 |
+
* @return string
|
28 |
+
*/
|
29 |
+
public function getFeedUrl(){
|
30 |
+
return OnlineBiz_ExtensionManager_Helper_Config::EXTENSIONS_FEED_URL;
|
31 |
+
}
|
32 |
+
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Checks feed
|
36 |
+
* @return
|
37 |
+
*/
|
38 |
+
public function check(){
|
39 |
+
if(!(Mage::app()->loadCache('onlinebiz_extensionmanager_extensions_feed')) || (time()-Mage::app()->loadCache('onlinebiz_extensionmanager_extensions_feed_lastcheck')) > Mage::getStoreConfig('onlinebiz_extentionmanager/feed/check_frequency')){
|
40 |
+
$this->refresh();
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
public function refresh(){
|
45 |
+
$exts = array();
|
46 |
+
try{
|
47 |
+
$Node = $this->getFeedData();
|
48 |
+
if(!$Node) return false;
|
49 |
+
foreach($Node->children() as $ext){
|
50 |
+
$exts[(string)$ext->name] = array(
|
51 |
+
'display_name' => (string)$ext->display_name,
|
52 |
+
'version' => (string)$ext->version,
|
53 |
+
'url' => (string)$ext->url
|
54 |
+
);
|
55 |
+
}
|
56 |
+
|
57 |
+
Mage::app()->saveCache(serialize($exts), 'onlinebiz_extensionmanager_extensions_feed');
|
58 |
+
Mage::app()->saveCache(time(), 'onlinebiz_extensionmanager_extensions_feed_lastcheck');
|
59 |
+
return true;
|
60 |
+
}catch(Exception $E){
|
61 |
+
return false;
|
62 |
+
}
|
63 |
+
}
|
64 |
+
}
|
app/code/local/OnlineBiz/ExtensionManager/Model/Feed/Updates.php
ADDED
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Extensions Manager Extension
|
4 |
+
*
|
5 |
+
* PHP versions 4 and 5
|
6 |
+
*
|
7 |
+
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
8 |
+
* that is available through the world-wide-web at the following URI:
|
9 |
+
* http://store.onlinebizsoft.com/license.txt. If you did not receive a copy of
|
10 |
+
* the PHP License and are unable to obtain it through the web, please
|
11 |
+
* send a note to admin@onlinebizsoft.com so we can mail you a copy immediately.
|
12 |
+
*
|
13 |
+
* @category Magento Extensions
|
14 |
+
* @package ExtensionManager
|
15 |
+
* @author OnlineBiz <sales@onlinebizsoft.com>
|
16 |
+
* @copyright 2007-2011 OnlineBiz
|
17 |
+
* @license http://store.onlinebizsoft.com/license.txt
|
18 |
+
* @version 1.0.1
|
19 |
+
* @link http://store.onlinebizsoft.com
|
20 |
+
*/
|
21 |
+
|
22 |
+
class OnlineBiz_ExtensionManager_Model_Feed_Updates extends OnlineBiz_ExtensionManager_Model_Feed_Abstract{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Retrieve feed url
|
26 |
+
*
|
27 |
+
* @return string
|
28 |
+
*/
|
29 |
+
public function getFeedUrl(){
|
30 |
+
return OnlineBiz_ExtensionManager_Helper_Config::UPDATES_FEED_URL;
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Checks feed
|
35 |
+
* @return
|
36 |
+
*/
|
37 |
+
public function check(){
|
38 |
+
if((time()-Mage::app()->loadCache('onlinebiz_extensionmanager_updates_feed_lastcheck')) > Mage::getStoreConfig('onlinebiz_extensionmanager/feed/check_frequency')){
|
39 |
+
$this->refresh();
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
public function refresh(){
|
44 |
+
$feedData = array();
|
45 |
+
|
46 |
+
try{
|
47 |
+
|
48 |
+
$Node = $this->getFeedData();
|
49 |
+
if(!$Node) return false;
|
50 |
+
foreach($Node->children() as $item){
|
51 |
+
|
52 |
+
if($this->isInteresting($item)){
|
53 |
+
$date = strtotime((string)$item->date);
|
54 |
+
if(!Mage::getStoreConfig('onlinebiz_extensionmanager/install/run') || (Mage::getStoreConfig('onlinebiz_extensionmanager/install/run') < $date)){
|
55 |
+
$feedData[] = array(
|
56 |
+
'severity' => 3,
|
57 |
+
'date_added' => $this->getDate((string)$item->date),
|
58 |
+
'title' => (string)$item->title,
|
59 |
+
'description' => (string)$item->content,
|
60 |
+
'url' => (string)$item->url,
|
61 |
+
);
|
62 |
+
}
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
if ($feedData) {
|
67 |
+
Mage::getModel('adminnotification/inbox')->parse(($feedData));
|
68 |
+
}
|
69 |
+
|
70 |
+
Mage::app()->saveCache(time(), 'onlinebiz_extensionmanager_updates_feed_lastcheck');
|
71 |
+
return true;
|
72 |
+
}catch(Exception $E){
|
73 |
+
return false;
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
|
78 |
+
|
79 |
+
public function getInterests(){
|
80 |
+
if(!$this->getData('interests')){
|
81 |
+
$types = @explode(',', Mage::getStoreConfig('onlinebiz_extensionmanager/feed/interests'));
|
82 |
+
$this->setData('interests', $types);
|
83 |
+
}
|
84 |
+
return $this->getData('interests');
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
*
|
89 |
+
* @return
|
90 |
+
*/
|
91 |
+
public function isInteresting($item){
|
92 |
+
$interests = $this->getInterests();
|
93 |
+
|
94 |
+
$types = @explode(",", (string)$item->type);
|
95 |
+
$exts = @explode(",", (string)$item->extensions);
|
96 |
+
|
97 |
+
$isInterestedInSelfUpgrades = array_search(OnlineBiz_Model_Source_Updates_Type::TYPE_INSTALLED_UPDATE, $types);
|
98 |
+
|
99 |
+
foreach($types as $type){
|
100 |
+
|
101 |
+
if(array_search($type, $interests) !== false){
|
102 |
+
return true;
|
103 |
+
}
|
104 |
+
if(($type == OnlineBiz_Model_Source_Updates_Type::TYPE_UPDATE_RELEASE) && $isInterestedInSelfUpgrades){
|
105 |
+
foreach($exts as $ext){
|
106 |
+
if($this->isExtensionInstalled($ext)){
|
107 |
+
return true;
|
108 |
+
}
|
109 |
+
}
|
110 |
+
}
|
111 |
+
}
|
112 |
+
return false;
|
113 |
+
}
|
114 |
+
|
115 |
+
public function isExtensionInstalled($code){
|
116 |
+
$modules = array_keys((array)Mage::getConfig()->getNode('modules')->children());
|
117 |
+
|
118 |
+
foreach ($modules as $moduleName) {
|
119 |
+
if($moduleName == $code){
|
120 |
+
return true;
|
121 |
+
}
|
122 |
+
}
|
123 |
+
return false;
|
124 |
+
}
|
125 |
+
|
126 |
+
}
|
app/code/local/OnlineBiz/ExtensionManager/Model/Source/Updates/Type.php
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Extensions Manager Extension
|
4 |
+
*
|
5 |
+
* PHP versions 4 and 5
|
6 |
+
*
|
7 |
+
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
8 |
+
* that is available through the world-wide-web at the following URI:
|
9 |
+
* http://store.onlinebizsoft.com/license.txt. If you did not receive a copy of
|
10 |
+
* the PHP License and are unable to obtain it through the web, please
|
11 |
+
* send a note to admin@onlinebizsoft.com so we can mail you a copy immediately.
|
12 |
+
*
|
13 |
+
* @category Magento Extensions
|
14 |
+
* @package ExtensionManager
|
15 |
+
* @author OnlineBiz <sales@onlinebizsoft.com>
|
16 |
+
* @copyright 2007-2011 OnlineBiz
|
17 |
+
* @license http://store.onlinebizsoft.com/license.txt
|
18 |
+
* @version 1.0.1
|
19 |
+
* @link http://store.onlinebizsoft.com
|
20 |
+
*/
|
21 |
+
|
22 |
+
class OnlineBiz_ExtensionManager_Model_Source_Updates_Type extends Mage_Eav_Model_Entity_Attribute_Source_Abstract{
|
23 |
+
|
24 |
+
const TYPE_PROMO = 'PROMO';
|
25 |
+
const TYPE_NEW_RELEASE = 'NEW_RELEASE';
|
26 |
+
const TYPE_UPDATE_RELEASE = 'UPDATE_RELEASE';
|
27 |
+
const TYPE_INFO = 'INFO';
|
28 |
+
const TYPE_INSTALLED_UPDATE = 'INSTALLED_UPDATE';
|
29 |
+
|
30 |
+
|
31 |
+
public function toOptionArray(){
|
32 |
+
return array(
|
33 |
+
array('value' => self::TYPE_INSTALLED_UPDATE, 'label' => Mage::helper('onlinebiz_extensionmanager')->__('My extensions updates')),
|
34 |
+
array('value' => self::TYPE_UPDATE_RELEASE, 'label' => Mage::helper('onlinebiz_extensionmanager')->__('All extensions updates')),
|
35 |
+
array('value' => self::TYPE_NEW_RELEASE, 'label' => Mage::helper('onlinebiz_extensionmanager')->__('New Releases')),
|
36 |
+
array('value' => self::TYPE_PROMO, 'label' => Mage::helper('onlinebiz_extensionmanager')->__('Promotions/Discounts')),
|
37 |
+
array('value' => self::TYPE_INFO, 'label' => Mage::helper('onlinebiz_extensionmanager')->__('Other information'))
|
38 |
+
);
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Retrive all attribute options
|
43 |
+
*
|
44 |
+
* @return array
|
45 |
+
*/
|
46 |
+
public function getAllOptions()
|
47 |
+
{
|
48 |
+
return $this->toOptionArray();
|
49 |
+
}
|
50 |
+
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Returns label for value
|
54 |
+
* @param string $value
|
55 |
+
* @return string
|
56 |
+
*/
|
57 |
+
public function getLabel($value){
|
58 |
+
$options = $this->toOptionArray();
|
59 |
+
foreach($options as $v){
|
60 |
+
if($v['value'] == $value){
|
61 |
+
return $v['label'];
|
62 |
+
}
|
63 |
+
}
|
64 |
+
return '';
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Returns array ready for use by grid
|
69 |
+
* @return array
|
70 |
+
*/
|
71 |
+
public function getGridOptions(){
|
72 |
+
$items = $this->getAllOptions();
|
73 |
+
$out = array();
|
74 |
+
foreach($items as $item){
|
75 |
+
$out[$item['value']] = $item['label'];
|
76 |
+
}
|
77 |
+
return $out;
|
78 |
+
}
|
79 |
+
}
|
app/code/local/OnlineBiz/ExtensionManager/etc/adminhtml.xml
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<layout>
|
4 |
+
<updates>
|
5 |
+
<onlinebiz_extensionmanager module="onlinebiz_extensionmanager">
|
6 |
+
<file>onlinebiz_extentionmanager.xml</file>
|
7 |
+
</onlinebiz_extensionmanager>
|
8 |
+
</updates>
|
9 |
+
</layout>
|
10 |
+
|
11 |
+
<acl>
|
12 |
+
<resources>
|
13 |
+
<all>
|
14 |
+
<title>Allow Everything</title>
|
15 |
+
</all>
|
16 |
+
<admin>
|
17 |
+
<children>
|
18 |
+
<system>
|
19 |
+
<children>
|
20 |
+
<config>
|
21 |
+
<children>
|
22 |
+
<onlinebiz_extensionmanager>
|
23 |
+
<title>Extentions Manager</title>
|
24 |
+
</onlinebiz_extensionmanager>
|
25 |
+
</children>
|
26 |
+
</config>
|
27 |
+
</children>
|
28 |
+
</system>
|
29 |
+
</children>
|
30 |
+
</admin>
|
31 |
+
</resources>
|
32 |
+
</acl>
|
33 |
+
</config>
|
app/code/local/OnlineBiz/ExtensionManager/etc/config.xml
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<OnlineBiz_ExtensionManager>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</OnlineBiz_ExtensionManager>
|
7 |
+
</modules>
|
8 |
+
|
9 |
+
<global>
|
10 |
+
<blocks>
|
11 |
+
<onlinebiz_extensionmanager>
|
12 |
+
<class>OnlineBiz_ExtensionManager_Block</class>
|
13 |
+
</onlinebiz_extensionmanager>
|
14 |
+
<adminhtml>
|
15 |
+
<rewrite>
|
16 |
+
<notification_window>OnlineBiz_ExtensionManager_Block_Notification_Window</notification_window>
|
17 |
+
</rewrite>
|
18 |
+
</adminhtml>
|
19 |
+
</blocks>
|
20 |
+
<resources>
|
21 |
+
<onlinebiz_extensionmanager_setup>
|
22 |
+
<setup>
|
23 |
+
<module>OnlineBiz_ExtensionManager</module>
|
24 |
+
</setup>
|
25 |
+
<connection>
|
26 |
+
<use>core_setup</use>
|
27 |
+
</connection>
|
28 |
+
</onlinebiz_extensionmanager_setup>
|
29 |
+
<onlinebiz_extensionmanager_write>
|
30 |
+
<connection>
|
31 |
+
<use>core_write</use>
|
32 |
+
</connection>
|
33 |
+
</onlinebiz_extensionmanager_write>
|
34 |
+
<onlinebiz_extensionmanager_read>
|
35 |
+
<connection>
|
36 |
+
<use>core_read</use>
|
37 |
+
</connection>
|
38 |
+
</onlinebiz_extensionmanager_read>
|
39 |
+
</resources>
|
40 |
+
<models>
|
41 |
+
<onlinebiz_extensionmanager>
|
42 |
+
<class>OnlineBiz_ExtensionManager_Model</class>
|
43 |
+
</onlinebiz_extensionmanager>
|
44 |
+
</models>
|
45 |
+
|
46 |
+
<helpers>
|
47 |
+
<onlinebiz_extensionmanager>
|
48 |
+
<class>OnlineBiz_ExtensionManager_Helper</class>
|
49 |
+
</onlinebiz_extensionmanager>
|
50 |
+
</helpers>
|
51 |
+
</global>
|
52 |
+
|
53 |
+
<adminhtml>
|
54 |
+
<layout>
|
55 |
+
<updates>
|
56 |
+
<onlinebiz_extensionmanager module="OnlineBiz_ExtentionManager">
|
57 |
+
<file>onlinebiz_extensionmanager.xml</file>
|
58 |
+
</onlinebiz_extensionmanager>
|
59 |
+
</updates>
|
60 |
+
</layout>
|
61 |
+
|
62 |
+
<acl>
|
63 |
+
<resources>
|
64 |
+
<all>
|
65 |
+
<title>Allow Everything</title>
|
66 |
+
</all>
|
67 |
+
<admin>
|
68 |
+
<children>
|
69 |
+
<system>
|
70 |
+
<children>
|
71 |
+
<config>
|
72 |
+
<children>
|
73 |
+
<onlinebiz_extensionmanager>
|
74 |
+
<title>Extentions Manager</title>
|
75 |
+
</onlinebiz_extensionmanager>
|
76 |
+
</children>
|
77 |
+
</config>
|
78 |
+
</children>
|
79 |
+
</system>
|
80 |
+
</children>
|
81 |
+
</admin>
|
82 |
+
</resources>
|
83 |
+
</acl>
|
84 |
+
</adminhtml>
|
85 |
+
</config>
|
app/code/local/OnlineBiz/ExtensionManager/etc/system.xml
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<onlinebiz_extensionmanager translate="label" module="onlinebiz_extensionmanager">
|
5 |
+
<label>OnlineBizSoft</label>
|
6 |
+
<sort_order>300</sort_order>
|
7 |
+
</onlinebiz_extensionmanager>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<onlinebiz_extensionmanager translate="label" module="onlinebiz_extensionmanager">
|
11 |
+
<label>Extensions Info</label>
|
12 |
+
<tab>onlinebiz_extensionmanager</tab>
|
13 |
+
<frontend_type>text</frontend_type>
|
14 |
+
<sort_order>99999</sort_order>
|
15 |
+
<show_in_default>1</show_in_default>
|
16 |
+
<show_in_website>1</show_in_website>
|
17 |
+
<show_in_store>1</show_in_store>
|
18 |
+
<groups>
|
19 |
+
<extensions translate="label">
|
20 |
+
<label>Installed OnlineBiz Extensions</label>
|
21 |
+
<frontend_type>text</frontend_type>
|
22 |
+
<frontend_model>onlinebiz_extensionmanager/system_config_form_fieldset_extensions</frontend_model>
|
23 |
+
<sort_order>2</sort_order>
|
24 |
+
<show_in_default>1</show_in_default>
|
25 |
+
<show_in_website>1</show_in_website>
|
26 |
+
<show_in_store>1</show_in_store>
|
27 |
+
</extensions>
|
28 |
+
</groups>
|
29 |
+
</onlinebiz_extensionmanager>
|
30 |
+
</sections>
|
31 |
+
</config>
|
app/code/local/{OnlineBiz_GoogleSocial/app/code/local/OnlineBiz → OnlineBiz}/Googlesocial/Block/Widget.php
RENAMED
File without changes
|
app/code/local/{OnlineBiz_GoogleSocial/app/code/local/OnlineBiz → OnlineBiz}/Googlesocial/Block/vssver.scc
RENAMED
File without changes
|
app/code/local/{OnlineBiz_GoogleSocial/app/code/local/OnlineBiz → OnlineBiz}/Googlesocial/Helper/Data.php
RENAMED
File without changes
|
app/code/local/{OnlineBiz_GoogleSocial/app/code/local/OnlineBiz → OnlineBiz}/Googlesocial/Helper/vssver.scc
RENAMED
File without changes
|
app/code/local/{OnlineBiz_GoogleSocial/app/code/local/OnlineBiz → OnlineBiz}/Googlesocial/Model/Config/DisplayPositionOptions.php
RENAMED
File without changes
|
app/code/local/{OnlineBiz_GoogleSocial/app/code/local/OnlineBiz → OnlineBiz}/Googlesocial/Model/Config/vssver.scc
RENAMED
File without changes
|
app/code/local/{OnlineBiz_GoogleSocial/app/code/local/OnlineBiz → OnlineBiz}/Googlesocial/etc/config.xml
RENAMED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<OnlineBiz_Googlesocial>
|
5 |
-
<version>0.
|
6 |
</OnlineBiz_Googlesocial>
|
7 |
</modules>
|
8 |
<frontend>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<OnlineBiz_Googlesocial>
|
5 |
+
<version>0.1.0</version>
|
6 |
</OnlineBiz_Googlesocial>
|
7 |
</modules>
|
8 |
<frontend>
|
app/code/local/{OnlineBiz_GoogleSocial/app/code/local/OnlineBiz → OnlineBiz}/Googlesocial/etc/system.xml
RENAMED
File without changes
|
app/code/local/OnlineBiz/Googlesocial/etc/vssver.scc
ADDED
Binary file
|
app/code/local/OnlineBiz_GoogleSocial/app/code/local/OnlineBiz/Googlesocial/etc/vssver.scc
DELETED
Binary file
|
app/code/local/OnlineBiz_GoogleSocial/app/design/frontend/default/default/layout/vssver.scc
DELETED
Binary file
|
app/code/local/OnlineBiz_GoogleSocial/app/etc/modules/vssver.scc
DELETED
Binary file
|
app/design/adminhtml/default/default/layout/onlinebiz_extensionmanager.xml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout>
|
3 |
+
<default>
|
4 |
+
<reference name="head">
|
5 |
+
<action method="addCss"><name>onlinebiz_extensionmanager/css/window.css</name></action>
|
6 |
+
</reference>
|
7 |
+
</default>
|
8 |
+
</layout>
|
app/design/adminhtml/default/default/template/onlinebiz_extensionmanager/notification/window.phtml
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Extensions Manager Extension
|
4 |
+
*
|
5 |
+
* PHP versions 4 and 5
|
6 |
+
*
|
7 |
+
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
8 |
+
* that is available through the world-wide-web at the following URI:
|
9 |
+
* http://store.onlinebizsoft.com/license.txt. If you did not receive a copy of
|
10 |
+
* the PHP License and are unable to obtain it through the web, please
|
11 |
+
* send a note to admin@onlinebizsoft.com so we can mail you a copy immediately.
|
12 |
+
*
|
13 |
+
* @category Magento Extensions
|
14 |
+
* @package ExtensionManager
|
15 |
+
* @author OnlineBiz <sales@onlinebizsoft.com>
|
16 |
+
* @copyright 2007-2011 OnlineBiz
|
17 |
+
* @license http://store.onlinebizsoft.com/license.txt
|
18 |
+
* @version 1.0.1
|
19 |
+
* @link http://store.onlinebizsoft.com
|
20 |
+
*/
|
21 |
+
?>
|
22 |
+
<div id="message-popup-window-mask" style="display:none;"></div>
|
23 |
+
|
24 |
+
<div style="position:relative;margin-left:-390px;">
|
25 |
+
<div id="onl_notif" class="notification" style="display:none;">
|
26 |
+
<div class="head">
|
27 |
+
<h3><?php echo $this->getHeaderText();?></h3>
|
28 |
+
<button type="button" class="close" onclick="closeMessagePopupWindow()"><span ><?php echo $this->getCloseText(); ?></span></button>
|
29 |
+
</div>
|
30 |
+
<div class="content">
|
31 |
+
<?php echo $this->getNoticeMessageText(); ?>
|
32 |
+
</div>
|
33 |
+
</div>
|
34 |
+
</div>
|
35 |
+
<script>
|
36 |
+
function showAwNotificator(){
|
37 |
+
openMessagePopupWindow();
|
38 |
+
Effect.Appear('onl_notif', { duration: 1.0 });
|
39 |
+
}
|
40 |
+
Event.observe(window, 'load', showAwNotificator);
|
41 |
+
|
42 |
+
|
43 |
+
function openMessagePopupWindow(){
|
44 |
+
var height = $('html-body').getHeight();
|
45 |
+
$('message-popup-window-mask').setStyle({'height':height+'px'});
|
46 |
+
toggleSelectsUnderBlock($('message-popup-window-mask'), false);
|
47 |
+
Element.show('message-popup-window-mask');
|
48 |
+
}
|
49 |
+
|
50 |
+
function closeMessagePopupWindow()
|
51 |
+
{
|
52 |
+
toggleSelectsUnderBlock($('message-popup-window-mask'), true);
|
53 |
+
Effect.Fade('onl_notif', { duration: 0.5 });
|
54 |
+
Element.hide('message-popup-window-mask');
|
55 |
+
}
|
56 |
+
|
57 |
+
|
58 |
+
function saveCloseMessagePopupWindow()
|
59 |
+
{
|
60 |
+
$('onl-save-button-content').innerHTML = '<?php echo $this->__("Saving, please wait...")?>';
|
61 |
+
$('onl-save-button').addClassName('disabled');
|
62 |
+
$('onl_firstrun').request({
|
63 |
+
onComplete: function(){
|
64 |
+
toggleSelectsUnderBlock($('message-popup-window-mask'), true);
|
65 |
+
Effect.Fade('onl_notif', { duration: 0.5 });
|
66 |
+
Element.hide('message-popup-window-mask');
|
67 |
+
}
|
68 |
+
})
|
69 |
+
|
70 |
+
}
|
71 |
+
|
72 |
+
</script>
|
73 |
+
|
74 |
+
|
75 |
+
<?php /*
|
76 |
+
|
77 |
+
|
78 |
+
*/?>
|
app/design/adminhtml/default/default/template/onlinebiz_extensionmanager/notification/window/first-run.phtml
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Extensions Manager Extension
|
4 |
+
*
|
5 |
+
* PHP versions 4 and 5
|
6 |
+
*
|
7 |
+
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
8 |
+
* that is available through the world-wide-web at the following URI:
|
9 |
+
* http://store.onlinebizsoft.com/license.txt. If you did not receive a copy of
|
10 |
+
* the PHP License and are unable to obtain it through the web, please
|
11 |
+
* send a note to admin@onlinebizsoft.com so we can mail you a copy immediately.
|
12 |
+
*
|
13 |
+
* @category Magento Extensions
|
14 |
+
* @package ExtensionManager
|
15 |
+
* @author OnlineBiz <sales@onlinebizsoft.com>
|
16 |
+
* @copyright 2007-2011 OnlineBiz
|
17 |
+
* @license http://store.onlinebizsoft.com/license.txt
|
18 |
+
* @version 1.0.1
|
19 |
+
* @link http://store.onlinebizsoft.com
|
20 |
+
*/
|
21 |
+
?>
|
22 |
+
<form method="post" action="<?php echo $this->getUrl('adminhtml/system_config/save', array('section'=>'onlinebiz_extensionmanager'))?>" id="onl_firstrun">
|
23 |
+
<table class="form-list" cellspacing="0">
|
24 |
+
<colgroup class="label"/>
|
25 |
+
<colgroup class="value"/>
|
26 |
+
<tbody>
|
27 |
+
|
28 |
+
<tr>
|
29 |
+
<td class="label">
|
30 |
+
<label for="general_locale_timezone"><?php echo $this->__('I wish to be informed about')?>:</label>
|
31 |
+
</td>
|
32 |
+
<td class="value">
|
33 |
+
|
34 |
+
|
35 |
+
<select name="groups[feed][fields][interests][value][]" style="width:214px" size="6" multiple="multiple" id="interests">
|
36 |
+
<?php foreach(Mage::getModel('onlinebiz_extensionmanager/source_updates_type')->getGridOptions() as $k=>$v):?>
|
37 |
+
<option selected="selected" value="<?php echo $k?>"><?php echo $this->__($v)?></option>
|
38 |
+
<?php endforeach;?>
|
39 |
+
</select><br/>
|
40 |
+
<a href="#" onclick="$$($('interests').options).each(function(el){el.selected=1});return false;"><?php echo $this->__("Select all")?></a>
|
41 |
+
/
|
42 |
+
<a href="#" onclick="$('interests').selectedIndex = -1;return false;"><?php echo $this->__("Deselect all")?></a>
|
43 |
+
</td>
|
44 |
+
</tr>
|
45 |
+
<tr>
|
46 |
+
<td class="label"></td>
|
47 |
+
<td class="value">
|
48 |
+
<button id="onl-save-button" class="scalable save" style="" onclick="saveCloseMessagePopupWindow()" type="button">
|
49 |
+
<span id="onl-save-button-content"> <?php echo $this->__('Save & Close')?></span>
|
50 |
+
</button>
|
51 |
+
</td>
|
52 |
+
</tr>
|
53 |
+
<tr>
|
54 |
+
<td colspan="2" align="right">
|
55 |
+
<div style="width:365px"><small><?php echo $this->__("This message appears only once. At any time you can change these preferences from System > Configuration > OnlineBiz extensions > Info. <br/><a href=\"%s\">Visit it now</a>", $this->getUrl('adminhtml/system_config/edit', array('section'=>'onlinebiz_extensionmanager')))?></small>
|
56 |
+
</div>
|
57 |
+
</td>
|
58 |
+
</tr>
|
59 |
+
</tbody>
|
60 |
+
</table>
|
61 |
+
</form>
|
app/{code/local/OnlineBiz_GoogleSocial/app/design → design}/frontend/default/default/layout/googlesocial.xml
RENAMED
File without changes
|
app/{code/local/OnlineBiz_GoogleSocial/app/design → design}/frontend/default/default/template/googlesocial/vssver.scc
RENAMED
File without changes
|
app/{code/local/OnlineBiz_GoogleSocial/app/design → design}/frontend/default/default/template/googlesocial/widget.phtml
RENAMED
File without changes
|
app/etc/modules/OnlineBiz_ExtensionManager.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<OnlineBiz_ExtensionManager>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
</OnlineBiz_ExtensionManager>
|
8 |
+
</modules>
|
9 |
+
</config>
|
app/{code/local/OnlineBiz_GoogleSocial/app/etc → etc}/modules/OnlineBiz_Googlesocial.xml
RENAMED
File without changes
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>OnlineBiz_GoogleSocial</name>
|
4 |
-
<version>
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>Allow various
|
10 |
-
<description>
|
11 |
-
<notes>Backup
|
12 |
<authors><author><name>Thannd</name><user>auto-converted</user><email>than@onlinebizsoft.com</email></author></authors>
|
13 |
-
<date>2011-07-
|
14 |
-
<time>
|
15 |
-
<contents><target name="
|
16 |
<compatible/>
|
17 |
<dependencies><required><package><name></name><channel>community</channel><min></min><max></max></package></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>OnlineBiz_GoogleSocial</name>
|
4 |
+
<version>5.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>Allow various widgets of new Google Social Network platform added to Magento Store (Google Friend Connect)</summary>
|
10 |
+
<description>Have you had a Fan pages or joined Social Network? Or you are having a Fans page of Facebook? It is time to look at Google Plus (+1). Please be ahead of your competitors to attractive members for your store.</description>
|
11 |
+
<notes>Backup file before installation</notes>
|
12 |
<authors><author><name>Thannd</name><user>auto-converted</user><email>than@onlinebizsoft.com</email></author></authors>
|
13 |
+
<date>2011-07-26</date>
|
14 |
+
<time>02:44:02</time>
|
15 |
+
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="onlinebiz_extensionmanager.xml" hash="89d0ae62533ad73ad8c5a4894f72a96b"/></dir><dir name="template"><dir name="onlinebiz_extensionmanager"><dir name="notification"><file name="window.phtml" hash="37da02719a40057f6d25eb84f70aa753"/><dir name="window"><file name="first-run.phtml" hash="bfced2933060fd602ceae6966a6f4398"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="googlesocial.xml" hash="dd081286ada4238f8ab5e70d1104744a"/></dir><dir name="template"><dir name="googlesocial"><file name="vssver.scc" hash="c1bf376398bc3613702b57dd6b346989"/><file name="widget.phtml" hash="9019d6c4d019bf4c6af9d6c5fb12a89e"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="OnlineBiz_ExtensionManager.xml" hash="015685417678b3f628f17478ad3429f3"/><file name="OnlineBiz_Googlesocial.xml" hash="f0c253537dc8124d6557ef78f601b4ee"/></dir></target><target name="magelocal"><dir name="OnlineBiz"><dir name="ExtensionManager"><dir name="Block"><dir name="Notification"><file name="Window.php" hash="e168380f385c5cbc2ba2f0a36b0bb7f4"/></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Fieldset"><file name="Extensions.php" hash="a2a0026a6586ed49322a99b534b84d73"/></dir></dir></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="214a3927bbba836ee1564ca0ee23adf3"/><file name="config.xml" hash="5d08b8b5812be0d2153cc0801d321290"/><file name="system.xml" hash="cc21211e0a1e957831486690e8279279"/></dir><dir name="Helper"><file name="Config.php" hash="e5e0a254a77aaf735f95cb6f12da97df"/><file name="Data.php" hash="7a3aab2f6aa92d92b0ee76ca05c6889b"/></dir><dir name="Model"><file name="Feed.php" hash="f49d91d25fb334c28e37ae7f381ab5ea"/><dir name="Feed"><file name="Abstract.php" hash="0ace3b1fa9980c49a9bc40df47d2a2fe"/><file name="Extensions.php" hash="228fd9c710dbb96a6f61cf0ef829fe15"/><file name="Updates.php" hash="5f5ab01e45eb81f271b88d0465fe1618"/></dir><dir name="Source"><dir name="Updates"><file name="Type.php" hash="c33e2ccaa0c6cd31dd4c235707600923"/></dir></dir></dir></dir><dir name="Googlesocial"><dir name="Block"><file name="vssver.scc" hash="4299a70eee49a6f89ef3d08635f0b94b"/><file name="Widget.php" hash="feda1394440af70f518fe56c5fbd37da"/></dir><dir name="etc"><file name="config.xml" hash="78a7cb80ae9af3a77433b40765b6e4a5"/><file name="system.xml" hash="64b25bc99b2ab82cf6227fedd129fb5b"/><file name="vssver.scc" hash="7b907c0c4850d10e014e21022791afd5"/></dir><dir name="Helper"><file name="Data.php" hash="9633c8fefa1767b4f33a3a408b9b055d"/><file name="vssver.scc" hash="20723220e658d15d8b8fd6f4cca40b09"/></dir><dir name="Model"><dir name="Config"><file name="DisplayPositionOptions.php" hash="476c8daa57e6ef3ab4690c037bf24dfc"/><file name="vssver.scc" hash="5d8993b7e7fd8762d2ca047cc7137f21"/></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><package><name></name><channel>community</channel><min></min><max></max></package></required></dependencies>
|
18 |
</package>
|