MSP_Common - Version 1.0.0

Version Notes

Enjoy it ;)

Download this release

Release Info

Developer Riccardo Tempesta
Extension MSP_Common
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/community/MSP/Common/Block/Adminhtml/System/Config/Fieldset/Hint/Credits.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * IDEALIAGroup srl
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to info@idealiagroup.com so we can send you a copy immediately.
14
+ *
15
+ * @category MSP
16
+ * @package MSP_Common
17
+ * @copyright Copyright (c) 2013 IDEALIAGroup srl (http://www.idealiagroup.com)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+
21
+ class MSP_Common_Block_Adminhtml_System_Config_Fieldset_Hint_Credits extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
22
+ {
23
+ protected $_template = 'msp_common/system/config/fieldset/hint/credits.phtml';
24
+
25
+ public function render(Varien_Data_Form_Element_Abstract $element)
26
+ {
27
+ return $this->toHtml();
28
+ }
29
+ }
app/code/community/MSP/Common/Helper/Data.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * IDEALIAGroup srl
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to info@idealiagroup.com so we can send you a copy immediately.
14
+ *
15
+ * @category MSP
16
+ * @package MSP_Common
17
+ * @copyright Copyright (c) 2013 IDEALIAGroup srl (http://www.idealiagroup.com)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+
21
+ class MSP_Common_Helper_Data extends Mage_Core_Helper_Abstract
22
+ {
23
+
24
+ }
app/code/community/MSP/Common/Model/Feed.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * IDEALIAGroup srl
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to info@idealiagroup.com so we can send you a copy immediately.
14
+ *
15
+ * @category MSP
16
+ * @package MSP_Common
17
+ * @copyright Copyright (c) 2013 IDEALIAGroup srl (http://www.idealiagroup.com)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+
21
+ class MSP_Common_Model_Feed extends Mage_AdminNotification_Model_Feed
22
+ {
23
+ const XML_PATH_MSP_RSS_URL = 'msp_common/rss/url';
24
+
25
+ /**
26
+ * (non-PHPdoc)
27
+ * @see Mage_AdminNotification_Model_Feed::getFeedUrl()
28
+ */
29
+ public function getFeedUrl()
30
+ {
31
+ if (is_null($this->_feedUrl))
32
+ {
33
+ $this->_feedUrl = Mage::getStoreConfigFlag(self::XML_USE_HTTPS_PATH) ? 'https://' : 'http://';
34
+ $this->_feedUrl.= Mage::getStoreConfig(self::XML_PATH_MSP_RSS_URL);
35
+ }
36
+
37
+ return $this->_feedUrl;
38
+ }
39
+
40
+ public function checkUpdate()
41
+ {
42
+ if (($this->getFrequency() + $this->getLastUpdate()) > time()) {
43
+ return $this;
44
+ }
45
+
46
+ $feedData = array();
47
+
48
+ $feedXml = $this->getFeedData();
49
+
50
+ if ($feedXml && $feedXml->channel && $feedXml->channel->item)
51
+ {
52
+ foreach ($feedXml->channel->item as $item)
53
+ {
54
+ $feedData[] = array(
55
+ 'severity' => (int)$item->custom_fields->severity,
56
+ 'date_added' => $this->getDate((string)$item->pubDate),
57
+ 'title' => 'MageSpecialist - '.((string)$item->title),
58
+ 'description' => (string)$item->description,
59
+ 'url' => (string)$item->link,
60
+ );
61
+ }
62
+
63
+ if ($feedData) {
64
+ Mage::getModel('adminnotification/inbox')->parse(array_reverse($feedData));
65
+ }
66
+
67
+ }
68
+ $this->setLastUpdate();
69
+
70
+ return $this;
71
+ }
72
+ }
app/code/community/MSP/Common/Model/Observer.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * IDEALIAGroup srl
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to info@idealiagroup.com so we can send you a copy immediately.
14
+ *
15
+ * @category MSP
16
+ * @package MSP_Common
17
+ * @copyright Copyright (c) 2013 IDEALIAGroup srl (http://www.idealiagroup.com)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+
21
+ class MSP_Common_Model_Observer
22
+ {
23
+ public function onControllerActionPredispatch()
24
+ {
25
+ $model = Mage::getModel('msp_common/feed');
26
+ $model->checkUpdate();
27
+ }
28
+ }
app/code/community/MSP/Common/etc/config.xml ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * IDEALIAGroup srl
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to info@idealiagroup.com so we can send you a copy immediately.
15
+ *
16
+ * @category MSP
17
+ * @package MSP_Common
18
+ * @copyright Copyright (c) 2013 IDEALIAGroup srl (http://www.idealiagroup.com)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+ -->
22
+ <config>
23
+ <modules>
24
+ <MSP_Common>
25
+ <version>1.0.0</version>
26
+ </MSP_Common>
27
+ </modules>
28
+
29
+ <global>
30
+ <blocks>
31
+ <msp_common>
32
+ <class>MSP_Common_Block</class>
33
+ </msp_common>
34
+ </blocks>
35
+
36
+ <helpers>
37
+ <msp_common>
38
+ <class>MSP_Common_Helper</class>
39
+ </msp_common>
40
+ </helpers>
41
+
42
+ <models>
43
+ <msp_common>
44
+ <class>MSP_Common_Model</class>
45
+ </msp_common>
46
+ </models>
47
+ </global>
48
+
49
+ <adminhtml>
50
+ <events>
51
+ <controller_action_predispatch>
52
+ <observers>
53
+ <msp_common>
54
+ <type>singleton</type>
55
+ <class>msp_common/observer</class>
56
+ <method>onControllerActionPredispatch</method>
57
+ </msp_common>
58
+ </observers>
59
+ </controller_action_predispatch>
60
+ </events>
61
+
62
+ <layout>
63
+ <updates>
64
+ <msp_common>
65
+ <file>msp_common.xml</file>
66
+ </msp_common>
67
+ </updates>
68
+ </layout>
69
+ </adminhtml>
70
+
71
+ <default>
72
+ <msp_common>
73
+ <rss>
74
+ <url>blog.magespecialist.it/category/annunci-estensioni/feed/</url>
75
+ </rss>
76
+ </msp_common>
77
+ </default>
78
+ </config>
app/design/adminhtml/default/default/layout/msp_common.xml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * IDEALIAGroup srl
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to info@idealiagroup.com so we can send you a copy immediately.
15
+ *
16
+ * @category MSP
17
+ * @package MSP_Common
18
+ * @copyright Copyright (c) 2013 IDEALIAGroup srl (http://www.idealiagroup.com)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+ -->
22
+ <layout version="0.1.0">
23
+ <default>
24
+ <reference name="head">
25
+ <action method="addItem"><type>skin_css</type><name>msp_common/common.css</name></action>
26
+ </reference>
27
+ </default>
28
+ </layout>
app/design/adminhtml/default/default/template/msp_common/system/config/fieldset/hint/credits.phtml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * IDEALIAGroup srl
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to info@idealiagroup.com so we can send you a copy immediately.
14
+ *
15
+ * @category MSP
16
+ * @package MSP_Common
17
+ * @copyright Copyright (c) 2013 IDEALIAGroup srl (http://www.idealiagroup.com)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+ ?>
21
+ <div class="msp-common-credits">
22
+ <?php echo $this->__('By MageSpecialist - <a target="_blank" href="http://www.magespecialist.it">www.magespecialist.it</a>') ?>
23
+ </div>
app/etc/modules/MSP_Common.xml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * IDEALIAGroup srl
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to info@idealiagroup.com so we can send you a copy immediately.
15
+ *
16
+ * @category MSP
17
+ * @package MSP_Common
18
+ * @copyright Copyright (c) 2013 IDEALIAGroup srl (http://www.idealiagroup.com)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+ -->
22
+ <config>
23
+ <modules>
24
+ <MSP_Common>
25
+ <active>true</active>
26
+ <codePool>community</codePool>
27
+ </MSP_Common>
28
+ </modules>
29
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>MSP_Common</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license>OSL</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>MageSpecialist Common</summary>
10
+ <description>MageSpecialist Common</description>
11
+ <notes>Enjoy it ;)</notes>
12
+ <authors><author><name>Riccardo Tempesta</name><user>idealiagroup</user><email>tempesta@idealiagroup.com</email></author><author><name>Paolo Vecchiocattivi</name><user>idealiagroup</user><email>vecchiocattivi@idealiagroup.com</email></author></authors>
13
+ <date>2013-05-28</date>
14
+ <time>14:08:11</time>
15
+ <contents><target name="magecommunity"><dir name="MSP"><dir name="Common"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><dir name="Hint"><file name="Credits.php" hash="3aa25d99826275914c0bb972b22896e8"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="004877c2e42303fa8a500ae619afcd1c"/></dir><dir name="Model"><file name="Feed.php" hash="8a871add9b17fb15be9becb599bec57a"/><file name="Observer.php" hash="7471ec46bf3b42f8d9fb37bbd6dfeffe"/></dir><dir name="etc"><file name="config.xml" hash="81439370ed19e6a471d9bf9dcb96625d"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="MSP_Common.xml" hash="9fa6d856b26f5ee821e985e059a73759"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="msp_common.xml" hash="7b8fce867ae0870a682e127b53fa3181"/></dir><dir name="template"><dir name="msp_common"><dir name="system"><dir name="config"><dir name="fieldset"><dir name="hint"><file name="credits.phtml" hash="e217f0ca6cf05e2e64ef51aae12e3096"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="msp_common"><file name="common.css" hash="f07d7d26fdbfc6418152aaaa29bf95bb"/></dir></dir></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>
skin/adminhtml/default/default/msp_common/common.css ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * IDEALIAGroup srl
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@idealiagroup.com so we can send you a copy immediately.
13
+ *
14
+ * @category MSP
15
+ * @package MSP_Common
16
+ * @copyright Copyright (c) 2013 IDEALIAGroup srl (http://www.idealiagroup.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ .msp-common-credits {
21
+ text-align: right;
22
+ margin-bottom: 10px;
23
+ }