simon1066:
Bit of a guess but it looks as though it is the zen_date_short function that outputs the date of a review. In includes /functions/functions_general.php look for
function zen_date_short($raw_date) {
> you could create a copy of that function, edit it to output just the month and year, and use that copy in your templates/tpl_product_review_info_default.php
Thank you very much for your suggestion.
Ok, I did the following but not sure if I got it right as now, No date is showing.
I copied and adjusted the short date code and added it Below the original short date code in the /functions/functions_general.php:
////
// Output a REVIEWS short raw date string in the selected locale date format
// $raw_date needs to be in this format: YYYY-MM-DD HH:MM:SS
function zen_[B]reviews_[/B]date_short($raw_date) {
if ($raw_date <= '0001-01-01 00:00:00' || empty($raw_date)) return false;
$year = substr($raw_date, 0, 4);
$month = (int)substr($raw_date, 5, 2);
// $day = (int)substr($raw_date, 8, 2); <---- Commented this line out ---->
$hour = (int)substr($raw_date, 11, 2);
$minute = (int)substr($raw_date, 14, 2);
$second = (int)substr($raw_date, 17, 2);
}
Then I went to MYTEMPLATE/templates/ and adjusted the following three files by changing the code zen_date_short to zen**_reviews**_date_short:
tpl_product_review_info_default.php
tpl_product_reviews_default.php
tpl_reviews_default.php
<div id="reviewsInfoDefaultDate"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, zen[B]_reviews[/B]_date_short($review_info->fields['date_added'])); ?> <?php echo sprintf(TEXT_REVIEW_BY, zen_output_string_protected($review_info->fields['customers_name'])); ?></div>
```
```
<div class="productReviewsDefaultReviewer"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, zen[B]_reviews[/B]_date_short($reviews['dateAdded'])); ?> <?php echo sprintf(TEXT_REVIEW_BY, zen_output_string_protected($reviews['customersName'])); ?></div>
```
```
<div><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, zen[B]_reviews[/B]_date_short($reviews->fields['date_added'])); ?> <?php echo sprintf(TEXT_REVIEW_BY, zen_output_string_protected($reviews->fields['customers_name'])); ?></div>
```