Extension:RandomImagewithinCommons

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
Random Image within Commons

Release status:Extension status unmaintained

ImplementationTemplate:Extension#type Tag, Parser function
DescriptionTemplate:Extension#description Allows to display a randomized image per view including images that are stored at Creative Commons
Author(s)Template:Extension#username Thiemo Schuff (Starwhoopertalk)
Latest versionTemplate:Extension#version 2.3 beta build 20140916 (2014-09-16)
LicenseTemplate:Extension#license Creative Commons Attribution Share Alike 4.0
Download external storage
ExampleTemplate:Extension#example http://thwiki.org
ParametersTemplate:Extension#parameters
  • $wgriwc['size'];
TagsTemplate:Extension#tags
image random

Translate the RandomImagewithinCommons extension if it is available at translatewiki.net

Check usage and version matrix.

The RandomImagewithinCommons extension allows to display a randomized image per view including images that are stored at Creative Commons.

Usage[edit]

Set tag <riwc />

Installation[edit]

  • Download, extract and place the file(s) in a directory called RandomImagewithinCommons in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/RandomImagewithinCommons/RandomImagewithinCommons.php";
    
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration[edit]

Use $wgriwc['size'] = '400px'; to set the default size to 400 pixel. If it not set, it will be displayed in 200 pixel width.

To ignore any picture, you can add in to the Category [[Category:riwc blacklist]] to put in on blacklist.

Version history[edit]

Version 1.0 beta on 2. August 2011
Version 2.0 from 14. June 2012
  • filter Namespace (use only normal Articles (namespace 0))
  • repace all DB Querys with Mediawiki wfGetDB function
  • the extension use the mediawiki own function to calculate the picture
Version 2.1 from 3. April 2014
  • go to Multilanguage
  • implement Ignorelist like $wgriwc['blacklist'] = array('x.svg', 'y.gif', 'z.jpg');
Version 2.2 from 30. August 2014
  • Use Catogorys instead of the blacklist array
Version 2.3 from 16. September 2014
  • optimize DB querys
  • Add link to Blacklist on Specialpage of Versions
next Version
  • skip images that are insert in Pages but not more exist
  • ...
further versions
  • fillup gallerys with random pictures (to create a picturewall)
  • Proptet text configurable over Special:AllMessages
  • Check if picture really exist (protect agians [[File:NONEXISTFILE.SAMPLE]])
  • option to consider only pictures from article, but omit from User Pages, Diskussion or similar