Version Notes
--
Download this release
Release Info
Developer | DHL Vertriebs GmbH |
Extension | YBM_Common |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/community/YBM/Common/Block/Adminhtml/Version.php +10 -0
- app/code/community/YBM/Common/Helper/Abstract.php +16 -0
- app/code/community/YBM/Common/Helper/Data.php +5 -0
- app/code/community/YBM/Common/Model/Feed.php +34 -0
- app/code/community/YBM/Common/etc/config.xml +64 -0
- app/code/community/YBM/Common/etc/system.xml +48 -0
- app/etc/modules/YBM_Common.xml +14 -0
- app/locale/de_DE/YBM_Common.csv +2 -0
- app/locale/en_US/YBM_Common.csv +0 -0
- package.xml +18 -0
app/code/community/YBM/Common/Block/Adminhtml/Version.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class YBM_Common_Block_Adminhtml_Version
|
4 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Field
|
5 |
+
{
|
6 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
7 |
+
{
|
8 |
+
return (string) Mage::helper('ybmcommon')->getExtensionVersion();
|
9 |
+
}
|
10 |
+
}
|
app/code/community/YBM/Common/Helper/Abstract.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class YBM_Common_Helper_Abstract extends Mage_Core_Helper_Abstract {
|
4 |
+
public function getExtensionVersion()
|
5 |
+
{
|
6 |
+
$parts = explode('_', get_class($this));
|
7 |
+
|
8 |
+
if (!is_array($parts) || count($parts) < 2) {
|
9 |
+
return 'UNKNOWN';
|
10 |
+
}
|
11 |
+
|
12 |
+
$module = $parts[0] . '_' . $parts[1];
|
13 |
+
|
14 |
+
return (string) Mage::getConfig()->getModuleConfig($module)->version;
|
15 |
+
}
|
16 |
+
}
|
app/code/community/YBM/Common/Helper/Data.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class YBM_Common_Helper_Data extends YBM_Common_Helper_Abstract {
|
4 |
+
}
|
5 |
+
|
app/code/community/YBM/Common/Model/Feed.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class YBM_Common_Model_Feed extends Mage_AdminNotification_Model_Feed {
|
3 |
+
/**
|
4 |
+
* Retrieve feed url
|
5 |
+
*
|
6 |
+
* @return string
|
7 |
+
*/
|
8 |
+
public function getFeedUrl() {
|
9 |
+
if (is_null ( $this->_feedUrl )) {
|
10 |
+
// $this->_feedUrl = Mage::getStoreConfigFlag ( self::XML_USE_HTTPS_PATH ) ? 'https://' : 'http://' . 'news.ybm-deutschland.de/feed/';
|
11 |
+
$this->_feedUrl = 'http://news.ybm-deutschland.de/feed/';
|
12 |
+
}
|
13 |
+
return $this->_feedUrl;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Retrieve Last update time
|
18 |
+
*
|
19 |
+
* @return int
|
20 |
+
*/
|
21 |
+
public function getLastUpdate() {
|
22 |
+
return Mage::app ()->loadCache ( 'admin_ybm_common_lastcheck' );
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Set last update time (now)
|
27 |
+
*
|
28 |
+
* @return Mage_AdminNotification_Model_Feed
|
29 |
+
*/
|
30 |
+
public function setLastUpdate() {
|
31 |
+
Mage::app ()->saveCache ( time (), 'admin_ybm_common_lastcheck' );
|
32 |
+
return $this;
|
33 |
+
}
|
34 |
+
}
|
app/code/community/YBM/Common/etc/config.xml
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* @package YBM_AdvancedPicklist
|
5 |
+
* @copyright Copyright (c) 2013 Stephan Wienczny (stephan.wienczny@ybm-deutschland.de)
|
6 |
+
*/
|
7 |
+
-->
|
8 |
+
<config>
|
9 |
+
<modules>
|
10 |
+
<YBM_Common>
|
11 |
+
<version>2.0.0</version>
|
12 |
+
</YBM_Common>
|
13 |
+
</modules>
|
14 |
+
<adminhtml>
|
15 |
+
<translate>
|
16 |
+
<modules>
|
17 |
+
<ybmcommon>
|
18 |
+
<files>
|
19 |
+
<default>YBM_Common.csv</default>
|
20 |
+
</files>
|
21 |
+
</ybmcommon>
|
22 |
+
</modules>
|
23 |
+
</translate>
|
24 |
+
<events>
|
25 |
+
<controller_action_predispatch>
|
26 |
+
<observers>
|
27 |
+
<ybmcommon>
|
28 |
+
<type>singleton</type>
|
29 |
+
<class>ybmcommon/feed</class>
|
30 |
+
<method>checkUpdate</method>
|
31 |
+
</ybmcommon>
|
32 |
+
</observers>
|
33 |
+
</controller_action_predispatch>
|
34 |
+
</events>
|
35 |
+
</adminhtml>
|
36 |
+
<frontend>
|
37 |
+
<translate>
|
38 |
+
<modules>
|
39 |
+
<ybmcommon>
|
40 |
+
<files>
|
41 |
+
<default>YBM_Common.csv</default>
|
42 |
+
</files>
|
43 |
+
</ybmcommon>
|
44 |
+
</modules>
|
45 |
+
</translate>
|
46 |
+
</frontend>
|
47 |
+
<global>
|
48 |
+
<blocks>
|
49 |
+
<ybmcommon>
|
50 |
+
<class>YBM_Common_Block</class>
|
51 |
+
</ybmcommon>
|
52 |
+
</blocks>
|
53 |
+
<helpers>
|
54 |
+
<ybmcommon>
|
55 |
+
<class>YBM_Common_Helper</class>
|
56 |
+
</ybmcommon>
|
57 |
+
</helpers>
|
58 |
+
<models>
|
59 |
+
<ybmcommon>
|
60 |
+
<class>YBM_Common_Model</class>
|
61 |
+
</ybmcommon>
|
62 |
+
</models>
|
63 |
+
</global>
|
64 |
+
</config>
|
app/code/community/YBM/Common/etc/system.xml
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!-- /** * @category YBM * @package YBM_AdvancedPicklist * @copyright Copyright
|
3 |
+
(c) 2013 Stephan Wienczny <stephan.wienczny@ybm-deutschland.de> */ -->
|
4 |
+
<config>
|
5 |
+
<tabs>
|
6 |
+
<ybm
|
7 |
+
translate="label"
|
8 |
+
module="ybmcommon">
|
9 |
+
<label>YBM Extensions</label>
|
10 |
+
<sort_order>300</sort_order>
|
11 |
+
</ybm>
|
12 |
+
</tabs>
|
13 |
+
<sections>
|
14 |
+
<ybmcommon
|
15 |
+
translate="label"
|
16 |
+
module="ybmcommon">
|
17 |
+
<label>Versions</label>
|
18 |
+
<tab>ybm</tab>
|
19 |
+
<frontend_type>text</frontend_type>
|
20 |
+
<sort_order>0</sort_order>
|
21 |
+
<show_in_default>1</show_in_default>
|
22 |
+
<show_in_website>1</show_in_website>
|
23 |
+
<show_in_store>1</show_in_store>
|
24 |
+
<groups>
|
25 |
+
<version translate="label">
|
26 |
+
<label>Version</label>
|
27 |
+
<frontend_type>text</frontend_type>
|
28 |
+
<sort_order>1</sort_order>
|
29 |
+
<show_in_default>1</show_in_default>
|
30 |
+
<show_in_website>1</show_in_website>
|
31 |
+
<show_in_store>1</show_in_store>
|
32 |
+
<fields>
|
33 |
+
<common translate="label comment">
|
34 |
+
<label>YBM_Common</label>
|
35 |
+
<comment></comment>
|
36 |
+
<frontend_type>text</frontend_type>
|
37 |
+
<frontend_model>YBM_Common_Block_Adminhtml_Version</frontend_model>
|
38 |
+
<sort_order>1</sort_order>
|
39 |
+
<show_in_default>1</show_in_default>
|
40 |
+
<show_in_website>1</show_in_website>
|
41 |
+
<show_in_store>1</show_in_store>
|
42 |
+
</common>
|
43 |
+
</fields>
|
44 |
+
</version>
|
45 |
+
</groups>
|
46 |
+
</ybmcommon>
|
47 |
+
</sections>
|
48 |
+
</config>
|
app/etc/modules/YBM_Common.xml
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
* @package YBM_AdvancedPicklist
|
4 |
+
* @copyright Copyright (c) 2009 Stephan Wienczny (stephan.wienczny@ybm-deutschland.de)
|
5 |
+
*/
|
6 |
+
-->
|
7 |
+
<config>
|
8 |
+
<modules>
|
9 |
+
<YBM_Common>
|
10 |
+
<active>true</active>
|
11 |
+
<codePool>community</codePool>
|
12 |
+
</YBM_Common>
|
13 |
+
</modules>
|
14 |
+
</config>
|
app/locale/de_DE/YBM_Common.csv
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
"YBM Extensions","YBM Erweiterungen"
|
2 |
+
"Versions","Versionen"
|
app/locale/en_US/YBM_Common.csv
ADDED
File without changes
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>YBM_Common</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license>--</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>YBM shared module</summary>
|
10 |
+
<description>The extension contains shared code</description>
|
11 |
+
<notes>--</notes>
|
12 |
+
<authors><author><name>Puderbach und Wienczny GbR</name><user>ybmdeutschland</user><email>info@ybm-deutschland.de</email></author></authors>
|
13 |
+
<date>2015-01-21</date>
|
14 |
+
<time>14:29:17</time>
|
15 |
+
<contents><target name="magecommunity"><dir><dir name="YBM"><dir name="Common"><dir><dir name="Block"><dir name="Adminhtml"><file name="Version.php" hash="660c2eebeeaabdfb3756f98c06ee3b49"/></dir></dir><dir name="Helper"><file name="Abstract.php" hash="cec5fa6e4b7e0935ba9abf22e4376550"/><file name="Data.php" hash="83012aa0a33af6cfe0a3348bc0972cd1"/></dir><dir name="Model"><file name="Feed.php" hash="491453c871a560a9595970e0c4c9b1a2"/></dir><dir name="etc"><file name="config.xml" hash="03a33103ff318ea33057cb1ce66a63e0"/><file name="system.xml" hash="b3fce7f1f873f59ac26a033915abca84"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="YBM_Common.xml" hash="0d74806873be02797c6a6b5009e66a4f"/></dir></dir></target><target name="magelocale"><dir><dir name="de_DE"><file name="YBM_Common.csv" hash="896a5a381e91040585281d563d000a76"/></dir><dir name="en_US"><file name="YBM_Common.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
+
</package>
|