 |
 |
 |
 |
 |
| Author |
Message |
Yoshiii
Joined: 29 Feb 2008 Posts: 58
|
|
Show only today's news |
|
Hmmm. I want to show only the news that has been posted on this day. When it is the next day and there is no news then i want to show a specified post / category. Is this possible?
|
|
| Tue Jul 08, 2008 10:59 am |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1843 Location: US |
|
|
|
Hm that seems so simple you have to be able to do that.
Let me see what I can find out about that.
I think this is a good start, but I don't think it truncates after day 1:
 |  | $year = date('Y');
$month = date('n');
$day = date('d') - 1;
$sort = array('comments', 'DESC'); |
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Tue Jul 08, 2008 6:22 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2736 Location: Germany |
|
|
|
I'm not sure about the "-1". Try this too:
 |  | $year = date('Y');
$month = date('n');
$day = date('d'); |
|
|
| Thu Jul 10, 2008 6:41 pm |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1843 Location: US |
|
|
|
Yeah, ignore my post.. FI-DD's code is better.. my answer doesn't even make sense.. well I shouldn't have added that comment filtering...
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Thu Jul 10, 2008 7:06 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|
 |
 |
 |
|