Do you guys think it’s possible to create a php script that takes a csv file as input and automatically creates for every entry an event?
Anyone has ever done something similar?
very possible, just haven’t done it 🙂
it is however not worth doing just now in my opinion because I’m starting work on making events posts.
ideally the workflow will be:
– collecting data through gravity forms;
– export data in csv;
– feed the php script with the csv file and for every entry create an event.
I thought the csv file was the simplest solution, maybe you can tell me that I can do it straight in WP…
could you point me out how to create an event straight to the DB?
in WP I can use wp_insert_post(), is there anything similar?
any material would be appriciated.
you can do it with the EM_Event object, either by passing in an assoc array of DB values or using the get_post method to grab post vars.
Then, you just run $EM_Event->save().
I haven’t had a chance to play with the GF api (have a license, great plugin).
Out of curiosity, why are you using GF for this instead of the event form?
oook that’s a start. thank you!
yes GF is a very nice plugin, super smooth to use and very powerful.
I’m using it instead of the event_form beacuse I’ve to collect a lot of data but only a selection of them will made to the event…
i see, would be interested to know how easy GF would play with EM. A nice integration idea.
i hope to do something…
as start I thought to hook the event creation straight to the form submission, but since the data need to be revised before the event creation i’m strugglinga bit to find another solution…
sorry the noob question…
How I set values to the object before calling the save() fucntion?
$EM_Event = new EM_Event();
//do what’s needed
can you reopen this post please and provide more information on how to create assoc array that can be used with EM_Event object.
please check this tutorials
I will post my solution once am through.
Thanks once again.
Really Appreciate your help.
I am able to successfully import single events.
Can you suggest how I can dump the recursive events/long events.
For example for a recursive event the values are obtained as follows from my database:
start date:2012-07-06 10:10:00:000
end date: 2012-07-06 11:10:00:000
start date:2012-07-13 10:10:00:000
end date: 2012-07-13 11:10:00:000
start date:2012-07-20 10:10:00:000
end date: 2012-07-20 11:10:00:000
and so on…..
How can I convert these to recursive events of Events Manager.
I have figured out inserting recursive events as well.
Just 2 things to finish my project:
1) how can I set the categories and tag values for the events using EM_Event object.
2) is it possible to set individual timings for each day of week to recursive events.
Any Help would be highly appreciated. I promise a definite word spread and donation.
- The topic ‘[Plugin: Events Manager] importing from csv’ is closed to new replies.