Commons:Wikimedians map/Usage on an other wiki

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Step 1 : Import[edit]

To start, import (or ask someone which has the rights to do it, typically a sysop) the following pages from frwiki:

  • Template:Wikimedians map
  • Module:Wikimedians map

Check that the interwikis are correctly set via wikidata, otherwise if an update occurs it will not be applied to your wiki.


Step 2 : Gadget / User script[edit]

In order for the contributors of your wiki to be able to add themselves to the map, you must also import the Javascript script. Two options:

  • Propose it as a "gadget" (needs sysop rights, or to request the help of one)
    Create on your wiki the page MediaWiki:Gadget-WhereWikimediansLive.js and past in it the two following lines:
    mw.loader.load( 'https://fr.wikipedia.org/w/index.php?title=MediaWiki:Gadget-WhereWikimediansLive.css&action=raw&ctype=text/css', 'text/css' );
    mw.loader.load( 'https://fr.wikipedia.org/w/index.php?title=MediaWiki:Gadget-WhereWikimediansLive.js&action=raw&ctype=text/javascript' );
    Then edit the page Mediawiki:Gadgets-definition on your wiki and add somewhere the line:
    * WhereWikimediansLive [ResourceLoader|targets=desktop,mobile|dependencies=ext.kartographer.box,oojs-ui,mediawiki.api.edit] | WhereWikimediansLive.js
  • Or (does not require sysop rights but more complicated for the end users) ask to the contributors to add in their common.js the two following lines:
    mw.loader.load( 'https://fr.wikipedia.org/w/index.php?title=MediaWiki:Gadget-WhereWikimediansLive.css&action=raw&ctype=text/css', 'text/css' );
    mw.loader.load( 'https://fr.wikipedia.org/w/index.php?title=MediaWiki:Gadget-WhereWikimediansLive.js&action=raw&ctype=text/javascript' );


Step 3 : Setup a dedicated page[edit]

We recommend to have a page dedicated for this map. Copy the code of the original page on frwiki and adapt it to your wiki. Although the final choice of the design belongs to you, it would be appreciable to keep elements in common, for example the logo.

The template {{Wikimedians map}} which displays the map offers several filtering options, feel free to choose the one which best correspond to your wiki:

  • {{Wikimedians map|lang=fr}} displays all the contributors of a french-speaking wiki;
  • {{Wikimedians map|project=wiktionary}} displays all the contributors of a Wiktionary, regardless of the language (this parameter require the project's code, see Special:SiteMatrix if you don't know it for your wiki);
  • {{Wikimedians map|site=dewikisource}} displays only the contributors of the given wiki (see Special:SiteMatrix to get the code of your wiki).

Note: Only one of these three parameters can be used per model. However it is possible to specify for each of them several values, separated by commas. For exemple: {{Wikimedians map|lang=fr,de,it}} will display the contributors which contribute to a French-speaking, an Italian-speaking on a German-speaking wiki.

You can customize the location of the gadget buttons by placing <div id="wwl-buttons"></div> where you want them to be. Otherwise, they will be placed directly under the map.

The text between <div id="wwl-defaulttext"> and </div> will only be visible to people who have not yet activated the gadget, while the text between <div id="wwl-gadgettext" style="display: none;"> and </div> will only be displayed after the gadget is enabled. You can use this mechanism to explain first to end users how to enable the script (depending of your choice in the step 2), and then how to use it.


(optional) Step 4 : Translation[edit]

The gadget is currently only available in English and French. To translate it into your language, retrieve the English texts on fr:MediaWiki:Gadget-WhereWikimediansLive.js (lines 14 to 34), translate them into your language, and submit it on the associated talk page.