Support

Home Forums Event Espresso Premium Hide times and registrations when venue is closed

Hide times and registrations when venue is closed

Posted: October 24, 2017 at 6:25 am

Viewing 11 reply threads


chcc

October 24, 2017 at 6:25 am

Our venue is closed for 3 days per week (Tues, Wed, Thurs) over winter and I want to display this on the calendar. I have created a category for Seasonal Opening Times and have created a ‘Venue Closed’ event that I can duplicate over the winter. How can I hide the times and registrations from the calendar, qtip and event list please. I’ve seen similar questions on the forum but non of them really solves my problem.


chcc

October 24, 2017 at 1:11 pm

I’m wondering if this is a fundamental bug? Every venue that I know of has periods of closure. How are we supposed to denote that on the calendar without using the rather clunky version I’m currently using, namely … creating a non-event-event to display that the venue is closed? I really hope that someone will show me that I’m being really stupid here because otherwise it means that the developers have really messed-up!


Tony

  • Support Staff

October 25, 2017 at 8:19 am

Hi there,

Can you link me to your calendar so I can view how your events are set up please?

The calendar was developed as an events calendar rather than venue calendar, it displays all events that you have created so if you have an event on a set day, it shows that event.

If there is no event listed on a specific day on the calendar would that not denote, for whatever reason, there are no events at that time?


chcc

October 25, 2017 at 11:27 am

Hi Tony,

Thanks for replying. The venue is an exhibition and study centre that organises educational activities for schools, colleges and the general public throughout the year. The centre’s exhibition space is open free-of-charge to the public most weeks of the year, but for fewer days during the winter months. Most of the organised activities are charged events with limited places, others are free but still require booking and occasionally they hold free events that do not require booking. All of these events are included on the calendar. We also need to inform casual visitors when the venue is closed and it seems logical and user-friendly to also display those days on the calendar.

The website is not quite completed and is currently hidden behind a coming soon page but you can access it with a special link that skips that page without having to login.

How can I send that link to you privately please?

Kind regards,

Phil


Tony

  • Support Staff

October 25, 2017 at 11:32 am

All of these events are included on the calendar. We also need to inform casual visitors when the venue is closed and it seems logical and user-friendly to also display those days on the calendar.

Yeah, so that’s different from the intention of the calendar add-on. Its designed to show you available events you can register on, not as a calendar for opening/closing times dates. Although I understand why you want to show it on the calendar, it’s just not what it was intended for so to do the above you’d need to create ‘closed’ events that show up on those dates, or some custom development to add ‘fake’ events to those dates showing them as closed.

I’m more than happy to take a look at the site and see if I can think of another solution though, you can send the link using this form:

https://eventespresso.com/send-login-details/

Use dummy login details if just sending the link.


chcc

October 25, 2017 at 12:12 pm

Thanks Tony, I’ve sent the link.


chcc

October 25, 2017 at 1:01 pm

Sorry, but one more thing while you’re looking and thinking about it … if I use a non-event-event to denote the venue is closed the Events List can become populated with more non-events that real events eg. Venue Closed, Venue Closed, Real Event, Venue Closed, Venue Closed, Venue Closed, Real Event.

I completely understand what you’ve said above about the plugin’s remit but in the real world many venues are open even if a bookable event isn’t scheduled because other things are occurring. Equally, those venues might be closed completely.


chcc

October 25, 2017 at 1:43 pm

oops … more non-events ‘than’ real events


Tony

  • Support Staff

October 25, 2017 at 2:11 pm

I completely understand what you’ve said above about the plugin’s remit but in the real world many venues are open even if a bookable event isn’t scheduled because other things are occurring. Equally, those venues might be closed completely.

EE wasn’t designed to be used to manage venues, it’s an event management system. You can create venues within EE and link venues to events to be used to highlight where the event takes place but that’s completely different from managing the venue itself.

As mentioned above, the calendar displays events from EE on the dates they occur and allows users to book onto those events, it’s not intended to be used to manage the venues opening times, meaning regardless of what the venue is doing EE simply displays events.

The only options you can use for the calendar and the type of setup you want is to create venue closed events or create a custom solution that hooks into the calendar and outputs Venue close events on those dates. Another user did something a little similar not so long ago here:

https://eventespresso.com/topic/event-dates-for-events-calendar-add-on/
(Similar idea for a different use case)

Sorry, but one more thing while you’re looking and thinking about it … if I use a non-event-event to denote the venue is closed the Events List can become populated with more non-events that real events eg. Venue Closed, Venue Closed, Real Event, Venue Closed, Venue Closed, Venue Closed, Real Event.

To work around that you can add the close events to a category and then hook into pre_get_posts and set the query to pull events NOT in that category.


chcc

October 25, 2017 at 6:45 pm

Thanks Tony,

I’ll give those suggestions a try and let you know how I get on.


chcc

November 9, 2017 at 11:56 am

Dear Team,

Here’s an update. We have managed to hide ‘Venue Closed’ events from the events list but are still having problems with the calendar pop-ups.

We are trying to hide the “Event Time / Registration” details from certain events in the qtip popups from the calendar. We can see these are easily hidden by something like:

[code]#qtip-6 .qtip_info {display: none !important;} [/code]

where the qtip id is known. However we haven’t been able to find any correlation between the qtip-id and the post itself. Therefore we cannot identify the relevant qtips even after doing a custom query for the category we wanted and enqueing styles.

We can also see that the main link itself in the calendar contains the linkage via data-hasqtip / aria-describedby. Therefore if we were able to run some javascript after the calendar had loaded the current view we would also be able to hide those details.

Therefore could you answer:

1) Does the qtip-id have any correlation to the event itself? If not is there a way to link it?
2) Is there some point we could inject into post-calendar load that would enable us to run a piece of jQuery to retrieve the data-hasqtip and hide the .qtip_info for the relevant divs once they existing in the DOM object?

Kind regards,

Tim


Josh

  • Support Staff

November 9, 2017 at 1:57 pm

Hi Tim,

I think those IDs are set in sequence to the count of tooltips, so if you there are 15 tooltips you’ll have ids 1-15.

Re your idea, I’m by no means a JavaScript expert to know whether your idea would work but you might be able to use the wp_add_inline_script function to load in some custom JavaScript. You’ll need to fire on the ajaxComplete event to make sure your code applies when a month is advanced with the controls.

e.g.

add_action( 'wp_enqueue_scripts', 'eecal_custom_calendar_qtip', 11 );
function eecal_custom_calendar_qtip(){
    wp_add_inline_script( 
        'espresso_calendar',
        'jQuery( document ).ready(function($) {
          $( document ).ajaxComplete(function() {
            // your code goes here
          } );
        } );'
    );
}

A simpler approach you could take would be to password protect all of the venue closed events. When an event is password protected the EE4 calendar will not show its times on the calendar.

Then to change the button you can use one one the calendar’s filter hooks. Here’s some example code you can adapt:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/addons/eea-calendar/tw_calendar_tooltip_reg_btn_html.php

Viewing 11 reply threads

The support post ‘Hide times and registrations when venue is closed’ 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