Version Notes
Stable release
Download this release
Release Info
| Developer | Développeurs EnvoiMoinsCher.com |
| Extension | orange_recentreviews |
| Version | 0.1.2 |
| Comparing to | |
| See all releases | |
Code changes from version 0.1.1 to 0.1.2
app/code/community/Orange/RecentReviews/Model/Recentreviews.php
CHANGED
|
@@ -1,4 +1,8 @@
|
|
| 1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
class Orange_RecentReviews_Model_RecentReviews extends Mage_Core_Model_Abstract
|
| 3 |
{
|
| 4 |
public function getConfigData($item)
|
|
@@ -29,6 +33,14 @@ class Orange_RecentReviews_Model_RecentReviews extends Mage_Core_Model_Abstract
|
|
| 29 |
{
|
| 30 |
return Mage::getUrl('review/product/view', array('id'=> $id));
|
| 31 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
public function data()
|
| 33 |
{
|
| 34 |
if($this->getConfigData('count') < 1)
|
| 1 |
<?php
|
| 2 |
+
/*
|
| 3 |
+
author: SB
|
| 4 |
+
support: mage.ext@gmail.com
|
| 5 |
+
*/
|
| 6 |
class Orange_RecentReviews_Model_RecentReviews extends Mage_Core_Model_Abstract
|
| 7 |
{
|
| 8 |
public function getConfigData($item)
|
| 33 |
{
|
| 34 |
return Mage::getUrl('review/product/view', array('id'=> $id));
|
| 35 |
}
|
| 36 |
+
public function showDate()
|
| 37 |
+
{
|
| 38 |
+
return $this->getConfigData('show_date');
|
| 39 |
+
}
|
| 40 |
+
public function showAuthor()
|
| 41 |
+
{
|
| 42 |
+
return $this->getConfigData('show_author');
|
| 43 |
+
}
|
| 44 |
public function data()
|
| 45 |
{
|
| 46 |
if($this->getConfigData('count') < 1)
|
app/code/community/Orange/RecentReviews/etc/config.xml
CHANGED
|
@@ -2,15 +2,15 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Orange_RecentReviews>
|
| 5 |
-
<version>0.1.
|
| 6 |
</Orange_RecentReviews>
|
| 7 |
</modules>
|
| 8 |
<frontend>
|
| 9 |
<layout>
|
| 10 |
<updates>
|
| 11 |
-
<
|
| 12 |
<file>orange_recent_reviews.xml</file>
|
| 13 |
-
</
|
| 14 |
</updates>
|
| 15 |
</layout>
|
| 16 |
</frontend>
|
|
@@ -49,6 +49,8 @@
|
|
| 49 |
<show_ratings>1</show_ratings>
|
| 50 |
<limit_characters>0</limit_characters>
|
| 51 |
<count>3</count>
|
|
|
|
|
|
|
| 52 |
</settings>
|
| 53 |
</orange_recentreviews>
|
| 54 |
</default>
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Orange_RecentReviews>
|
| 5 |
+
<version>0.1.2</version>
|
| 6 |
</Orange_RecentReviews>
|
| 7 |
</modules>
|
| 8 |
<frontend>
|
| 9 |
<layout>
|
| 10 |
<updates>
|
| 11 |
+
<orange_recentreviews>
|
| 12 |
<file>orange_recent_reviews.xml</file>
|
| 13 |
+
</orange_recentreviews>
|
| 14 |
</updates>
|
| 15 |
</layout>
|
| 16 |
</frontend>
|
| 49 |
<show_ratings>1</show_ratings>
|
| 50 |
<limit_characters>0</limit_characters>
|
| 51 |
<count>3</count>
|
| 52 |
+
<show_date>1</show_date>
|
| 53 |
+
<show_author>1</show_author>
|
| 54 |
</settings>
|
| 55 |
</orange_recentreviews>
|
| 56 |
</default>
|
app/code/community/Orange/RecentReviews/etc/system.xml
CHANGED
|
@@ -83,6 +83,24 @@
|
|
| 83 |
<show_in_website>1</show_in_website>
|
| 84 |
<show_in_store>1</show_in_store>
|
| 85 |
</count>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
</fields>
|
| 87 |
</settings>
|
| 88 |
</groups>
|
| 83 |
<show_in_website>1</show_in_website>
|
| 84 |
<show_in_store>1</show_in_store>
|
| 85 |
</count>
|
| 86 |
+
<show_date translate="label">
|
| 87 |
+
<label>Show date</label>
|
| 88 |
+
<frontend_type>select</frontend_type>
|
| 89 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 90 |
+
<sort_order>7</sort_order>
|
| 91 |
+
<show_in_default>1</show_in_default>
|
| 92 |
+
<show_in_website>1</show_in_website>
|
| 93 |
+
<show_in_store>1</show_in_store>
|
| 94 |
+
</show_date>
|
| 95 |
+
<show_author translate="label">
|
| 96 |
+
<label>Show author</label>
|
| 97 |
+
<frontend_type>select</frontend_type>
|
| 98 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 99 |
+
<sort_order>8</sort_order>
|
| 100 |
+
<show_in_default>1</show_in_default>
|
| 101 |
+
<show_in_website>1</show_in_website>
|
| 102 |
+
<show_in_store>1</show_in_store>
|
| 103 |
+
</show_author>
|
| 104 |
</fields>
|
| 105 |
</settings>
|
| 106 |
</groups>
|
app/design/frontend/base/default/template/orange/recentreviews/reviews.phtml
CHANGED
|
@@ -13,7 +13,12 @@
|
|
| 13 |
<ul>
|
| 14 |
<?php foreach($_reviews->data() as $_review): ?>
|
| 15 |
<li class="item">
|
| 16 |
-
<p
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
<?php if($_reviews->showRatings()): ?>
|
| 18 |
<?php $_votes = $_review->getRatingVotes() ?>
|
| 19 |
<?php if(count($_votes)): ?>
|
|
@@ -41,7 +46,9 @@
|
|
| 41 |
<?php else: ?>
|
| 42 |
<p><?php echo $review ?></p>
|
| 43 |
<?php endif ?>
|
|
|
|
| 44 |
<small class="date"><?php echo $this->__('(Posted on %s)', $this->formatDate($_review->getCreatedAt()), 'long') ?></small>
|
|
|
|
| 45 |
</li>
|
| 46 |
<?php endforeach ?>
|
| 47 |
</ul>
|
| 13 |
<ul>
|
| 14 |
<?php foreach($_reviews->data() as $_review): ?>
|
| 15 |
<li class="item">
|
| 16 |
+
<p>
|
| 17 |
+
<a href="<?php echo $_reviews->getReviewUrl($_review->getId()) ?>"><?php echo $this->htmlEscape($_review->getTitle()) ?></a>
|
| 18 |
+
<?php if($_reviews->showAuthor()): ?>
|
| 19 |
+
- <?php echo $this->__('by <strong>%s</strong>', $this->htmlEscape($_review->getNickname())) ?>
|
| 20 |
+
<?php endif ?>
|
| 21 |
+
</p>
|
| 22 |
<?php if($_reviews->showRatings()): ?>
|
| 23 |
<?php $_votes = $_review->getRatingVotes() ?>
|
| 24 |
<?php if(count($_votes)): ?>
|
| 46 |
<?php else: ?>
|
| 47 |
<p><?php echo $review ?></p>
|
| 48 |
<?php endif ?>
|
| 49 |
+
<?php if($_reviews->showDate()): ?>
|
| 50 |
<small class="date"><?php echo $this->__('(Posted on %s)', $this->formatDate($_review->getCreatedAt()), 'long') ?></small>
|
| 51 |
+
<?php endif ?>
|
| 52 |
</li>
|
| 53 |
<?php endforeach ?>
|
| 54 |
</ul>
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>orange_recentreviews</name>
|
| 4 |
-
<version>0.1.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>Open Software License</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -10,9 +10,9 @@
|
|
| 10 |
<description>Display latest reviews</description>
|
| 11 |
<notes>Stable release</notes>
|
| 12 |
<authors><author><name>Mage</name><user>Dev</user><email>mage.ext@gmail.com</email></author></authors>
|
| 13 |
-
<date>2013-01-
|
| 14 |
-
<time>
|
| 15 |
-
<contents><target name="magecommunity"><dir name="Orange"><dir name="RecentReviews"><dir name="Model"><file name="Recentreviews.php" hash="
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 18 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>orange_recentreviews</name>
|
| 4 |
+
<version>0.1.2</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>Open Software License</license>
|
| 7 |
<channel>community</channel>
|
| 10 |
<description>Display latest reviews</description>
|
| 11 |
<notes>Stable release</notes>
|
| 12 |
<authors><author><name>Mage</name><user>Dev</user><email>mage.ext@gmail.com</email></author></authors>
|
| 13 |
+
<date>2013-01-15</date>
|
| 14 |
+
<time>18:51:08</time>
|
| 15 |
+
<contents><target name="magecommunity"><dir name="Orange"><dir name="RecentReviews"><dir name="Model"><file name="Recentreviews.php" hash="cc99666e8ae4f01ba92fd6c5aace2a30"/></dir><dir name="etc"><file name="config.xml" hash="34e1d709d7f465435099c21dba61bd75"/><file name="system.xml" hash="763370f8f4292e3447fcf734c0e737f9"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="orange"><dir name="recentreviews"><file name="reviews.phtml" hash="5a8cea217436ff89d39d5044bb98de25"/></dir></dir></dir><dir name="layout"><file name="orange_recent_reviews.xml" hash="6937b3d46a4bf1c2ff75139bfafd22ee"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Orange_RecentReviews.xml" hash="465284a2cfe768c59f90c44b4b56e793"/></dir></target></contents>
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 18 |
</package>
|
