Adding events through code
-
Hi,
I need to add some event manually through php and I found this:$EM_Event = new EM_Event(); $EM_Event->event_name = $evt_name; $EM_Event->event_start_date = $evt_start_d; $EM_Event->event_start_time = $evt_start_t; $EM_Event->event_end_date = $evt_end_d; $EM_Event->event_end_time = $evt_end_t; $EM_Event->start = strtotime($EM_Event->event_start_date." ".$EM_Event->event_start_time); $EM_Event->end = strtotime($EM_Event->event_end_date." ".$EM_Event->event_end_time); $EM_Event->event_all_day = $evt_all_day; $EM_Event->recurrence = $evt_rec; $EM_Event->recurrence_freq = $evt_rec_freq; $EM_Event->recurrence_interval = $evt_rec_int; $EM_Event->recurrence_byweekno = $evt_rec_weekno; $EM_Event->recurrence_byday = 3;//$evt_rec_byday; $EM_Event->recurrence_days = 0;//$evt_rec_days; $EM_Event->save();
This seems that it doesn’t work because I don’t find new events added manually.
Can someone help me to understand where I wrong?
Thank you
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Adding events through code’ is closed to new replies.