problem with date of article
1 post
• Page 1 of 1
problem with date of article
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; ?>">
<?php
--->$today_date = date("d F Y");
--->$date_article = date("d F Y", strtotime($item->created));
--->$t=strtotime($date_article);
--->$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 />";
--->}
?>
</div>
<?php
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.
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; ?>">
<?php
--->$today_date = date("d F Y");
--->$date_article = date("d F Y", strtotime($item->created));
--->$t=strtotime($date_article);
--->$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 />";
--->}
?>
</div>
<?php
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.
- kvillios
- Fresh Boarder

- Posts: 1
- Joined: Mon Feb 16, 2009 8:26 am
1 post
• Page 1 of 1
Who is online
Users browsing this forum: Google [Bot] and 2 guests