Quick question.
I have 3 types / classifications of "NEW"
Brand new = less than 24 hours
New more than 24 but less than 48 hours
And recently new more than 48 but less than 96 hours
Now how can I define these globally so if I have in the code anywhere > NEW
or < RECENT rather than tracing back all the spots where -24 hours so I can
simply change the NEW, BRAND_NEW and RECENTLY_NEW if I want to increase or
decrease their values later on
So I can use something like this in the code:
if ( $created < BRAND_NEW ){
//fun stuff here
}
So I can change them in 1 spot and reflect on the site throughout.
Configure::write('BRAND_NEW', date( 'Y-m-d H:i:s', strtotime( "-24 hours" )
) );
Thanks
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php