Support

Home Forums Events Calendar Add-on Attendee Limit display

Attendee Limit display

Posted: March 31, 2014 at 11:26 am

Viewing 3 reply threads


Chris Beran

March 31, 2014 at 11:26 am

When you hover over an event on the calendar and it displays the number of attendees registration/spaces(eg. 3/9) Some have said that they were confused or they didn’t like that you had to subtract to find the available attendees. Is there a way to change the format to show only the number of spots available?


Jonathan Wilson

March 31, 2014 at 4:48 pm

Hi Chris,

You can use the Attendee Numbers shortcodes to display how many seats are available: https://eventespresso.com/wiki/shortcodes-template-variables/#attendee-numbers


Chris Beran

March 31, 2014 at 5:57 pm

Thanks for your response but I am wanting to change the way that the calendar displays it when you hover over an event. attendee_limit-qtip??. I want it to show spaces available only.


Dean

April 1, 2014 at 2:04 am

Hi Chris,

The only way I can see this being done is to edit the core calendar file (espresso-calendar.php)

On line 718 you should see this code block

				// add attendee limit if set
				if ( $show_attendee_limit ) {
					$attendee_limit = $reg_limit >= 999999 ? __('Available Spaces: unlimited', 'event_espresso') : __('Registrations / Spaces: ', 'event_espresso') . $num_completed . ' / ' . $reg_limit;
					$events[ $cntr ]['tooltip'] .= ' <p class="attendee_limit_qtip">' . $attendee_limit . '</p>';
				}

and change it to this

				// add attendee limit if set
				if ( $show_attendee_limit ) {
					$remaining_spaces = $reg_limit - $num_completed;

					$attendee_limit = $reg_limit >= 999999 ? __('Available Spaces: unlimited', 'event_espresso') : __('Remaining spaces: ', 'event_espresso') . $remaining_spaces;
					$events[ $cntr ]['tooltip'] .= ' <p class="attendee_limit_qtip">' . $attendee_limit . '</p>';

}

This is just an example and you may need to do further code tweaks to it. Also remember that as this is editing a core file, calendar updates will over write this code.

Viewing 3 reply threads

The support post ‘Attendee Limit display’ 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