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

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2005-04-25 22:23

not that we're aware of, but it's certainly possible to write one... we can provide guidance in doing so..

 
ash123

Joined: 2005-04-25
Posts: 2
Posted: Tue, 2005-04-26 10:32

any guidance would be appreciated, i am not very familiar with gallery2 at all.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-04-26 10:45
 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-04-26 14:17

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..)