Support

Home Forums Event Espresso Premium Customize Calendar agendaDay view with Room Number column headers?

Customize Calendar agendaDay view with Room Number column headers?

Posted: April 15, 2013 at 8:47 pm


lhammond

April 15, 2013 at 8:47 pm

We offer many concurrent classes, and I would like to customize the calendar to display a schedule for a given date range of events that looks something like this schedule grid:

http://www.compassclasses.com/schedule/

As you can see, not all classes start and end at the same time, and there are many rooms where classes are held!  What is the best way to make this grid display programatically, with tool-tip descriptions and links to registration for the classes?  I’d like to pass in a date range (so I can specify different grids for each quarter).  I thought about writing a custom shortcode, but then I figured the calendar plugin is so close to what we need, it would be great it I could modify it.  However, my current attempt to use the calendar plugin doesn’t event display the classes at the right start hour, so they all bunch up near midnight on the agendaDay view.

1) Is there a way to use the Venue Title (the field we use for room number) to sort columns in agendaDay view?

2) how can I specify to query for events in a given date range (or jump to the first Wednesday of a given quarter, maybe based on a shortcode parameter or query string variable)?

3) What am I doing wrong that my events are not even trying to display in the right time slot now?  I’m using Version 2.0.B.1.

Thanks!

 


lhammond

April 15, 2013 at 8:59 pm

Okay, I updated to the latest version 2.0.4, and I also realized the answer to my question #3.  We have each class set up so that the start date is the beginning of the quarter and the end date is the end of the quarter.  Classes meet every Wednesday during the quarter and run from start time to end time, but are not set up as recurring events.

Is there a way to make them display properly given that kind of setup?  What code would I need to edit?


lhammond

April 15, 2013 at 9:45 pm

Also, I tried updating espresso_calendar.php with a fixed date to jump to according to the instructions in https://eventespresso.com/forums/2012/05/calendar-to-display-a-specific-date/, but couldn’t get it to work.  I think the code is quite different now, so I wasn’t sure if it still applies or where to put it.


Chris Reynolds

  • Support Staff

April 17, 2013 at 11:14 am

Much of what you’re describing would require a rewrite of much of the current calendar plugin, such that it wouldn’t be the same plugin anymore.

The way you would display events that occur at specific times during a date range is to create separate events for each of those days. You can then set the Alternate Registration Page URL for those events to be a single event that acts as the “master” event that you actually register for.

As far as displaying the venue as a column, I’ve done a lot of work on the calendar (granted not as much with the agenda view) and I can’t see an easy way of doing that without, as I said above, rewriting a lot of what’s there now and/or creating a new, custom calendar plugin. I don’t think venue is even fetched in the SQL query by default, so you’d need to add that in there before you could even use the venue information.


lhammond

May 2, 2013 at 8:09 pm

There is a piece of code in espresso_calendar.php that looks like this:
//Custom fields:
//These can be used to perform special functions in your display.
//This decalares the category ID as the CSS class name
$eventArray['className'] = '';
$eventArray['eventType'] = '';
I tried putting my venue_title field value (the room name) into the className field, but couldn’t see that data being passed through anywhere.  What exactly does that piece of code do?  The comment is a little ambiguous.  If I could pass the room into the CSS somehow, I could use CSS to align the items horizontally almost like columns, I think.  Can you help?

BTW, I was able to get the calendar to display my events which were created without the use of the recurring events manager by spoofing the start and end dates of my events to today and modifying the query so it only pulls the current quarter of classes.


Josh

  • Support Staff

May 6, 2013 at 8:57 am

Hi there,

If you look further down in the code you’ll see that the className and eventType get assigned category details if the event is assigned to a category. This allow for the events with different categories to display with different colors as set in each category’s settings.

The support post ‘Customize Calendar agendaDay view with Room Number column headers?’ 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