Hide galleries based on date - module?
ash123
Joined: 2005-04-25
Posts: 2 |
Posted: Mon, 2005-04-25 20:24 |
Hi, im wondering if anyone has developed a module that automatically hides galleries with dates that are set to the future. thanks |
|
Posts: 8601
not that we're aware of, but it's certainly possible to write one... we can provide guidance in doing so..
Posts: 2
any guidance would be appreciated, i am not very familiar with gallery2 at all.
Posts: 32509
dev docs:
http://gallery.menalto.com/modules.php?op=modload&name=phpWiki&file=index&pagename=Development%20Documents&
Sample/stub module
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=23200
Posts: 8601
take a look at randomhighlight as an example.. it does similar things to what you want: add an ItemEditOption in the Album tab that lets you pick a date (look for html_select_date in modles/core/templates/ItemEditItem.tpl for how to pick a date); the ItemEditOption will add an onLoadHandler to the GalleryAlbumItem.. when the album is loaded it will run that handler which checks the current date against the expire date and makes permissions changes if needed (and removes the onLoadHandler once this happens..)