1) one way to get this working is to force dropdowns for locations as if you don’t have a default location set, it’ll default to ‘no location’. I’d hesitate making it ticked by default on the form as it’ll hide the locations form by default.
2) no right answer, but if we set the date to today, most events will be in the future and we’ll get asked for another default 🙂 one would argue it could cause mistaken events to be entered with today’s date, rather than reminding you to fill the date.
I do get asked about times often though so eventually will look into a default time.
Hi Marcus, thanks for the reply.
I understand your reticence to make defaults as standard, however, would it be possible to put options in the settings page to allow both 1 & 2? i.e. to turn each feature on or off? This would give your plugin the best of both worlds and then the user could choose which is right for their website.
I could hardcode the plugin to work the way I wanted but it would break every time there was an update, forcing me to re-apply my hacks.
Anyway, great plugin – thanks again 🙂
I’ll consider adding these in the future for sure.
btw, you can do all of this with code and without hacking the core code directly, you just need to hook into the right place:
e.g. the em_event action is when an event is created. first argument is the $EM_Event object, if you modify that object so
if $EM_Event->event_id == 0 – new event
change these
$EM_Event->start – timestamp
$EM_Event->end – timestamp
$EM_Event->event_(date/time)_start – mysql date/time fields format
$EM_Event->event_(date/time)_end
then the default times and dates will appear in the form
Thanks or the update. Do you mean you have created some custom action hooks to amend the plugins functions? Are these documented anywhere?
Yes, the one you want is em_event (an action)
not atm, you’d need to browse through the code. There’s a LOT of filters and actions so when we do document them we’ll probably only do the major ones to start with.
Thats great – many thanks