I would like to see the Countdown module patched to allow the option of shutting down the site for maintenance at the designated time automatically. I would also like to see an email notification go out when the site has gone offline.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | countdown_5.x-1.0.shutdown.patch | 7.28 KB | myke |
Comments
Comment #1
deekayen commentedThe CVS applications list suggested you already wrote the functionality for this request. If you emailed me about this before sometime, I have totally forgotten about it. Please attach your patch here so I can work it into the Drupal 6 upgrade.
Comment #2
myke commentedHere is the patch file... I also added some extras (such as email notification when the countdown is reached, whether or not to show the countdown to all users, and whether or not to hide the countdown when finished...
(As well as worked on the wording in the code a little bit, as far as having it say second when it's 1 second, seconds when it's non 1 seconds remaining, same with minutes and hours..)
-Myke
Comment #3
deekayen commented} else {: http://drupal.org/coding-standardst()strings are inconsistent - some have EMail vs Email (e-mail is standard), some end with ? and some don't (prefer without)hook_init()variable_get()calls are missing default values and I require them. For example,$to = variable_get('countdown_notification_email_address');email should default to site_mail.variable_set('countdown_locksite', 0);not immediately aftervariable_set('site_offline', 1);?Comment #4
myke commentedI worked on all those issues you raised.. when trying to put the shutdown check into hook_init it didn't work properly.. if no longer shuts the site down.. It also seems to slow Drupal down a little bit..
I read something about hook_init not having common functions enabled, such as t() url() etc. Could this have something to do with it not working properly?
-Myke
Comment #5
myke commentedI will be back on this feature attempt when I get a chance, I'm preparing a bunch of sites for upgrading to Drupal 6, when my schedule is more freed up I will clean up the code fully, and resubmit it..
-Myke
Comment #6
usingsession commented