Extension:Snippet

The Snippet extension adds a simple module to the MediaWiki action API to get a Snippet of text from a search's first result.

Usage
Snippet works by using a search to provide text from the best match to a snippet query on the wiki. An example of this can be seen by querying Snippet for "70810" yet it shows content from this page, since it is the best match in the search for "70810".

takes one API parameter, :
 * – where $1 is the string to be queried for a text snippet.

Configuration
Snippet offers one configuration variable:
 * – the numeral value of how many characters to display in a Snippet query, e.g. setting the variable to 600 (default) displays 600 characters. Note: Snippet will automatically cut off at the closest period to the MaxLength, therefore it will not cut off mid-sentence or mid-word.