Integrating your own Events Table

How Can We Help?
Categories

We don’t force you to use our events table, or any of our schema for that matter. The soSIMPLE Calendar Add-on was designed to be easily integrated with your own data.

This article describes how to change the table where your calendar events should come from.

  1. soSIMPLE Calendar Actions script (starting near line 14)
    1. Change the variable $data_layout_name to match the layout name that you will use for finding and editing your events in the background.
    2. (optionally) change the variable $entry_layout_name to match the name of the layout you want to see when you open an event. Leave it the way it is if you will only be using one layout for both purposes.
    3. Change the variable $field_names to match your field names. There are a lot of field names in there – if you don’t use one, just set that field variable to a blank a blank string (“”). You must use the following fields:
      • $date_start_field
      • $date_end_field
      • $time_start_field
      • $time_end_field
      • $event_id_field ( must be unique )
      • $event_details_field
      • $show_only_field
      • $tooltip_field
  2. soS Recurrences Create Update script
    1. The same 3 lines can be copied from the soSIMPLE Calendar Actions script in this script, staring around line 12.

That’s it! Now your calendar will show and edit the events from your events table.


More information:

These two scripts use indirection throughout, so that you don’t have to change all the field names and layout names throughout the script. You just change this information at the top of the script, and the rest of the script will use the script steps, “Go to Layout” by name and “Set Field by Name.”

If you change the name of the layout, you will have to change it in these two scripts.

Why two layouts?

We give you the option of using two layouts because your data entry layout may have more information on it than you need, or you may have script triggers that get in the way of doing simple searches.

By default, $data_layout_name is used to (1) find events to show on the calendar and (2) edit existing events when you drag them on the calendar (done off-screen so you don’t see it).

Also by default, $entry_layout_name is used to (1) open events when you double-click them and (2) when creating new events.

When setting $field_names, use the GetFieldName() function as shown, or use a fully-qualified field name in the format TOC::FIELD.

You are also not tied to this mechanism. You can edit this script however you’d like for your purposes. This is just a good starting point.

See article about the soSIMPLE Calendar Actions script for more information.

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?