Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 05:03:11 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155533 Posts in 21713 Topics by 7739 Members
Latest Member: audillino
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: About news module  (Read 567 times)
AnatoniaA

Offline Offline

Posts: 4


« on: March 01, 2010, 09:27:39 AM »

Hi,
How can I do to show only the current day's news?.

Thanks
Logged
instantflorian
Betatester
*
Offline Offline

Posts: 804



WWW
« Reply #1 on: March 01, 2010, 09:57:42 AM »

Hi,

either you set the valid-until-date of the news or you build a site using the anynews snippet which can be configured to show only new news (see readme file)

http://www.websitebakers.com/pages/code-snippets/listings/anynews.php
Logged
AnatoniaA

Offline Offline

Posts: 4


« Reply #2 on: March 01, 2010, 09:39:27 PM »

I think that I was not well explained.

 Do not want to show the news recently, but  only the news that the current day
Logged
doc
Guest
« Reply #3 on: March 01, 2010, 10:24:32 PM »

Hi,

as already mentioned by instantflorian, you can use the last Anynews parameter: $not_older_than
README file: 0:=disabled (default), 0-999 (only show news `published_when` date <=x days; 12 hours:=0.5)

The hours (e.g. from midnight to actual time) can be computed using PHP time function. This way you can achieve to show only the news published from midnight to actual hour ...

Doc
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!