Events Made Easy Forums Bug fixed or feature request implemented Adding/changing scopes in eme_events

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #55356
    Anonymous
    Inactive

    Hi Franky,

    I’m using the option “eme_events” and the scope “today–this_year”. Unfortunatly this scope is showing all events which are equal to today and after today. I expected that the events after the end of this year will not be shown. When i look in eme_events.php I see that at the scope “today-this_year” the variable $year has no value. It seems to be solved to add 1 line of code:
    $year=$eme_date_obj->getYear();

    Further I would like to use the scope “next_year”. Is it possible to add this scope?
    I think the code for this should be:
    } elseif ($scope == “next_year”) {
    $year=$eme_date_obj->getYear() + 1;
    $limit_start = “$year-01-01”;
    $limit_end = “$year-12-31″;
    if ($show_ongoing)
    $conditions[] = ” ((event_start_date BETWEEN ‘$limit_start’ AND ‘$limit_end’) OR (event_end_date BETWEEN ‘$limit_start’ AND ‘$limit_end’) OR (event_start_date <= ‘$limit_start’ AND event_end_date >= ‘$limit_end’))”;
    else
    $conditions[] = ” (event_start_date BETWEEN ‘$limit_start’ AND ‘$limit_end’)”;

    I hope to hear from you.

    Kind regards
    Twan Saleming

    #55357
    Franky
    Keymaster

    Bug corrected in trunk (thanks for finding it, it shows that not much people actually use these …) and next_year added too.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top