Currently, the WordPress Plug-ins are available only through manual install by downloading the appropriate zip file(s) from the project repository. 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
This plug-in works against the CIOC Remote Search and Details API. Many settings, including the fields and data avaialble, are determined by the API setup and not the WordPress plugin. Please access the documentation for the CIOC Remote Search and Details API for information on customizing data sets, fields, record details pages, and so on.
To use the plug-in, you must have an active API ID from the target database connected to an account with permissions to access the "CIOC Remote Search and Details API" (this setting is part of the User Type in CIOC). The CIOC User account with permissions for the API can sign into CIOC to generate an API ID/Password pair for each site. Click on your user name in the top site-bar menu to access the My Account page.
Best Practices for configuring API IDs:
After installing the plug-in, you should access the CIOC API Settings withing WordPress to configure the database URL, API ID and Password.
The only mandatory settings are:
https://test.cioc.ca
)Each time you load the Settings page, including after submitting changes, the plug-in attempts to verify your settings by testing a basic login. Always look for a green success message at the top of the Settings page.
The Plug-in requires access to the FontAwesome font library and a small portion of the BootStrap library. If you already include these libraries, you may choose to block the plug-in from adding them.
If you wish to be able to display a Google Map of record address on your record details pages, you must register for a Google Maps API Key for your site and add it to the Settings. Information about obtaining a key can be found here.
Once the plug-in has been installed, and you have configured your settings with your CIOC API ID and Password, you can get started displaying data in your WordPress site. The following section outlines the options available for customizing the shortcodes for this plug-in. For reference, WordPress shortcodes follow a pattern such as [shortcode attribute1="value 1" attribute2="value 2"]
.
All Shortcodes described in later sections include the ability to change the default View or Language using two standard attributes.
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 the CIOC Account tied to the API ID cannot access..
The Count All shortcode provides a total count of all records in the current View/Language. Access this shortcode with:
This shortcode generates a list of categories with an optional count and a link to execute a search based on that category. By default, this page will list whatever categories are part of the current View's "Quick List". Access this shortcode with:
You can customize this shortcode with the following attributes:
quicklist="PUBCODE"
- to show a specific list of General Headings, where PUBCODE is a Publication Code with General Headings that the API User has permission to access.ciocresults="on"
- to make the target search results page be the source CIOC websitetargetresults="URL"
- provide a full URL (including http:// or https://) to a page that can respond to CIOC search results. This may be another page on your WordPress site with the Search Results shortcode, but it could also be an external site.count="off"
- by default, a count for each category is included, and zero-count categories are suppressed. You may choose to turn off the count of records next to each category; please note that this also removes the ability to filter out zero-result categories.Access this shortcode with:
You can customize this shortcode with the following attributes:
ciocresults="on"
- to make the target search results page be the source CIOC websitetargetresults="URL"
- provide a full URL (including http:// or https://) to a page that can respond to CIOC search results. This may be another page on your WordPress site with the Search Results shortcode, but it could also be an external site.keywords="off"
- to disable the keyword search boxagegroup="on"
- to include a drop-down list of age groupsquicklist="DEFAULT|PUBCODE"
- send the value DEFAULT to include the View's default Quicklist. Send a specific Publication Code to display the General Headings for that Publication.community="off"
- to disable the search by community drop-downlimitcmtype="L|S"
- optional, to pre-set the drop-down to limit by either Located in Community (L) or Serving Community (S)cmprompunfilled="on"
- optional, prompt the user to choose a community if they attempt to search without providing one.shortplaceholder="on"
- for very narrow search forms, use placeholder text that is more brief.clearbutton="on"
- add a "clear" button; this button will blank out search forms on pages that display both search results and search forms (where the current search criteria is pre-set on the form).multiformid="#"
- if you have multiple search forms shortcodes on the same page, give each a number to ensure that clear buttons etc. work properly.If you need a more customized search form, you can generate your own form HTML and use shortcodes to generate specific elements such as drop-down lists and auto-suggest-ready keyword inputs.
Access this shortcode with:
You can customize this shortcode with the following attributes:
shortplaceholder="on"
- for very narrow search forms, use placeholder text that is more brief.Access this shortcode with:
You can customize this shortcode with the following attributes:
limitcmtype="on"
- for very narrow search forms, use placeholder text that is more brief.limitcmtype="L|S"
- optional, to pre-set the drop-down to limit by either Located in Community (L) or Serving Community (S)cmprompunfilled="on"
- optional, prompt the user to choose a community if they attempt to search without providing one.shortplaceholder="on"
- for very narrow search forms, use placeholder text that is more brief.Access this shortcode with:
You can customize this shortcode with the following attributes:
quicklist="DEFAULT|PUBCODE"
- send the value DEFAULT to include the View's default Quicklist. Send a specific Publication Code to display the General Headings for that Publication.shortplaceholder="on"
- for very narrow search forms, use placeholder text that is more brief.Access this shortcode with:
You can customize this shortcode with the following attributes:
quicklist="DEFAULT|PUBCODE"
- send the value DEFAULT to include the View's default Quicklist. Send a specific Publication Code to display the General Headings for that Publication.buttonclass="..."
- optional, provide css classes to apply to the "buttons".gridclass="..."
- bootstrap column classes indicating how many buttons across on the page at different screen sizes (e.g. "col-sm-6 col-md-4" does 2 across at small screen size, and 3 across for medium and larger screens).Access this shortcode with:
You can customize this shortcode with the following attributes:
shortplaceholder="on"
- for very narrow search forms, use placeholder text that is more brief.Access this shortcode with:
You can customize this shortcode with the following attributes:
dosearch="on"
- for use when there is a search form on the same page as the search result, prevents a warning message about no search criteria when first visiting the page.ciocdetails="on"
- to make the target record details page be the source CIOC websitetargetdetails="URL"
- provide a full URL (including http:// or https://) to a page that can respond to a num=ABC1234 parameter (where ABC1234 is the record number). This may be another page on your WordPress site with the Record Details shortcode, but it could also be an external site.nolink="on"
- if you include several key contact fields in a simple listing of records, you may choose not to provide any link at all to the full record details.nocount="on"
- turn off the display of the number of search results returnedsterms="search terms"
- prefilter the results with specific search terms; this setting causes any incoming keyword search terms ot be ignoredstype="A|S|O|T"
- optionally preset the search term keywords to a specific type of search such as Anywhere (A), Subjects (S), Organization Names (O), or Taxonomy (T); default is Anywherepubcode="PUBCODE"
- prefliter the results to a specific publication; this setting causes any incoming publication search to be ignoredAccess this shortcode with:
By default, this shortcode responds to a URL parameter to the current page containing a specific record number. For example if the page with the shortcode was http://mywordpresssite.com/record/, a specific number could be sent to that page with http://mywordpresssite.com/record/?num=ABC1234
(where ABC1234 is the record number). This empty shortcode is how you can create a target detail page for search results.
If you would like to always display a specific record, add the shortcode attribute num="ABC1234"
(where ABC1234 is the record number).