Jump to content

new sign on new posts


Recommended Posts

Hi,

 

The question I'm about to ask is more like conceptual thing rather than actual code.

 

Background:

 

I am sure you probably ever saw a 'new' sign usually at the end when new posts are up on some forum. That usually lasts for certain amount of time( Although this php forum seems not working properly it does have a orange 'new' sign for every post). My question is how to implement the sign. I noramlly do the following easy steps:

 

1. When a new post is updated, current time in integer is stored in a database using time() function.

2. When the posts are shown(when I click PHP Cding Help link), it should determine if current time minus the time stored in DB is still new(say, the new sign is only valid for a day) show new sign otherwise do not show it.

 

It's hard to explain what I am asking in writing; sorry about that. If you understand what my question is, I want to know the real world or better solution for this particular problem.

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/205106-new-sign-on-new-posts/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.