I recently got to try out one of the new features added to the core of Joomla! 1.7.x and above. You're now able to schedule when you want to publish and unpublish a module. This is extremely powerful!! If you don't know what a module is, it is a box of content that you can put pretty much anywhere on your site.You've been able to schedule articles, but now modules!
Being able to schedule modules could be useful in many scenarios.
- Say you're unable to make changes on your website everyday (you're out of town), you could schedule pieces of content to switch on your site when you're not available.
- Or if you want to make a large amount of content change all at one time.
- Possibly you just want to set it and forget it.
In my case we were creating a website for a client that needed a website for a week. On the website they wanted a poll that rotated every day at midnight. So basically a daily poll. We were using the component AcePoll's to display the polls in a module.This worked well expect you couldn't have these rotate without the Joomla! publish/unpublish module feature. I didn't want to have to be up until midnight each night for a week switching the poll manually, so the best solution was to schedule a module to publish in one position and unpublish in the same position 5 times.
So I created 5 polls and 5 modules. I had to create 5 different modules, because each module required it's own poll ID. I set the start publish to 2012-06-04 23:59:59 and finish publish to 2012-06-05 23:59:58. This way it would start on June fourth at about midnight and end on June fifth at about midnight. The following days poll would start at 2012-06-05 23:59:59. If you're not familiar, Joomla! uses a 24-hour clock.
Depending on where you are or where your website audience is you'll have to set your timezone in the Site > Global Configuration > Server > Location Settings > Server Time Zone. This is important and seemed to be less visible than I anticipated. Yes, I was looking obviously looking in the Global Config it just seemed to be using some type of cloaking device.
That's it! Pretty simple!
In newer versions of Joomla! I hope to see some enhancements. It would be nice to be able to schedule modules to be published or unpublished yearly, montly, weekly, daily. This way on your site could have rotating content. Also it would be nice to not use a 24-hour clock, because it's confusing, IMHO, so including AM/PM. I hope this helps saves you a few development hours or inspires you to use a new feature!