PHP coding for Pligg + Date restrictions

Hi…

I’m looking for a PHP ‘hack’ if you will, for a Pligg template file. I want to contrast today’s date with the date something was posted and if it’s over 30 days since the posting date, a vote button will not appear. I know this can be done with PHP, but I don’t know how! It’s been driving me crazy.

Essentially I need to insert something that will compare the submission date to the current date and if its within a certain range display the vote button, otherwise remove it. What would be the best way to plug this in?

Thank you in advance!

Check out the date-diff code here: (I think it will help, make sure to look at the posts down the page a bit!)

http://php.net/manual/en/datetime.diff.php

Good luck…

Sponsor our Newsletter | Privacy Policy | Terms of Service