Events Made Easy Forums Generic Bug with “show_recurrent_events_once”?

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #64458
    Bobby
    Participant

    Hey Franky,

    We just noticed that our recurrent events are being repeated even though we have the “show_recurrent_events_once=1” attribute enabled. Is this a bug or is there something else I should be looking at. For reference, it’s at the bottom of fallsbaptist.org.

    #64459
    Franky
    Keymaster

    When I look at the bottom of that page, I see 4 events rendered (of course unsure if EME is doing the rendering, but let’s assume so). The events are rendered with specific div’s, and all 4 have different classes (feature-cal-col2, feature-cal-col3 and feature-cal-col4 for the second, third and fourth div), so it is not EME doing that unless you configured 4 event lists or so. So: how do you do that rendering?

    #64461
    Bobby
    Participant

    I am using EME to do that. It’s kind of complicated, but sufficed to say that I’m using templates and lots on instances of [eme_events]. 🙂

    #64462
    Bobby
    Participant

    It’s actually the application I needed you to design the offset function for. https://pasteboard.co/qBpumA1aG64F.png

    #64463
    Franky
    Keymaster

    Well, if using several instances of eme_events, those instances don’t know about each other which is what I think you have going on here. What is the shortcode+options for the event of 5 August and compare it to the one for 29 July (so the second and fourth div).
    But maybe the offset together with show_recurrent_events_once is not doing what you expect here: the offset is used *before* the show_recurrent_events_once is being evaluated (to get the list of events from that offset onwards using sql, it is in fact also used for paging).
    Maybe, in your use-case, it would not be an offset, but just the possibility to show 1 specific event from the resulting list of events. Which in fact would call for a better name for that option and other coding …

    #64464
    Bobby
    Participant

    I think I follow you. It’s been working perfectly for a long time, but that was before I implemented the offset feature, which I think is making it so that the show_recurring_events_once feature to not trigger like I want. As you said, my lists don’t know about each other. I think I know the problem and it’ll require a rebuild from my end.

    #64465
    Franky
    Keymaster

    I meant coding on my end, but I’m curious about your solution here 🙂

    #64466
    Bobby
    Participant

    Because I was originally trying to put individual elements into my page builder (Themeco’s Cornerstone Page Builder: https://theme.co/cornerstone), I tried to put each element in its own text field and call an individual [events_list] for each one and controlled the output via a template and the offset option. So, each date had its own [events_list] and template, each title had its own [events_list] and template, and each description had its own [events_list] and template.

    Before I had the offset option, I returned one item for the first column, two items for the second column, three items for the third column, and four items for the fourth column. I hid the unwanted items via display:none in css. This also allowed, apparently, the show_recurring_events_once feature to display properly, since all the items were technicaly in each list. The offset feature let me clean up my CSS significantly, however, at the cost of the show_recurring_events_once feature.

    Now, however, since the show_recurring_events_once isn’t firing like I want, I’m going to have to make it all one instance of [events_list] and use the template header and footer to build out my calendar from the ground up. I’ll try to replicate the output HTML that’s currently in place so I don’t need to tweak the CSS that much. I probably should have done it this way from the beginning, but I was being lazy. 🙂 No more.

    #64467
    Franky
    Keymaster

    btw, using 1 eme_events call instead of 4 will speed up page load. Also, if you want to add different class elements depending on the number of the event in the list, you can use #_EVENT_COUNTER to test for that (using [eme_if]).

    #64469
    Bobby
    Participant

    Rebuilt to match what preceded and all works as hoped. Was quite easy to do. Thanks for the #_EVENT_COUNTER tip. Very helpful.

    #64470
    Franky
    Keymaster

    Glad you got it to work. Feel free to post a template in the how-to section (and I always appreciate a donation for some coffee and a good wp review 😉 )

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.