Trumba custom field add-on

This addon allows one to choose and display non-ics standard trumba custom fields.   It is has been tested with a variety of trumba ics files with custom fields.  It caters for those fields already found in various users custom trumba ics files.

It may require some editing if your desired custom fields are not in the examples.  There are instructions for this and the areas to be modified are commented as such.  Some example formatting functions are included.

This addon will also map the X-TRUMBA-LINK to the ics event url IF the event url has not been populated.  This is useful!

The following X-TRUMBA-CUSTOMFIELD custom fields have been allowed for in version 1.1.

  • ‘Contact Name’,   // this gets copied to the proper ics organiser if there is no organiser
  • ‘Event Type’,
  • ‘Region’,
  • ‘Registration’,
  • ‘Artist/event website’,
  • ‘Cost’,
  • ‘Age’,
  • ‘Age range’,
  • ‘Venue address’,
  • ‘Venue Location’,
  • ‘Venue website’,
  • ‘Event Location’,
  • ‘Event image’,  // formatted as an image
  • ‘Schedule’

Now at version 1.1.

Extensions or custom components or properties in .ics files

Normally it is possible to allow for some custom fields directly in the plugin.  Various calendar apps have these ‘extensions’.   Where necessary the amr-plugins does specifcally cater for these extensions, such as:

  • X-WR-CALNAME – The display name of the calendar
  • X-MICROSOFT-CDO-ALLDAYEVENT – Microsoft Outlook all day event flag

Trumba Complexities:

Trumba is a calendar service that issues .ics calendar files.  It allows it’s users to create custom fields that can appear in the ics file.   These are not normally understood or displayed by most calendar applications.    Display of these custom fields is not straightforward due to Trumba’s  nonstandard ics implementation.

  • The X-TRUMBA-CUSTOMFIELD does not follow RFC 5545 specifications for custom fields.  The field should be for one concept, as per the examples above.
  • Trumba’s parameters do not follow the standard either.  It use ‘NAME’ instead of ‘X-NAME’.  Not particularly a problem – some ics validators may spit at it.
  • Arguably many of the custom event properties that users have created in Trumba could and possibly should have been mapped to standard .ics properties so that they could be universally used in multiple calendar applications.   RFC 5545 already allows for many useful possibilities. (Organisers, Different attendee types eith text names, emails, etc, locations, urls, alternate text representations, attachments of all kinds etc).  If at all possible, try to use these instead.
  • Custom fields will not be shown in many calendar applications unless the application specifically caters for them.  In Trumba’s case this is made almost impossible as each user can create their own fields, so each ics file can have it’s own variations of the custom field. For example:
    • X-TRUMBA-CUSTOMFIELD;NAME=”Event Type”;ID=21;TYPE=Number:Contains all Custom Field Types
      // why not use standard ics CATEGORIES rather ?
    • X-TRUMBA-CUSTOMFIELD;NAME=”my multiple lines of text”;ID=12296;TYPE=MultiLine:This is line 1\nThis is line 2
      // why not use the standard description fields ? then they will be visible.
    • X-TRUMBA-CUSTOMFIELD;NAME=”my web link”;ID=12301;TYPE=Url:http://www.trumba.com/calendars/icstest
      // why not use the standard URL for the event
      // or if for a contact / organiser, use the standard fields for those or link to a vcard? eg:
      CONTACT:Jim Dolittle\, ABC Industries\, +1-919-555-1234
      CONTACT;ALTREP=”CID:part3.msg970930T083000SILVER@example.com”:
      Jim Dolittle\, ABC Industries\, +1-919-555-1234
      ORGANIZER;CN=JohnSmith:mailto:jsmith@example.com
    • X-TRUMBA-CUSTOMFIELD;NAME=”my email address”;ID=12302;TYPE=Email:sales@corp.trumba.com
      // why not use the standard organiser field?

Implementation

Since any trumba ics file may have it’s own trumba extensions or custom fields, any code to parse and process these fields has to be unique to each calendar file.   To enable this possibility, wordpress filters were added to the amr-ical-events-list plugin code to enable site specific customisation without compromising upgrade ability.   A working example plugin has been coded using the calendar file available on this ics link http://www.trumba.com/calendars/brisbanes-calendar-venues-calendar.ics

Instructions

  • Purchase access to the add-on plugin. Download, unzip.
  • Edit it.  Find the line near the top that has the comment ATTENTION.
  • Inspect your trumba ics file (using a plain text editor like notepad).  Note your trumba custom field names or extensions.
  • Cut and paste the names exactly into the $trumba_fields array list (see screenshots below).  Save  the plugin file.
  • Place plugin files in your wordpress plugin folders
  • Activate the plugin (check no syntax etc errors have been introduced!). If you made a whoopsy.. fix it and reload, try activate again.
  • Go to your settings page for amr-ical-events-list listtypes.  Open up the “Specify fields..”
  • The trumba names you added should be listed.
  • Specify the column and the order you’d like them to appear in.
  • Update config.
  • Go to or create your calendar page where you are using your trumba ics file. Refresh.

Optional:

The amr-ical-events-list plugin allows you to create custom formatting routines if you have any unusual formatting requirements for any of your trumba fields.  Simply add a function to the code, and the plugin will pick it up:

function amr_format_trumbafieldname ($content) {
// format the content into html
return ($html);
}

Purchase access or download

Existing active members will have access to this add-on.  If you are only using amr-ical-events-list (free version) and want to display your trumba fields. You can purchase access to just this download.

update pending…

Screenshots

Example of Trumba .ics file:

trumba ics file example
what the trumba properties look like in the ics file

The code to edit to add your trumba fields:

trumba update the add-on code
Add your trumba names to the code, overwriting the others

Your trumba fields magically appear in the settings

trumba_listtype10
If you have edited correctly, your trumba custom fields should now be available for you to use in your calendar listings

Your trumba fields in the testing listtype.  The testing listtype lists all available fields with their lable.  Of course in your list, you would either not lable or have your own lables.

Trumba in the 'testing" listtype 1
Trumba in the ‘testing” listtype 10