Hi,
I've just tried to unpublish a node which is being used as a header image by your module but eventhough the node is unpublished it shows in the header.
Is there a way to fix this, I'm combining your module with scheduler to unpublish header images but it doesn't work as your module doesn't respect the publish/unpublish setting.
Hope it's fixable :)
Cheers,
Bartezz
Comments
Comment #1
bartezz commentedActually it is fixable :)
I can't post a patch now cause I'm not working from my ordinary workstation right now but I've managed to re-code your module somewhat to make it respect the published/unpublished setting.
I'll describe what I've done first;
* added field in the database table {header_image} called status int(11) default 1
* change headerimage.module line #320
* change headerimage.module line #689-690
Now when I enable the scheduler module for the header image content type I can schedule each header image to publish or unpublish at a certain time (tested and working as far as I can see).
These alterations in combination with scheduler module make it possible to set up seasonal header images long before the season has started and have them automatically published. Can come in handy when ur in bed hungover on new years day when actually you need to change the header image of your website to wish everyone a happy new year :)
If you see no problems with my alterations I can provide you a patch Eric?!
Cheers and have a good weekend!
Bartezz
Comment #2
bartezz commentedOops, did find one quirck!
When scheduler unpublishes the node it also resets the block name, weight (?) and taxonomy condition that were set for the node. Will have to look into this!
Cheers
Comment #3
bartezz commentedAfter a weekend of debugging and help from Eric of scheduler I managed to find out what was wrong. Headerimage.module was missing a case: load form the hook_nodeapi and therefor not supplying othermodules with nessecary variables.
I will provide a patch for headerimage.module so that this module works for scheduler as soon as possible! So we can all schedule header images for the upcoming holidays :)
Cheers,
Bartezz
Comment #4
bartezz commentedSee http://drupal.org/node/347397