Koozali.org: home of the SME Server

smeserver-vacation extend functionality

Offline mats

  • *
  • 20
  • +0/-0
smeserver-vacation extend functionality
« on: April 23, 2013, 02:24:05 PM »
Hi all,

I am trying to extend the vacation functionality in order to automate enabling and disabling of vacation messages for individual users based on given start- and end-of-vacation dates.

The basic idea is to the store the vacation start and end dates as additional properties in each user's db accounts entry, and then run a cronjob every night to check if vacation messages need to be enabled or disabled by comparing these properties with the current date.

I have modified the corresponding server-manager panel to include two fields for the start and end date, and the corresponding FormMagick to insert these dates into db accounts - this is working. A diff of the changes I have made so far is here: http://pastebin.com/MhgUrsWS

The cron automation should not be too hard to implement I guess (via: db accounts setprop $USER EmailVacation yes/no)

I am a bit unsure how to proceed from there, though, eg.how to implement these changes in a redistributable form - the whole RPM repackaging stuff is a bit over my head ATM, I'm afraid  :-) If there is a somewhat general need to implement this functionality, wouldn't it be best to implement these changes in the official smeserver-vacation package? Also, a very welcome feature would be to implement the same functionality into the userpanel-vacations (as the changes I made do not seem to propagate over there). But then, yet another contrib would be affected by this sinister plan.

Any ideas would be welcome!

Cheers

Mats

« Last Edit: April 23, 2013, 02:26:43 PM by mats »

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: smeserver-vacation extend functionality
« Reply #1 on: April 23, 2013, 03:26:43 PM »
you should submit your code first of all in bugzilla as a NFR for the contrib..
then you should subscribe the dev's ML
finally, you should read the dev's manual :-)

thank you for your effort

Offline mats

  • *
  • 20
  • +0/-0
Re: smeserver-vacation extend functionality
« Reply #2 on: April 23, 2013, 06:39:31 PM »
Hi,

thanks for the pointers Stefano.
I have opened a NFR in the bugtracker (7555).

Cheers,

Mats