Events Made Easy › Forums › How do I … › Function eme_get_events()
- This topic has 9 replies, 2 voices, and was last updated 10 years, 5 months ago by Anonymous.
-
AuthorPosts
-
Wed 25 Jun 2014 at 15:27 #52518AnonymousInactive
Hallo Franky,
I have used the function only with the attribute $extra_conditions=”event_rsvp=1″
The selection is not working, all events will be selected.Wed 25 Jun 2014 at 15:58 #52519FrankyKeymasterPlease don’t assign this as a bug, it’s a howto.
You need to call the function with all parameters, as any other function in php.Wed 25 Jun 2014 at 17:23 #52523AnonymousInactiveSorry, that was a misunderstanding.
I have used the following.
$events = eme_get_events($o_limit, $scope = "future", $order = "ASC", $o_offset = 0, $location_id = "", $category = "", $author = "", $contact_person = "", $show_ongoing=1, $notcategory = "", $extra_conditions = "event_rsvp=1");
I have the function used for some time without problems.
In the past I have used the parameter category and extra_conditions = “event_rsvp = 1”.
During this time, RSVP was at all events of the selected categorylink turned on.
The result was always OK.
Now I have taken out the selection-of the category.
The result, all events regardless of whether RSVP on or offWed 25 Jun 2014 at 18:50 #52525FrankyKeymasterThat is not correct usage of a function in php.
This is:$o_limit=5; $events = eme_get_events($o_limit, "future", "ASC", 0, "", "", "", "", 1, "", "event_rsvp=1");
Thu 26 Jun 2014 at 12:06 #52528AnonymousInactiveThanks for the information,
I changed the syntax accordingly.
The result is unfortunately still the same.I did a little experimenting.
If I only use the function and print the array $events, are in the array events with “[event_rsvp] => 0” and “[event_rsvp] => 1”.I am looking for a way to create an array in which only events with “[event_rsvp] => 1” included.
Thu 26 Jun 2014 at 13:16 #52529FrankyKeymasterI’m guessing this happens because you also have one of the options “hide full events” or “hide rsvp ended events” activated. These will cause to also show events with event_rsvp=0 to be shown (the way I currently create the sql then …).
In your case, I think it is best to use the filter eme_event_list_filter on a specific page then.
I’ll try to add an option to the function to account for this …Thu 26 Jun 2014 at 13:26 #52530AnonymousInactiveMy settings:
“hide full events” => no
“hide rsvp ended events” => no=> Both options are not enabled.
Thu 26 Jun 2014 at 13:51 #52531FrankyKeymasterThat should not be the case, I’ll check this later on too.
For now: either use the filter (as said), or loop through the resulting array yourself and filter out the events you don’t want (the filter would do the same in fact).Thu 26 Jun 2014 at 19:29 #52533FrankyKeymasterThere’s just an argument missing:
$o_limit=5; $events = eme_get_events($o_limit, "future", "ASC", 0, "", "", "", "", 1, "", 0, "event_rsvp=1");
Thu 26 Jun 2014 at 20:51 #52534AnonymousInactiveI understand now the function works properly again.
I’ve looked at your current code for the function. You have added an argument “$ show_recurrent_events_once = 0”.
Maybe I would have to watch earlier.
I used the function for about 3 months, now I wanted to change just a little thing and made a big thing of it.
Sorry and thank you for your patience -
AuthorPosts
- The forum ‘How do I …’ is closed to new topics and replies.