 |
 |
 |
 |
 |
| Author |
Message |
finska1
Joined: 16 Jul 2008 Posts: 3 Location: DK |
|
Expiry date for news |
|
Hi all
I need a function that makes a message disappear after a certain time.
I would really appreciate if someone could help with this.
/finska1
|
|
| Wed Jul 16, 2008 12:52 pm |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1808 Location: US |
|
|
|
A cnr news related message? Or just a message in general?
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Wed Jul 16, 2008 1:23 pm |
|
 |
finska1
Joined: 16 Jul 2008 Posts: 3 Location: DK |
|
|
|
 |  | A cnr news related message? Or just a message in general? |
A cnr news related message
|
|
| Fri Jul 18, 2008 8:20 am |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2683 Location: Germany |
|
|
|
Try this:
Open inc/show.news.php and find this:
 |  | foreach ($query as $bg => $row){ |
and add below:
 |  | if(time() - $row['date'] > $expiration) continue; |
Now add for example $expiration = 2 * 86400; to your include code to make the article disappear after 2 days.
|
|
| Fri Jul 18, 2008 9:56 am |
|
 |
finska1
Joined: 16 Jul 2008 Posts: 3 Location: DK |
|
|
|
Thank you.... works perfectly.
Maybe it is possibly in the future to include the possibility to choose a “finish” day in the same way as you can choose a publish day/date
|
|
| Fri Jul 18, 2008 12:42 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
|
|
 |
 |
 |
|