Events Made Easy Forums How do I … Function eme_get_events()

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #52518
    Anonymous
    Inactive

    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.

    #52519
    Franky
    Keymaster

    Please 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.

    #52523
    Anonymous
    Inactive

    Sorry, 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 off

    #52525
    Franky
    Keymaster

    That 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");
    
    #52528
    Anonymous
    Inactive

    Thanks 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.

    #52529
    Franky
    Keymaster

    I’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 …

    #52530
    Anonymous
    Inactive

    My settings:
    “hide full events” => no
    “hide rsvp ended events” => no

    => Both options are not enabled.

    #52531
    Franky
    Keymaster

    That 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).

    #52533
    Franky
    Keymaster

    There’s just an argument missing:

    
    $o_limit=5;
    $events = eme_get_events($o_limit, "future", "ASC", 0, "", "", "", "", 1, "", 0, "event_rsvp=1");
    
    #52534
    Anonymous
    Inactive

    I 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

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top