Extension:Snippet

The Snippet extension adds a simple API parameter 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".

Snippet uses only 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.

Example
A live example of Snippet can be seen at http://brickset.com on any of their pages. Brickset uses Brickimedia's Snippet API by displaying text from Brickipedia on the right-hand sidebar of any product page. This can be seen in an example found here by scrolling down to the sidebar module labeled "Brickipedia".