Support

Home Forums Event Espresso Premium How to know when any event has changed

How to know when any event has changed

Posted: March 24, 2013 at 11:27 pm


Jim Schuyler

March 24, 2013 at 11:27 pm

I have extended EE to build very nice PDF calendars for our stores. Because building a PDF calendar takes a lot of time, I cache the PDF files and serve those cached versions to shoppers. Each of our stores has a store manager and they are responsible for maintaining their own store’s events. Each manager manages only their own events [we use the ‘locale’ feature to coordinate]. I need to know when any manager changes an event so I can “break cache” and regenerate their store calendar. Is there an EE hook that I can hook into in order to know that there has been a new event, changed event or deleted event? It’s fine if it’s multiple hooks — I just need to know when to regenerate the PDFs.


Chris Reynolds

  • Support Staff

March 25, 2013 at 1:50 pm

I don’t think there’s a specific hook in the current version of Event Espresso. We didn’t really start adding hooks until Event Espresso Arabica (3.2/4.0). You might be able to trigger a refresh when the wp_events_details database table is updated, though I don’t have any ideas how you could hook into that. Could you add a button/tool to “Regenerate PDFs” that just flushes the cache (either for all events or for a specific event based on event_id)?

What you’re working on sounds pretty awesome though. I’d love to see it.


Jim Schuyler

March 25, 2013 at 2:10 pm

Ah, interesting idea! I will look at how to monitor the MySQL database table, and it does sound doable.

We already have a “Clear cache” button but the store managers forget to do it and leave stale files in the cache.

The site is http://stores.athleta.net/ and if you click one of the store locations you see a calendar for that particular store. The entire calendar system is powered by EE. We are not using it for reservations or ticketing. We suppress those capabilities by using CSS to hide certain elements on your EE-generated pages.

We have code-copied your calendar generator and made it pay attention to -locale- and inserted our modified function to generate the calendars. We also style the calendar itself by overriding CSS styles, and we can pick up date-change events when people scroll forward or back on the calendar (because the calendar author did provide hooks) to do some fancy stuff.

We generate PDFs using “mPDF” which takes incoming HTML and spits out PDF files. This feature is being added mid-April, so you won’t see it now.

The support post ‘How to know when any event has changed’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso