Extension:CategoryGallery
Jump to navigation
Jump to search
![]() | This extension is currently not actively maintained! Although it may still work, any bug reports or feature requests will more than likely be ignored. |
CategoryGallery Release status: unmaintained |
|
---|---|
![]() |
|
Implementation | Tag |
Description | Allows to create a gallery of all images in a category |
Author(s) | Nathan Larson (Leucostictetalk) |
Latest version | 1.0.1 (2013-10-29) |
MediaWiki | 1.21+ |
PHP | 5+ |
Database changes | No |
License | GNU General Public License 2.0 |
Download | GitHub: Note: |
* <categorygallery> |
|
The CategoryGallery extension implements a <categorygallery> tag creating a gallery of all images in a category.
Installation[edit]
- Download and place the file(s) in a directory called
CategoryGallery
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php:
require_once "$IP/extensions/CategoryGallery/CategoryGallery.php";
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Usage[edit]
If you want to show a gallery of all images in category Foo, do this:
<categorygallery cat="foo"/>
You can abbreviate it as catgallery:
<catgallery cat="foo"/>
The categorygallery tag itself takes several additional parameters, specified as attribute name-value pairs:
<catgallery {parameters}/>
caption="{caption}"
: (caption text between double quotes for more than a word) sets a caption centered atop the gallery.widths={width}px
: sets the widths of the images, default 120px. Note the plural, widthsheights={heights}px
: sets the (max) heights of the images.perrow={integer}
: sets the number of images per row. 0 means automatically adjust based on width of screenshowfilename={anything}
: Show the filenames of the images in the individual captions for each image (1.17+)bdpcaption={property}
: Show the metadata of the images in the individual captions for each image (requires Extension:BedellPenDragon)
To see how to use this extension with Extension:BedellPenDragon to generate a CategoryGallery with captions generated from image description files, see Extension:BedellPenDragon#CategoryGallery with captions generated from image description files (requires CategoryGallery extension).
See also[edit]
- Extension:BedellPenDragon — Enables this extension to get captions from image description pages
- Extension:DynamicPageList_(Wikimedia)#mode.3Dgallery
- Extension:RandomImageByCategory