Support

Home Forums Event Espresso Premium Available properties in the event object on the calendar

Available properties in the event object on the calendar

Posted: May 31, 2013 at 2:41 pm

Viewing 4 reply threads


TFA

May 31, 2013 at 2:41 pm

What are the available properties in the event object? Didn’t see it in the docs.

In espresso-calendar.php line 440 – 827, seems like the

[code]jQuery(document).ready(function($) {[/code]

closing tag is commented out.


Josh

  • Support Staff

May 31, 2013 at 4:13 pm

Hi Kris,

Is this what you’re looking for:

http://arshaw.com/fullcalendar/docs/event_data/Event_Object/

I checked and in the copy of espresso-calendar.php I have line 827 is not commented out. Here’s what the current stable looks like on lines 827-829:

			});

</script>

If your copy has the closing tag commented out you might try downloading a fresh copy.


TFA

May 31, 2013 at 6:07 pm

thanks for the JS docs, would happen to have the object properties for the Event Espresso Event object as well? so I can grab the venue title.

as far as the espresso-calendar.php  i found an apostrophe on line 749 that doesn’t seem to belong, downloaded the latest version today, http://d.pr/i/wXvU

thats what was making my editor freak out


Josh

  • Support Staff

June 3, 2013 at 9:57 am

Hi Kris,

I checked and the venue tables aren’t being queried in the calendar add-on. This would take some custom development to get the venue titles to display in the calendar.

I downloaded a fresh copy of the calendar add-on and checked for an apostrophe on line 749. I’m not seeing an extra apostrophe there. I wonder if the editor that you’re using is adding it?


TFA

June 3, 2013 at 10:03 am

maybe that happened.

Heres the sql to get venue information passed into the event object in the  calendar

[code]

//Get all events
$type = ‘all’;

$sql = “SELECT e.*, ese.start_time, ese.end_time”;

if (isset($espresso_calendar[‘disable_categories’]) && $espresso_calendar[‘disable_categories’] == false) {
$sql .= “, c.category_meta, c.category_identifier, c.category_name, c.category_desc, c.display_desc “;
}
if ( isset($org_options[‘use_venue_manager’]) && $org_options[‘use_venue_manager’] == ‘Y’ ) {
$sql .= “, v.name venue_name, v.address venue_address, v.address2 venue_address2, v.city venue_city, v.state venue_state, v.zip venue_zip, v.country venue_country, v.meta venue_meta “;
}
$sql .= ” FROM ” . EVENTS_DETAIL_TABLE . ” e “;

if ( isset($org_options[‘use_venue_manager’]) && $org_options[‘use_venue_manager’] == ‘Y’ ) {
$sql .= ” LEFT JOIN ” . EVENTS_VENUE_REL_TABLE . ” vm ON vm.event_id = e.id LEFT JOIN ” . EVENTS_VENUE_TABLE . ” v ON v.id = vm.venue_id “;
}

$sql .= ” LEFT JOIN ” . EVENTS_START_END_TABLE . ” ese ON ese.event_id= e.id “;
if (isset($espresso_calendar[‘disable_categories’]) && $espresso_calendar[‘disable_categories’] == false) {
$sql .= ” LEFT JOIN ” . EVENTS_CATEGORY_REL_TABLE . ” r ON r.event_id = e.id “;
$sql .= ” LEFT JOIN ” . EVENTS_CATEGORY_TABLE . ” c ON c.id = r.cat_id “;
}
if ( function_exists(‘espresso_version’) ) {
if ( espresso_version() >= ‘3.2.P’ ) { // if we’re using ee 3.2+, is_active is true/false
$sql .= ” WHERE e.is_active != false “;
} else {
$sql .= ” WHERE e.is_active != ‘N’ “;
}
}
$sql .= ” AND e.event_status != ‘D’ “;//Deleted
$sql .= ” AND e.event_status != ‘S’ “;//Secondary/Waitlist
$sql .= ” AND e.event_status != ‘P’ “;//Pending
$sql .= ” AND e.event_status != ‘X’ “;
$sql .= ” AND e.event_status != ‘R’ “;//Draft
if ($show_expired == “false”) {
$sql .= ” AND e.start_date >= ‘” . date(‘Y-m-d’) . “‘ “;
$sql .= ” AND e.registration_start <= ‘” . date(‘Y-m-d’) . “‘ “;
$sql .= ” AND e.registration_end >= ‘” . date(‘Y-m-d’) . “‘ “;
}
}
$sql .= ” GROUP BY e.id ORDER BY e.start_date = ‘0000-00-00’ ASC ” . $throttle;

[/code]

Viewing 4 reply threads

The support post ‘Available properties in the event object on the 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