Forum Moderators: coopster

Message Too Old, No Replies

PHP Time Variation Issues (and Ressurecting NewsPro)

Might be aiming high... I donno...

         

stealthy eros

6:29 pm on Feb 24, 2004 (gmt 0)



I've used NewsPro for myself and for clients. But now I've come across something that a client wants:
Something similar to NewsPro, but any news within a time frame of 2 weeks to have a small "NEW!" gif image to appear next to it. Any news older than 2 weeks should turn off that image.

I've touched on PHP but not a whole lot to come up with something right out the top of my head. I'm lost and don't know how to approach this. I think I can write something like NewsPro in PHP (and although NP used flat files, I'd go with MySQL), the only thing that's worrying me is this issue of turning off an image after 2 weeks. (>.<)

Any help and/or guidance would be greatly appreciated.

-- sweatin' bullets

jatar_k

8:56 pm on Feb 24, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld stealthy eros,

I don't know how it works but a thought could be

1. get today's date
2. compare the date of each story to today as you are building your output
3. if difference is greater than 14 days don't show the image

that way it is self updating and doesn't involve any changes on a daily basis