Extension:SMW InlineQueryParserFunction

This extension is obsolete! Version 1.0 of the Semantic MediaWiki extension provides a proper parser function.

SMW_InlineQueryParserFunction adds a parser function called   which is the logical equivalent to Semantic MediaWiki's inline query extension tag called &lt;ask&gt;


 * Project Homepage: SMW_InlineQueryParserFunction Extension - Jimbojw.com
 * Source Code: SMW_InlineQueryParserFunction.php
 * Licensing: SMW_InlineQueryParserFunction is tentatively released under The MIT License.

Installation

 * 1) Download SMW_InlineQueryParserFunction, and be sure to rename the downloaded file to SMW_InlineQueryParserFunction.php.
 * 2) Drop this script in $IP/extensions
 * Note: $IP is your MediaWiki install dir.
 * 1) Enable the extension by adding this line to your LocalSettings.php: require_once('extensions/SMW_InlineQueryParserFunction.php');
 * Note: Make sure this appears later in LocalSettings than the include_once call which enables Semantic MediaWiki itself!

Usage
Once installed, you (or editors of your wiki) may perform Semantic inline queries in parser function form.

Example
To query for an unordered list of results in extension tag form, you might do this: some relation to::Some Page

The equivalent parser function form is this: -or-

If the text of the query would contain an '=' sign, then the text portion should be prepended with 'query='.

For example, this extension tag query: located in::Africa Population:=*

Would fail due to the '=' sign in the Population clause if it were to be specified like this:

However, it should work just fine if specified like this:

Technical Details
A sizable chunk of the Semantic MediaWiki code surrounding the processing of Inline Queries was duplicated to create this extension to avoid modifying the SMW core.

Ideally, these changes would be integrated directly into a future release of the extension since they're passive regarding existing functionality.