Integrate data from your CIOC Applications into a WordPress or Joomla site using the CIOC CMS plug-ins.
Below is documentation for configuring WordPress shortcodes for the Volunteer Opportunities Feed Plug-in. In addition to the included reference, the Online Resources Software includes a built-in shortcode generator tool to facilitate easy creation of shortcodes.
It is strongly recommended that these plugins be installed through a search of plugins available from WordPress.org. To find the plugins, simply click "Add New" plugin and then search for "CIOC". The WordPress Plug-ins are available as a manual install by downloading the appropriate zip file(s) from the project repository, but this makes updates more challenging and is not recommended. To manually install, use the Upload Plugin option from within WordPress to install the zip file, then Activate the plug-in to begin using it. Information on manual plug-in installation is available from codex.wordpress.org/Managing_Plugins
To use the plug-in, you must have an active API Key from the target database. A Super User in the target Online Resources database can configure a new API Key by going to:
Best Practices for configuring API Keys:
The following section outlines the options available for customizing the shortcodes for this plug-in. However, the easiest way to accurately configure a shortcode is by using the shortcode generator available from the target Online Resources database. You must already have an API Key to use the shortcode generator tool.
Make life easier for partners you are sending an API Key to with a link that already includes their Key:
Once the plug-in has been installed and you have been given an API Key, you can get started displaying data in your WordPress site. Below is an example of the basic shortcode that you can place on any Page or Post in your site; subsitute your own API Key (e.g. key="01234567-89AB-CDEF-0123-456789ABCDEF"
) and the URL of the target CIOC Online Resources database (e.g. url="https://test.cioc.ca"
). The order in which the shortcode options occur does not matter.
If no other settings are provided, "Newest Records" is chosen as the default listing type (see Listing Type information below).
The language of records requested will default to whatever is the default for the site URL you provided. To explicitly change to another language, use ln="en-CA"
(English), ln="fr-CA
(French), etc.
Whenever possible, use a URL for the target database that already goes to the View (Portal) for records that you want to use. If a special URL is not available, you can switch to a different View # using viewtype="123"
where 123 is the View ID number. You cannot switch to Views that are not public.
This is the default listing type. You can choose it explicitly using type="newest"
, but it is not necessary. By default, the newest 5 records are shown and include
the title of the Position, the posting Agency,
the update or creation date, and link to the record in the source database is provided.
Retrieve a list of the top 9 categories for Volunteer Opportunity postings ("Areas of Interest" in the Online Resources software) using type="popular_interests"
. Categories show a count of current Opportunities in that category, and link to a search to retrieve the list of Opportunities in the target Online Resources database.
Retrieve a list of the top 9 posting Agencies (organizations) with new or popular Volunteer Opportunity postings using type="popular_orgs"
. The list of Agencies will include the number of current Opportunities they have, and link to a search to retrieve the list of Opportunities for that Agency in the target Online Resources database.
To list up to 30 Opportunities from a specific organization, you must have the Record Number ("NUM") of the posting Agency (organization) from the Online Resources database. Use type="org"
and num="AAA1111"
(where AAA1111 is the Record Number).
To list up to 30 Opportunities that fall under a specific category ("Area of Interest") you must have the special Code for that category - the name will not work. Super Users in the Online Resources can find the Code listing, or change the Codes for each Area of Interest, from Setup > Classification Systems > Specific Areas of Interest. If the database is using the standard list of Categories, the Code can be found from the Open Data Listing of Interests
You can add additional fields to your list display by adding any or all of the following shortcode options:
location="on"
duties="on"
The name of the posting Agency is shown by default. Turn this off using org="off"
.
There are several options available to help you style your list. You can use any combination of these options, or none.
Don't know anything about HTML or CSS? Add the style_me="on"
option to benefit from some pre-defined styles.
Do you want to be very specific about how the list is styled, to match your existing site? Trying using one of the following...
list_id="name-of-your-id"
. This allows you to change the style of one specific instance of the list.list_class="name-of-your-class"
. This allows you to change the style of all instances of similar lists, for consistent formatting.If your WordPress site includes the FontAwesome Icon Library, you can further style your list through the use of icons that will appear next to each included field. Turn on icons using has_fa="on"
.
Icons used include:
The name of the posting Agency is shown by default. Turn this off using org="off"
.
If you are testing out your Plug-in, you can use
debug="on"
to be provided with a direct link to the JSON data provided by the API
using the current settings. This will also allow you to view any error
messages coming from the API.