Version Notes
Changed the way to set the cache key, to support magento versions > 1.4
Download this release
Release Info
Developer | Flagbit GmbH |
Extension | Flagbit_FeedReader |
Version | 1.1.2 |
Comparing to | |
See all releases |
Code changes from version 1.1.1 to 1.1.2
- app/code/community/Flagbit/FeedReader/Block/Abstract.php +14 -16
- app/code/community/Flagbit/FeedReader/Block/Sidebar.php +1 -1
- app/code/community/Flagbit/FeedReader/Helper/Data.php +1 -1
- app/code/community/Flagbit/FeedReader/etc/config.xml +1 -1
- app/design/frontend/base/default/layout/feedreader.xml +1 -1
- app/design/frontend/base/default/template/feedreader/sidebar.phtml +7 -6
- app/locale/de_AT/Flagbit_FeedReader.csv +1 -1
- app/locale/de_CH/Flagbit_FeedReader.csv +1 -1
- app/locale/de_DE/Flagbit_FeedReader.csv +1 -1
- package.xml +7 -7
app/code/community/Flagbit/FeedReader/Block/Abstract.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @category Flagbit
|
6 |
* @package Flagbit_FeedReader
|
7 |
-
* @copyright Copyright (c)
|
8 |
*/
|
9 |
|
10 |
/**
|
@@ -13,6 +13,7 @@
|
|
13 |
* @category Flagbit
|
14 |
* @package Flagbit_FeedReader
|
15 |
* @author David Fuhr <fuhr@flagbit.de>
|
|
|
16 |
*/
|
17 |
abstract class Flagbit_FeedReader_Block_Abstract extends Mage_Core_Block_Template
|
18 |
{
|
@@ -57,8 +58,6 @@ abstract class Flagbit_FeedReader_Block_Abstract extends Mage_Core_Block_Templat
|
|
57 |
try {
|
58 |
$feed = Zend_Feed::import($uri);
|
59 |
$this->setData('feed', $feed);
|
60 |
-
// update the cache tag
|
61 |
-
$this->setCacheKey($uri);
|
62 |
}
|
63 |
catch (Zend_Http_Client_Exception $e) {
|
64 |
Mage::logException($e);
|
@@ -72,22 +71,21 @@ abstract class Flagbit_FeedReader_Block_Abstract extends Mage_Core_Block_Templat
|
|
72 |
}
|
73 |
|
74 |
/**
|
75 |
-
*
|
76 |
*
|
77 |
-
*
|
78 |
-
*
|
79 |
-
* @param string $cacheKey
|
80 |
-
* @return Flagbit_FeedReader_Block_Abstract
|
81 |
*/
|
82 |
-
|
83 |
{
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
|
|
|
|
91 |
}
|
92 |
|
93 |
/**
|
4 |
*
|
5 |
* @category Flagbit
|
6 |
* @package Flagbit_FeedReader
|
7 |
+
* @copyright Copyright (c) 2012 Flagbit GmbH & Co. KG (http://www.flagbit.de)
|
8 |
*/
|
9 |
|
10 |
/**
|
13 |
* @category Flagbit
|
14 |
* @package Flagbit_FeedReader
|
15 |
* @author David Fuhr <fuhr@flagbit.de>
|
16 |
+
* @author Nicolai Essig <essig@flagbit.de>
|
17 |
*/
|
18 |
abstract class Flagbit_FeedReader_Block_Abstract extends Mage_Core_Block_Template
|
19 |
{
|
58 |
try {
|
59 |
$feed = Zend_Feed::import($uri);
|
60 |
$this->setData('feed', $feed);
|
|
|
|
|
61 |
}
|
62 |
catch (Zend_Http_Client_Exception $e) {
|
63 |
Mage::logException($e);
|
71 |
}
|
72 |
|
73 |
/**
|
74 |
+
* Extends cache key with feed url, layout, template and locale
|
75 |
*
|
76 |
+
* @return array
|
|
|
|
|
|
|
77 |
*/
|
78 |
+
public function getCacheKeyInfo()
|
79 |
{
|
80 |
+
return array_merge(
|
81 |
+
parent::getCacheKeyInfo(),
|
82 |
+
array(
|
83 |
+
$this->getData('uri'),
|
84 |
+
Mage::getDesign()->getTheme('layout'),
|
85 |
+
Mage::getDesign()->getTheme('template'),
|
86 |
+
Mage::getDesign()->getTheme('locale')
|
87 |
+
)
|
88 |
+
);
|
89 |
}
|
90 |
|
91 |
/**
|
app/code/community/Flagbit/FeedReader/Block/Sidebar.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @category Flagbit
|
6 |
* @package Flagbit_FeedReader
|
7 |
-
* @copyright Copyright (c)
|
8 |
*/
|
9 |
|
10 |
/**
|
4 |
*
|
5 |
* @category Flagbit
|
6 |
* @package Flagbit_FeedReader
|
7 |
+
* @copyright Copyright (c) 2012 Flagbit GmbH & Co. KG (http://www.flagbit.de)
|
8 |
*/
|
9 |
|
10 |
/**
|
app/code/community/Flagbit/FeedReader/Helper/Data.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @category Flagbit
|
6 |
* @package Flagbit_FeedReader
|
7 |
-
* @copyright Copyright (c)
|
8 |
*/
|
9 |
|
10 |
/**
|
4 |
*
|
5 |
* @category Flagbit
|
6 |
* @package Flagbit_FeedReader
|
7 |
+
* @copyright Copyright (c) 2012 Flagbit GmbH & Co. KG (http://www.flagbit.de)
|
8 |
*/
|
9 |
|
10 |
/**
|
app/code/community/Flagbit/FeedReader/etc/config.xml
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
<Flagbit_FeedReader>
|
5 |
<active>true</active>
|
6 |
<codePool>community</codePool>
|
7 |
-
<version>1.1.
|
8 |
</Flagbit_FeedReader>
|
9 |
</modules>
|
10 |
|
4 |
<Flagbit_FeedReader>
|
5 |
<active>true</active>
|
6 |
<codePool>community</codePool>
|
7 |
+
<version>1.1.2</version>
|
8 |
</Flagbit_FeedReader>
|
9 |
</modules>
|
10 |
|
app/design/frontend/base/default/layout/feedreader.xml
CHANGED
@@ -11,4 +11,4 @@
|
|
11 |
</block>
|
12 |
</reference>
|
13 |
</default>
|
14 |
-
</layout>
|
11 |
</block>
|
12 |
</reference>
|
13 |
</default>
|
14 |
+
</layout>
|
app/design/frontend/base/default/template/feedreader/sidebar.phtml
CHANGED
@@ -4,14 +4,15 @@
|
|
4 |
*
|
5 |
* @category design_default
|
6 |
* @package Flagbit_FeedReader
|
7 |
-
* @copyright Copyright (c) 2010 Flagbit GmbH & Co. KG (http://www.flagbit.de)
|
8 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
9 |
*/
|
|
|
10 |
?>
|
11 |
<?php if($this->getItemCount() > 0): ?>
|
12 |
<div class="block block-feed-reader">
|
13 |
<div class="block-title">
|
14 |
-
<strong><?php echo $this->
|
15 |
</div>
|
16 |
<div class="block-content">
|
17 |
<ol id="feed-items">
|
@@ -20,16 +21,16 @@
|
|
20 |
foreach($this->getItems() as $item): ?>
|
21 |
<li class="block-feed-item <?php echo (++$itemCount % 2 == 0 ? 'even' : 'odd'); ?><?php if($itemCount == 1): ?> first<?php endif;?><?php if($itemCount >= $this->getItemCount()): ?> last<?php endif; ?>">
|
22 |
<h5>
|
23 |
-
<a href="<?php echo $this->
|
24 |
-
<?php echo $this->
|
25 |
</a>
|
26 |
</h5>
|
27 |
<p class="date">
|
28 |
<?php echo Mage::getModel('core/date')->date('d.m.Y H:m', strtotime($item->pubDate())); ?>
|
29 |
</p>
|
30 |
<p class="summary">
|
31 |
-
<a href="<?php echo $this->
|
32 |
-
<?php echo $this->
|
33 |
</a>
|
34 |
</p>
|
35 |
</li>
|
4 |
*
|
5 |
* @category design_default
|
6 |
* @package Flagbit_FeedReader
|
7 |
+
* @copyright Copyright (c) 2010-2012 Flagbit GmbH & Co. KG (http://www.flagbit.de)
|
8 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
9 |
*/
|
10 |
+
/* @var $this Flagbit_FeedReader_Block_Abstract */
|
11 |
?>
|
12 |
<?php if($this->getItemCount() > 0): ?>
|
13 |
<div class="block block-feed-reader">
|
14 |
<div class="block-title">
|
15 |
+
<strong><?php echo $this->escapeHtml($this->getTitle()); ?></strong>
|
16 |
</div>
|
17 |
<div class="block-content">
|
18 |
<ol id="feed-items">
|
21 |
foreach($this->getItems() as $item): ?>
|
22 |
<li class="block-feed-item <?php echo (++$itemCount % 2 == 0 ? 'even' : 'odd'); ?><?php if($itemCount == 1): ?> first<?php endif;?><?php if($itemCount >= $this->getItemCount()): ?> last<?php endif; ?>">
|
23 |
<h5>
|
24 |
+
<a href="<?php echo $this->escapeHtml($item->link()); ?>">
|
25 |
+
<?php echo $this->escapeHtml($item->title()); ?>
|
26 |
</a>
|
27 |
</h5>
|
28 |
<p class="date">
|
29 |
<?php echo Mage::getModel('core/date')->date('d.m.Y H:m', strtotime($item->pubDate())); ?>
|
30 |
</p>
|
31 |
<p class="summary">
|
32 |
+
<a href="<?php echo $this->escapeHtml($item->link()); ?>">
|
33 |
+
<?php echo $this->escapeHtml(Mage::helper('core/string')->truncate($item->description(), 80, '...', $remainder, false)); ?>
|
34 |
</a>
|
35 |
</p>
|
36 |
</li>
|
app/locale/de_AT/Flagbit_FeedReader.csv
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
"Adds a FeedReader block","
|
2 |
"Feed URI","Feed URI"
|
3 |
"FeedReader: Sidebar","FeedReader: Seitenleiste"
|
4 |
"If empty, the feed's title will be used","Falls leer, wird der Titel des Feeds verwendet"
|
1 |
+
"Adds a FeedReader block","Fügt einen FeedReader Block hinzu"
|
2 |
"Feed URI","Feed URI"
|
3 |
"FeedReader: Sidebar","FeedReader: Seitenleiste"
|
4 |
"If empty, the feed's title will be used","Falls leer, wird der Titel des Feeds verwendet"
|
app/locale/de_CH/Flagbit_FeedReader.csv
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
"Adds a FeedReader block","
|
2 |
"Feed URI","Feed URI"
|
3 |
"FeedReader: Sidebar","FeedReader: Seitenleiste"
|
4 |
"If empty, the feed's title will be used","Falls leer, wird der Titel des Feeds verwendet"
|
1 |
+
"Adds a FeedReader block","Fügt einen FeedReader Block hinzu"
|
2 |
"Feed URI","Feed URI"
|
3 |
"FeedReader: Sidebar","FeedReader: Seitenleiste"
|
4 |
"If empty, the feed's title will be used","Falls leer, wird der Titel des Feeds verwendet"
|
app/locale/de_DE/Flagbit_FeedReader.csv
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
"Adds a FeedReader block","
|
2 |
"Feed URI","Feed URI"
|
3 |
"FeedReader: Sidebar","FeedReader: Seitenleiste"
|
4 |
"If empty, the feed's title will be used","Falls leer, wird der Titel des Feeds verwendet"
|
1 |
+
"Adds a FeedReader block","Fügt einen FeedReader Block hinzu"
|
2 |
"Feed URI","Feed URI"
|
3 |
"FeedReader: Sidebar","FeedReader: Seitenleiste"
|
4 |
"If empty, the feed's title will be used","Falls leer, wird der Titel des Feeds verwendet"
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Flagbit_FeedReader</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL 3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>A simple feed reader supporting RSS and Atom feeds. Highly customizable and easy to integrate.</summary>
|
10 |
<description>A simple feed reader supporting RSS and Atom feeds. Highly customizable and easy to integrate. Configuration is done in the default/layout/feedreader.xml. Simply reference the block where you want to create the feed. Feed URI and item count and template can be freely configured.</description>
|
11 |
-
<notes
|
12 |
-
<authors><author><name>Flagbit GmbH </name><user>
|
13 |
-
<date>
|
14 |
-
<time>
|
15 |
-
<contents><target name="
|
16 |
<compatible/>
|
17 |
-
<dependencies
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Flagbit_FeedReader</name>
|
4 |
+
<version>1.1.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL 3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>A simple feed reader supporting RSS and Atom feeds. Highly customizable and easy to integrate.</summary>
|
10 |
<description>A simple feed reader supporting RSS and Atom feeds. Highly customizable and easy to integrate. Configuration is done in the default/layout/feedreader.xml. Simply reference the block where you want to create the feed. Feed URI and item count and template can be freely configured.</description>
|
11 |
+
<notes>Changed the way to set the cache key, to support magento versions > 1.4</notes>
|
12 |
+
<authors><author><name>Flagbit GmbH </name><user>flagbit</user><email>magento@flagbit.de</email></author></authors>
|
13 |
+
<date>2012-06-29</date>
|
14 |
+
<time>12:40:54</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Flagbit"><dir name="FeedReader"><dir><dir name="Block"><file name="Abstract.php" hash="de6b56b18c9c5c1eabb648083386eba9"/><file name="Sidebar.php" hash="c2bdc93a7dbc5c591b7e519eb96d6a50"/></dir><dir name="Helper"><file name="Data.php" hash="ec84fb4bf94b2a0913a347998e713885"/></dir><dir name="etc"><file name="config.xml" hash="8d19ea001d3bc3febe997ecdc7c6fc1b"/><file name="widget.xml" hash="8adfb0e384380eefbf79d694c9749a2e"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="feedreader.xml" hash="ec337707026367f117920a9cb10fe448"/></dir><dir name="template"><dir name="feedreader"><file name="sidebar.phtml" hash="50af70611707d1bebbe8bd9e7d96c87c"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Flagbit_FeedReader.xml" hash="302036c0fe8cc40a093ff3c8bd62b399"/></dir></target><target name="magelocale"><dir name="de_AT"><file name="Flagbit_FeedReader.csv" hash="37a3f37019e30d54724f228a405db0f7"/></dir><dir name="de_CH"><file name="Flagbit_FeedReader.csv" hash="37a3f37019e30d54724f228a405db0f7"/></dir><dir name="de_DE"><file name="Flagbit_FeedReader.csv" hash="37a3f37019e30d54724f228a405db0f7"/></dir><dir name="en_GB"><file name="Flagbit_FeedReader.csv" hash="b1e56c6f00f159f78858e9db40e80b4d"/></dir><dir name="en_US"><file name="Flagbit_FeedReader.csv" hash="b1e56c6f00f159f78858e9db40e80b4d"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="feedreader.css" hash="eb016f3f670214e6472230290c598372"/></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>
|