Event Calendar Pro Widget and past events

Home Forums Calendar Products Events Calendar PRO Event Calendar Pro Widget and past events

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #180797
    crystalbridges
    Participant

    I would like for Event Calendar Pro widget to display on upcoming events. It currently displays the current days events. After some looking around I found where to change it in the class. The file is here: plugins/event-calendar-pro/lib/tribe-mini-calendar.class.php. On line 229 the code is ‘eventDisplay’ => ‘custom’. If you change ‘custom’ to ‘upcoming’, it works how I would like it to. My question is, how can I make this change without changing a core class file?

    #182234
    Casey D
    Member

    Hello crystalbridges,

    Thanks for contacting us, this is a neat request! And you did your homework, which makes my job easier! 🙂

    The short answer version is you cannot, by design. That specific widget is made to display a month view, which by definition cuts off at the end of the calendar month. The ‘upcoming’ query is not limited to calendar boundaries, and thus we didn’t build in a way to override or adjust that specific query. This is just with my experience so far and digging through the code, I may be mistaken.

    The long answer is I will check with the devs. Can you give me more information as to why you want that end result? Is it the aesthetics of the large calendar ‘day’ square in each list item? If so this is the second time I’ve had this request in a week, and we might make a quick tutorial so you can get that effect with a more appropriate widget. If not, it would be great if you could offer more specifics, I’d love to help any way I can.

    2014-05-27 at 9.02 PM

    Does this make sense? Let me know if I can explain anything else!

    Cheers! –

    Casey Driscoll

    #182280
    Casey D
    Member

    Talked with a dev and this was his comment verbatim. I’m a dev myself, but don’t yet quite know the intricacies of the system. Let me know if this is enough information, otherwise I’d be happy to look into it and break it down for you a bit more.

    I think the basic outline you could propose he look into is use the widget_display_callback filter as a means of listening out for the calendar widget (he can check which widget it is by using a conditional against $widget->id_base, where $widget is the second parameter available to filter functions using that hook). Then, setup a further filter on parse_query and $query->set( ‘eventDisplay’, ‘upcoming’ ) etc, then tear it down so as not to interfere with subsequent queries by other widgets or what-have-you

    – Casey Driscoll

    #186854
    crystalbridges
    Participant

    Thank you very much for your response. The layout of this widget is a big part of my reasoning for wanting to make this change. We aren’t using the month view at the top and prefer this nicely laid out list. We are also using it on large screens viewed by the public to indicate upcoming events, and as such, it makes more sense not to display events that ended an hour ago or whatever the case may be.

    If you were able to provide a tutorial for making this change, that would obviously be the preferable route to take, rather the changing core files or digging into the filters.

    Thanks again.

    #186871
    crystalbridges
    Participant

    Woops, I have one more requirement that I didn’t mention.

    We are using WP Tags and Categories for filtering (on the filter bar, and in calendar feeds), and for some reason the Event Calendar Pro widget pulls in the full list of tags and categories, whereas the basic list widget only pulls in categories to filter by.

    If the basic list widget could pull in tags AND be restyled to match the Pro widget, that would be the optimum.

    #188270
    Casey D
    Member

    Hello crystalbridges,

    After talking with the team I’m fairly certain we’ll create a nice tutorial on this in the next day or so. I’ll update you here when it goes live.

    Cheers!

    – Casey Driscoll

    #188594
    ocronusa
    Participant

    I would also like to see how to do this.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Event Calendar Pro Widget and past events’ is closed to new replies.