Events Made Easy Forums Bug fixed or feature request implemented Feature Request: Conditional Tag for First Recurrence

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

    Hi,
    I want to add more infos if an event in an event list is the first recurrence of this event.
    In other words: I have an event list with e.g. three events (all are recurrences). The first recurrence of this list should be mark as “Premiere”.
    So, if there would be a conditional tag that is “true” for the first recurrence (I call it “#_IS_FIRST_RECURRENCE), I could use the following

    #_EVENTNAME [eme_if tag='#_IS_FIRST_RECURRENCE'] Premiere [/eme_if]<br />

    Or is there another way to solve my problem? I tried with filters etc., but it must be included in the default list format setting (at the “Events”-Tab) to use all the functions of this great plugin.

    #52908
    Franky
    Keymaster

    Implemented in trunk:

    add #_RECURRENCE_NBR, #_IS_FIRST_RECURRENCE and #_IS_LAST_RECURRENCE
    See http://plugins.trac.wordpress.org/changeset/998149

    #52909
    Anonymous
    Inactive

    Great, thank you very much.
    I’ll try it tomorrow and give you feedback.
    Thanks again for your work.

    #52910
    Franky
    Keymaster

    Ok, keep me posted (it’s untested …)

    #52934
    Anonymous
    Inactive

    It works as expected (tried #_RECURRENCE_NBR and #_IS_FIRST_RECURRENCE).
    Thanks again.

    I tried to create a conditional like ‘#_IS_RECURRENCE’ to check if an event has recurrences. I used the following and it works great:

    [eme_if tag='#_RECURRENCE_NBR' value ge '1'] … [/eme_if]

    Can I use this or could there be problems?

    #52938
    Franky
    Keymaster

    Use #_IS_RECURRENT_EVENT for that (it seems I forgot to document it, updated the doc now)

    #52944
    Anonymous
    Inactive

    It works!

    #52970
    Anonymous
    Inactive

    Found a little typo: In line 268 (in eme_recurrence.php) it should read

    $sql = $wpdb->prepare("SELECT event_id FROM $events_table WHERE recurrence_id = %d ORDER BY event_start_date, event_start_time ASC LIMIT 1",$recurrence_id); 
    

    and not

    $sql = $wpdb->prepare("SELECT event_id FROM $events_table WHERE recurrence_id = %d ORDER BY event_start_date, event_start_time ASC <strong>ASC</strong> LIMIT 1",$recurrence_id); 
    

    (one “ASC” to much). If not corrected, you can’t edit your recurrences 😉

    #52971
    Anonymous
    Inactive

    (the tag doesn’t belong here, but I can’t edit my posting, sorry)

    #52977
    Franky
    Keymaster

    tx; fixed in trunk

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