Hello!
Told you you’d see me in the forums 🙂
I am utilizing your gist that creates a front-end form for creating events. I would like users to be able to edit the events they create though! It would be a massive pain (not to mention UX nightmare) if users had to delete the event they created and then re-create it just to change, say, the title or date.
Along these lines, I suppose if you know anything about creating a customized admin panel for user events on the front-end that would be useful and fulfill this need. Likely though, I could go about doing something like that on my own if I just find out how to allow users to edit their events on the front-end.
Thanks in advance

Gabriel David
Darn 🙁 I was hoping you were as active here as the wp forums haha

Gabriel David
:). Sorry Gabriel!
There’s currently no way of front-end editing events. (There is an extension, in development, for submitting events – but even this won’t allow front-end editing). WordPress itself may at some point be implementing front-end editng (there is this ‘feature as plug-in’: https://wordpress.org/plugins/wp-front-end-editor/). Its still early on in development, and Event Organiser is not yet integrated into it, but when that plug-in has progressed more and looks likely to be included in WordPress, Event Organiser integration will be implemented.
I’ve not had a chance to look at the code, but I have played with the plug-in. From that, my guess is that they’ve:
- registered an endpoint ‘edit’. (e.g. http://www.mysite.com/events/event/my-event/edit)
- Using that endpoint to detect when the event (post) is being edited and adding scripts etc. In your case, I would either (in the template), or by using
the_content
filter (the former is probably easier). Allow users to edit details such as title, content, dates etc. (You mentioned you had used the event submission gist – you could do something similar)
- Either via ajax or straightforward
$_POST
collected any data entered and updated the post. The above FEE is probably trying to do a lot more than you need it to (including featured images etc). In your case you could probably do something similar to the event submission gist and instead call eo_update_event()
.

Stephen Harris
Hm, okay.
As I love AJAX for user experience, I think what I’m going to do is on the events page (or perhaps just single.php in general, because I’m realizing front-end editing is going to end up being an across-the-board useful feature for me) create an “Edit” button – assuming the user has correct permissions. This will then turn that field into an input area and on clicking “Save” an ajax function will be called, submitting the new value as $_POST. Need to work out the kinks behind that idea obviously, but will post my solution here.

Gabriel David
Now that I think about it, this is a related question but perhaps different topic – how does your plugin format the content? Does it hook onto the_content? I may need to modify it it to provide meta-name information about particular fields.

Gabriel David
It uses the_content
filter to prepend the template event-meta-single-event.php
, unless your theme contains single-event.php
. In which case it does nothing and simply uses that template.

Stephen Harris