I would like an to have my Drupal forum set up so that an administrator can disable comments (by selecting disable comments in forum topic) for a particular topic, but then 24 hours later have comments opened up again automatically.
Can anyone help?
|
|
|
Your friend here is hook_cron(). Furthermore, you would need to check how to find the nodes that have had comments switched off in the last 24 hours. There's something useful you can check (perhaps it is the node's change time), or you have to keep a record yourself by implementing hook_nodeapi(). |
||||
|
|
|
You could you use the Rules module, and set up a rule that re-enables comments after x amount of time.
There's not really much more I can say. The Rules module is really self explanatory when you create a new one. The only issue you may have is whether or not Rules has the option of enabling comments. If it doesn't, then you're looking at creating a custom module that hooks into Cron. |
||||