Download & Extend

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

Project:Countdown
Version:6.x-1.0
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

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

Comments

#1

This patch sounds fantastic! Any chance of a D7 update?

#2

Hi Greg, This patch is exactly what I need for a project I am working on and almost exactly as I need it to with one small exception. I was wondering if you had the time to quickly look at it and see if the issue is easy to fix.

I have a node type with a warranty expiry date in it and that is what I am counting down to.
It works perfectly when I view the node directly.
The only thing is that I have used the Content Profile Module to attach that node type to a users profile.
That is all the user can see, they can't see the node itself, just the node as it is attached to their profile.
The CCK field that I am using is still there and all the surrounding HTML is exactly the same as what it is on the node page.

But it doesn't work on that page.

Any suggestions?

Thanks heaps.

nobody click here