Support

Home Forums Events Calendar Add-on Indicate Event is Full on Calendar

Indicate Event is Full on Calendar

Posted: June 6, 2014 at 1:55 pm


Trevis

June 6, 2014 at 1:55 pm

I realized this has recently been asked here: https://eventespresso.com/topic/event-full-on-calendar/

But, that doesn’t make it easy to see which events are full by glancing at the calendar and requires a rollover of each event. Is there a way to indicate and event is full in the calendar without having to rollover an event?

Thanks!


Lorenzo Orlando Caum

  • Support Staff

June 6, 2014 at 2:22 pm

Hello,

No, there isn’t a setting to show the status without hovering over the event.


Lorenzo


Trevis

June 6, 2014 at 2:25 pm

Is there perhaps a line of code I could add to the calendar script that would put a “Full” indicator on calendar items that are unavailable?


Josh

  • Support Staff

June 9, 2014 at 2:04 pm

Hi Trevis,

You can review how the tooltip code checks, then displays the different buttons depending on the status of the event if you open up espresso-calendar.php in a code editor and review the code starting on line 696. There you’ll see where it queries the events attendee table, then does some calculations with attendee limits and number of tickets sold. Then there’s a series of checks where it ends up displaying the Sold Out text if the following condition is met:

} else if ( $num_completed >= $reg_limit && $allow_overflow == 'N' && ! $expired ) {

What follows is the sold out button code:

$events[ $cntr ]['tooltip'] .= '<div class="sold-out-dv">' . __('Sold Out', 'event_espresso') . '</div>';

It turns out you can add more to the above statement in order to do more. For example if you add:

$events[ $cntr ]['className'] .= ' event-sold-out';

it will add an “event-sold-out” class to the html that you can then add some CSS to your theme to uniquely style the sold out events with. Something like:

#espresso_calendar .event-sold-out {
   background-color: #000;
}

will make the sold out events have a black background color instead.


Trevis

June 10, 2014 at 10:01 am

Josh-

Thank you so much, that works perfect.

I’m just about finished with the site for this client and I appreciate the help you and your team have provided to help me dial in the plugin for the client’s very specific needs. If you could pass on my gratitude to your teammates—especially Dean, Tony, Lorenzo, and Jonathan—I’d appreciate it. You’ve all helped me transform EE into a robust volunteer scheduling system for a very thankful group of remarkable, admirable, and philanthropic women in Minneapolis, Minnesota.

Here is their website if you’d like to know more about them. Unfortunately, the calendar is hidden in the members area—I could set up a test user if you’d like to check out what we’ve done with it. Just let me know how to privately get that info to you.

Once again, thank you!
-Trevis


Josh

  • Support Staff

June 11, 2014 at 10:18 am

You’re welcome Trevis.

The support post ‘Indicate Event is Full on Calendar’ 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