Extension:Semantic Gallery
From MediaWiki.org
|
Release status: beta |
|
|---|---|
| Implementation | Parser functions |
| Description | Adds a 'gallery' ouput format to Semantic MediaWiki's inline queries. |
| Author(s) | Rowan Rodrik van der Molen |
| Last Version | 0.3.1 |
| MediaWiki | 1.9.* or greater |
| License | GPL |
| Download | Download snapshot |
|
check usage (experimental) |
|
Semantic Gallery is an extension to create dynamic galleries on wikis that use the Semantic MediaWiki extension. The output is the same as when using MediaWiki's built-in <gallery> tag.
Contents |
[edit] Installation
This extension depends on Semantic MediaWiki because otherwise, what's the point?
You have so stick it (as a subdir called SemanticGallery) in your extensions directory and add the following line to your LocalSettings.php (after including the Semantic MediaWiki extension):
require_once("$IP/extensions/SemanticGallery/SemanticGallery.php");
[edit] Usage
This extension add a 'gallery' output format to SMW inline queries. To generate a simple gallery of all images in the 'Photographs' category, you could use the following:
{{#ask: [[Category:Photographs]] | format=gallery}}
Semantic Gallery also respects the following parameters (which mean the same as they do when using them with the <gallery> tag):
- perrow
- to define how many thumbnails are shown in each row of the gallery,
- heights
- to set the maximum height (in pixels) of the thumbnails, and
- widths
- to set the maximum width of each thumbnail.
[edit] Captions
The default caption is the image page title without the namespace. If you want, you can make the caption a property of that page:
{{#ask: [[Category:Photos]] | ?caption | format=gallery}}
See this page on the Timber Investments Wiki for a complete, working example.
[edit] Sites that use this extension
- Hardhoutbeleggingen Wiki - A Dutch-language wiki about hardwood investments. (Example page)
- Timber Investments Wiki - An English-language version of the same. (Example page)
[edit] To-do
- Do something intelligent when the inline query has no results.
- Do something intelligent when the inline query has more results than the "limit" parameter allows.