Events Made Easy › Forums › Bug fixed or feature request implemented › Delete and add event from front end
- This topic has 11 replies, 2 voices, and was last updated 11 years, 2 months ago by Franky.
-
AuthorPosts
-
Mon 23 Sep 2013 at 21:57 #44061AnonymousInactive
Franky,
I was wondering if there was a way to insert an attribute of some sort to add or delete an event from the front end when logged in. I know how to use conditional shortcodes to make something appear when a user is logged in. As you can see from this screenshot http://awesomescreenshot.com/07a1qwfd52 , I have it set up so I can go to the edit screen from the front end. However, in order to make things more user friendly for some of those I am designing this for, I’d like for them to be able to add and delete events from the front end. Any ideas? Is this possible?
Mon 23 Sep 2013 at 22:40 #50747FrankyKeymasterAdd is already possible. There’s an extra plugin in the contrib folder for this with a readme included. Delete is not possible using that plugin, but that’s easier to implement yourself than the add part.
Tue 24 Sep 2013 at 02:31 #50748AnonymousInactiveOkay, where is this “contrib folder”?
Tue 24 Sep 2013 at 09:15 #50749FrankyKeymasterextras/plugins/events-made-easy-frontend-submit
Tue 24 Sep 2013 at 16:21 #50750AnonymousInactiveOkay, I think that’s a little more than I was looking for. All I want to do is add a link that says, “Add” to the header that would take me to the back end “Add new” event page.
I realized that adding an event was as simple (I think) as adding a hyperlink (http://www.minutemenministries.org/wp-admin/admin.php?page=eme-new_event), but I’m having trouble getting my [event_if] to work in the header of my [events_list] so that it only shows up when logged in. Any thoughts?
Tue 24 Sep 2013 at 16:31 #50751AnonymousInactiveTrying to use WordPress php function. Not working…
<th>Date <?php
if ( is_user_logged_in() ) { ?>
<a href="http://www.minutemenministries.org/wp-admin/admin.php?page=eme-new_event">Add</a>
<?php
} else {
};
?> </th>Tue 24 Sep 2013 at 22:23 #50752FrankyKeymasterThe header and footer of the events_list do not currently support shortcodes. Fixed here:
Tue 24 Sep 2013 at 23:09 #50753AnonymousInactiveI got the delete function working. Here’s the code I used:
[events_if tag='#_IS_LOGGED_IN' value='1'] <a href="http://www.minutemenministries.org/wp-admin/admin.php?page=events-manager&action=deleteEvents&doaction2=Apply&scope=future&event_status=0&category=0&events%5B%5D=#_EVENTID"> <img src="http://www.minutemenministries.org/wp-content/uploads/2013/09/trash.png" style="float:right;vertical-align:middle; margin-top:4px;" title="Delete this event" > </a> [/events_if]
Of course, some of that is styling and aesthetics in there, but I’m excited about the fact that it works. I’m honestly not sure how or why all of it works, but it does. I took some of the url attributes out of the bulk delete in the Edit Page in the back end and reproduced in in the link.
One question, though. Which attributes of
page=events-manager&action=deleteEvents&doaction2=Apply&scope=future&event_status=0&category=0&events%5B%5D=#_EVENTID
are necessary for the delete action? Are thescope=future
,events_status=0
, andcategory=0
attributes superfluous?Wed 25 Sep 2013 at 07:51 #50754FrankyKeymasterYes they are 🙂
Wed 25 Sep 2013 at 15:38 #50755AnonymousInactiveI added the code in your header shortcode fix to my php files, but the shortcodes still don’t appear to be working. See screenshot below:
Thu 26 Sep 2013 at 17:31 #50756FrankyKeymasterMoving to bugsd until I find the time to check this.
Sun 29 Sep 2013 at 12:39 #50757FrankyKeymaster -
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.