Allow site admin to select a CCK Date field for counting down to on nodes

greg.harvey - October 15, 2009 - 17:56
Project:Countdown
Version:6.x-1.0
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Please find attached a patch which allows the title to happen. It adds some admin options (and corresponding variables) to the block config form, basically with the option to select a CCK Date field (if Date is installed) plus choose if the event name should be the node title or not.

If the date field option is used, the module will only display the block on node pages with the selected date field available (obviously, the block needs to be able to load the node to function in this case).

While I was at it, I moved a whole bunch of logic from the template to a preprocess function, where it should be. This doesn't change anything - it just makes the template more simple and puts logic back in the module.

Final add is an install file with a hook_uninstall() implementation so the module deletes its variables if it gets removed. Always a good idea.

Currently applies against 6.x-1.0. Hope you like! Let me know if you need it re-rolling against 6.x-dev. Kinda hoping it will apply anyway. =)

AttachmentSize
countdown_allow_cck_date.patch7.46 KB
 
 

Drupal is a registered trademark of Dries Buytaert.