CIOC Volunteer Opportunities Feed Plug-in Reference

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.

Learn More About CIOC CMS Plug-ins »

This documentation is for the following versions: Please ensure you are using the most up-to-date version of the plug-in.

Contents

Installing the Plug-in

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

The code repositories for this project are available at:

Obtaining an API Key

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:

Setup > APIs, Sharing, and Export > Basic Data Feed API Keys

Best Practices for configuring API Keys:

Shortcode Reference

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.

Access the shortcode generator for your site at https://yoursite.cioc.ca/shortcodes

Make life easier for partners you are sending an API Key to with a link that already includes their Key:

https://yoursite.cioc.ca/shortcodes?key=01234567-89AB-CDEF-0123-456789ABCDEF (Substitute your Key)

The Basic Shortcode

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.

[ciocvolunteer url="https://test.cioc.ca" key="01234567-89AB-CDEF-0123-456789ABCDEF" ]

If no other settings are provided, "Newest Records" is chosen as the default listing type (see Listing Type information below).

Changing the View or Language

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.

Choosing the Listing Type

Newest Records

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.

[ciocvolunteer url="https://test.cioc.ca" key="01234567-89AB-CDEF-0123-456789ABCDEF" type="newest" ]

Popular Categories

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.

[ciocvolunteer url="https://test.cioc.ca" key="01234567-89AB-CDEF-0123-456789ABCDEF" type="popular_interests" ]

Popular Organizations

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.

[ciocvolunteer url="https://test.cioc.ca" key="01234567-89AB-CDEF-0123-456789ABCDEF" type="popular_orgs" ]

Specific Organanization

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).

[ciocvolunteer url="https://test.cioc.ca" key="01234567-89AB-CDEF-0123-456789ABCDEF" type="org" num="ABC0123" ]

Specific Category

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

[ciocvolunteer url="https://test.cioc.ca" key="01234567-89AB-CDEF-0123-456789ABCDEF" type="interest" code="ADVOCACY" ]

Choosing the Fields to Display

You can add additional fields to your list display by adding any or all of the following shortcode options:

The name of the posting Agency is shown by default. Turn this off using org="off".

Styling the List

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.

[ciocvolunteer url="https://test.cioc.ca" key="01234567-89AB-CDEF-0123-456789ABCDEF" style_me="on" ]

Do you want to be very specific about how the list is styled, to match your existing site? Trying using one of the following...

Note: the list may be a dl or ul depending on the Listing Type.

Enabling Icons

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".

Debug Mode (for Website Developers)

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.