The new series of plugins (Version 2.1.6 and greater) feature a far more powerful administration system than the prior versions.
The new system allows the same code to be used throughout all plugins. This means that we need a common method of invoking the BMLT in all of these systems. Each system offers system-specific ways to invoke the BMLT instance, but we need something that will extend across all plugins, regardless of the CMS implementation.
The method we’ve chosen is to place either HTML comments (<!– … –>) in the HTML view of a page or article, or by using what is called in WordPress, “shortcodes.” These are keys, enclosed in brackets ([ … ]). We use double-brackets ([[ … ]]). The advantage of shortcodes, is that they resist filtering (many CMS plugins may strip the comments, or otherwise interfere with them), and can be entered in non-HTML display. The advantage of HTML comments, is that they are completely invisible to site visitors if, for some reason, the BMLT substitution is not made.
We don’t actually use the official WordPress shortcode API, as we need to use the same method across multiple CMS systems.
How it Works
The shortcode/comment is inserted into the page text/code. The BMLT plugin then scans the page content, and replaces the key (shortcode or comment) with the HTML generated by the BMLT instance.
It is possible to add extra information to the key, such as which settings to use, or even exact search criteria.
We will call these codes “keys.”
The Keys
There are eight basic keys that can be used in the BMLT pages (These can be any case. The selector is case-insensitive). One key (SIMPLE_SEARCH_LIST) is only available for WordPress:
- BMLT
- This creates a “classic” interactive BMLT instance, with the clickable map, Basic/Advanced tabs and text search.
- These must be used on a page (WordPress), as opposed to a post, and there can only be one of these per page. Additionally, it should be placed high on the page.
- An example of this shortcode is available on this page.
- It is possible to have multiple instances of this shortcode on one page, but styling is determined by the first instance.
- BMLT_SIMPLE
- This allows the inclusion of the “simple” output. The syntax of the parameters will be defined below.
- There can be multiple instances of this key on a page or post.
- An example of this shortcode is available on this page.
- It is possible to have multiple instances of this shortcode on one page, however, no styling is applied (it must be customized by you).
- BMLT_MOBILE
- If this is specified on a page, the fast mobile lookup will be displayed, if the client is a mobile device.
- It is recommended that this use the HTML comments, not the “shortcode” syntax, as the mobile redirect will not happen if the visitor is not using a mobile device to view the page.
- There should only be one of these per page or post, and it can be combined with the other keys. An example of this shorctcode can be seen on this page (We’re working on better examples).
- Only one of these shortcodes can be on a page.
- BMLT_CHANGES
- If this is specified on a page, the plugin will list changes. It is highly recommended that you do not specify this “empty.” Use date or Service body parameters to narrow the response. Otherwise, you are likely to get a very long response. The syntax for the parameters is given in this page.
- It is possible to have multiple instances of this shortcode on one page, however, no styling is applied (it must be customized by you).
- BMLT_MAP
- This is a new map search option. It does not require a Google Maps API key, and presents a fairly basic map search in a single page. It doesn’t have as many options as the “classic” (BMLT) search, but is much faster and easier to use. This only takes one parameter: The ID of the settings to which it applies.
- It is possible to have multiple instances of this shortcode on one page, but styling is determined by the first instance.
- BMLT_TABLE
- This displays a JavaScript-driven interactive table of meetings.
- You can read more about this shortcode here.
- It is possible to have multiple instances of this shortcode on one page, and each will allow individual styling.
- BMLT_QUICKSEARCH
- This displays a very fast JavaScript-driven interactive simple meeting search.
- You can read more about this shortcode here.
- It is possible to have multiple instances of this shortcode on one page, and each will allow individual styling.
- SIMPLE_SEARCH_LIST
- This creates a popup menu that will allow a “fast lookup” functionality. This works in conjunction with WordPress Custom Fields, so WordPress is the only CMS that supports this shortcode.
- There should only be one of these on a page or post.
- An example of this shortcode is available on this page.
Parameters
All keys can have parameters. These are supplied immediately after the key, in parentheses (). In the case of the BMLT, BMLT_MAP, BMLT_MOBILE and SIMPLE_SEARCH_LIST, the only parameter allowed is the settings ID for the setting that will be used by that key. In the case of the BMLT_SIMPLE code, you would place the “simple” API parameters (Described in this page). You can also add the settings ID, by separating them with “##-##“.