-
Notifications
You must be signed in to change notification settings - Fork 17
Admin Events Export Templates
Helios Calendar allows admin users to create and save custom export templates. Utilizing export templates admin users can store preconfigured export formats that can be quickly and repeatedly used for the custom export of event data.
Templates are listed in alphabetical order by Name. Beside each template are two icons.
- Edit Template - Click this icon to edit the template.
- Delete Template - Click this icon to delete the template.
To add a new template click the Add Template link above the available template list.
Once you have selected the template to edit, or chosen to add a new template, you can edit the following template settings.
- Name - Name of the template (used to identify the template when exporting events). Template Name should be unique and descriptive to more easily identify the template.
- File Extension - Event data can be output directly to the browser (viewed on screen) or saved directly to a file. The file extension determines what type of file should be created when output is saved to a file.
- Sort Order - The order to sort events by. Depending on the variables used within the template this setting may need to be adjusted.
- Group By - In most cases this option should be set to Event, or export results will be redundant. However, by selecting from the following options templates can be specialized for a variety of uses.
- Category - Select this option to creating a template that will use [category_unique] to output events by category.
- Event Series - Select this option ONLY if the template uses the [date_series] variable. [date_series] variable will be NULL with all other Group By options.
- Category & Event Series - Select this option to use [category_unique] and [date_series] to output events with date series by category.
- Date Format - Format for event dates in the exported data. (Preview in Parentheses)
- Long Date - Date Output Format string from Preferences.
- Short Date - Date Input Format option from Preferences.
- Associated Press Style - Date format set forth in the AP Style Guide.
By default Helios Calendar includes the Year in event dates when using the AP Style setting. To disable this and remove year data from your export you can make the following change.
In /admin/components/TemplatesEdit.php
locate the following code on or near line 77:
stampToDateAP(date("Y-m-d"),1)
and change it to:
stampToDateAP(date("Y-m-d"),0)
In /admin/components/ToolExportAction.php
locate the following code on or near line 208:
stampToDateAP($row[$expVars[$i]['field']],1)
and change it to:
stampToDateAP($row[$expVars[$i]['field']],0)
This will remove the year from the exported data.
Each template permits the use of special text that serves as a place holder for different types of event content. When exported template variable will be replaced within the output by the event data exported from Helios Calendar.
- |N - (Pipe character, capital N) Force Line Break
- [event_id] - Unique ID for the event. Assigned by Helios Calendar when the event is added or submitted.
- [event_title] - The event title.
- [event_desc] - The event description. Including all HTML and JavaScript tags. For cleaned event description (text only, no tags) please use [desc_notags] variable.
- [event_date] - The date of the event.
- [event_time_start] - The event start time.
- [event_time_end] - The event end time.
- [event_cost] - The event cost.
- [event_billboard] - Event billboard status (1 for billboard events, 0 for regular events).
- [contact_name] - Name of event contact.
- [contact_email] - Email address of event contact.
- [contact_phone] - Telephone number of event contact.
- [contact_url] - Website address (URL) of event contact.
- [space] - Registration limit for event.
- [loc_name] - Name of the location.
- [loc_address] - Address of the location.
- [loc_address2] - Address “line 2” of the location. (Suite, Office, PO Box, etc).
- [loc_city] - City of the location.
- [loc_region] - Region of the location. (State, Province, etc)
- [loc_postal] - Postal code of the location. (“Zip Code”)
- [loc_country] - Country of the location.
- [loc_url] - Website address (URL) of the location.
Note: Saved Location data takes precedent.
- [date_series] - The first and last date of the event series (for recurring events).
- [date_unique] - Exports event date only when it changes in the results set (for exporting events by date).
- [category_unique] - Exports event category only when it changes in the results set (for exporting events by category).
- [desc_notags] - “Filtered” event description. Tags, HTML & JavaScript source removed.
Note: The use of these variables, with exception to [desc_notags] , is dependent on template settings detailed above.
- [cal_url] - Website address (URL) of your public Helios Calendar site (CalRoot global).
A template consists of three distinct sections.
The beginning section of the template will be added once to the start of the exported data. The header is optional and can be used as needed.
The content section makes up the bulk of the export output. This portion of the template is populated with exported event data.
The final section of the template will be added once to the end of the exported data. The footer is optional and can be used as needed.
Helios Calendar includes the following sample templates by default:
- InDesign - Two samples (By Category & By Date) for a custom InDesign even data import.
- Quark - For a custom Quark event data import.
- CSV All Variables - Exports event data using all available template variables in CSV format.
- CSV Import Format - Exports event data matching Helios' required CSV input format.
- XML File - An example of one possible XML file creation via event export.
While these templates by no means represent the full capabilities of the export system they do provide an excellent starting point to sample the variety of export types possible.
All events are not created equal. Because events can contain varying amounts of data, and the template is merely a framework for export, Helios Calendar includes an optional clean up process to remove unwanted content from the completed export. This clean up is performed based on the template's preset clean up entries.
After completing the export Helios compares clean up entries to the export it has built. The export has all occurrences of the clean up entries removed before it is output to the user's browser or download file. This cleanup process helps to minimize the “massaging” required in order to make the export work correctly with whatever process, software, script, etc that the export is destined for.
Note: The clean up process performs matches exactly, and is case sensitive, so all potential cases should be included in the clean up section of the template.
Null, invalid or otherwise empty data fields are exported as “BLANK” (without quotes). To remove this “blank” data from the export all new templates are created with “BLANK” (without quotes) as a default clean up entry. By exporting empty data fields as BLANK Helios Calendar allows for the clean up any custom formatting from the export.
Note: Clean up entries must each be entered on a new line within the template edit form. Entries are case sensitive and blank export values are always explicitly “BLANK” (without quotes).
Ex) This example references a sample template included with Helios Calendar.
If our template content is:
|N
##[date_unique]|N
##[category_unique]|N
[event_title]. [event_time_start]. [loc_name], [loc_address], [loc_city]. [desc_notags] [contact_url] [event_cost]
and we want to ensure that any blank category and date lines were removed from the export, and a blank line isn't forced, we would add:
##BLANK|N
Likewise we can also ensure that any blank Title, Start Time, Location Name or Location City data did not result in stray periods or comas in the exported data by adding:
BLANK,
BLANK.
By preceding these entries with a space we can also ensure the proper space between fields for each export record is maintained. Finally, we can ensure that any blank Descriptions, Contact URLs or Cost fields were filtered by adding:
BLANK
By customizing the clean up entries for your unique templates you can ensure a more streamlined export process.
Events
- Adding Events
- Editing Events
- Recycling Events
- Deleting Events
- Pending Events
- Billboard Events
- Orphan Events
- Event Search
- Event Series
- Category Management
Locations
Administration
- Adding Admin Users
- Editing Admin Users
- Change Admin Password
- Manage Users
- Manage Database
- Reports
- Event Import
- Event Export
- Export Templates
Newsletters
- Newsletter Overview
- Sending Newsletters
- Newsletter Templates
- Compose Draft
- Create Newsletter
- Newsletter Queue
- Manage Subscribers
- Subscriber Groups
- Email Guildelines
Publishing
Customization
- Integration
- Weather/Map Links
- Calendar Digest
- Preferences
- API Settings
- API Registration
- Translation
- Localization
- Meta Settings & SEO
Themes
- Themes Overview
- Themes Settings
- Custom Theme Functions
- Creating Themes
- Creating Hacks
- Upgrade-proofing
API
Technical
- Setup
- Upgrading
- Upgrading from 1.x
- Server Requirements
- Browser Compatibility
- Search Engines & SEO
- CAPTCHA
About