Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums How To Dont display news with a future Date
Spanker
Posted on 12 Jun 2010, 23:11:26

Access: Member
Total Posts: 12
Joined: 2009-10-16

I wanted to create some news and just want them to be visible in their date. How can I do that ?
#2439
Chris
Posted on 13 Jun 2010, 02:15:17

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

I'm not entirely sure what you mean exactly. Do you mean create a new article and set the date in the future then not have that article show until the actual date matches the date sent in the news article?
#2440
Spanker
Posted on 13 Jun 2010, 09:20:08

Access: Member
Total Posts: 12
Joined: 2009-10-16

Yup it's that
#2442
Chris
Posted on 13 Jun 2010, 19:16:06

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

This is possible by making a small edit to the script. If you edit index.php, around line 494~ you'll see this line

Code:
LEFT JOIN " . NEWS_ACCESS . " ON " . NEWS_USERS . ".access = " . NEWS_ACCESS . ".uid WHERE approved = '1' $f $u AND archived = '" . $archives . "' ORDER BY $orderby $newsorder LIMIT $start, $amounttoshow";


Change that to

Code:
LEFT JOIN " . NEWS_ACCESS . " ON " . NEWS_USERS . ".access = " . NEWS_ACCESS . ".uid WHERE approved = '1' $f $u AND archived = '" . $archives . "' AND timestamp <= '" . time() . "' ORDER BY $orderby $newsorder LIMIT $start, $amounttoshow";


Now when you post a news article and change the date of it to sometime in the future, that news article won't display until the actual date matches that of the article.

I've made a note of this and will add this functionality into the next version

http://code.google.com/p/n-13news/issues/detail?id=78&colspec=ID%20Type%20Status%20Priority%20Owner%20Summary
#2447
Network-13.com © 2013