Miércoles, 28 Enero 2015 04:20

problem with date of article

Filters news by the current section and category

problem with date of article

Postby kvillios » Mon Feb 16, 2009 9:01 am

Hi to all!

I use your module and it's very good but I have one problem.

I want to have extra possibility with date of article. If the date of today is <= with date of article (created date) plus 5 days or something else then appearance one image (image "New" right of title of article).

I have write some code but the point with date of article doesn't work, please help me...

<?php // no direct access
defined('_JEXEC') or die('Restricted access');

foreach ($list as $item) : ?>

<div class="fn_static_<?php echo $filterednews_id; ?>">


--->$today_date = date("d F Y");
--->$date_article = date("d F Y", strtotime($item->created));
--->$numOfDays = 5;
--->$offSet = 86400 * $numOfDays;
--->$t += $offSet;
--->$dateplus = date("d F Y",$t);

echo $item->content;

--->if($today_date <= $dateplus)
---> echo "<IMG SRC=/images/general/new.jpg />";


endforeach; ?>

This code is from static.php and I use the static part of this module. With "--->" you can read my trying to fix the extra posibility of this module.

The problem is in the point, it look doesn't work

--->$date_article = date("d F Y", strtotime($item->created));

Sorry for my english! Please help me.
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: Mon Feb 16, 2009 8:26 am

Return to Filtered News

Who is online

Users browsing this forum: No registered users and 1 guest