Difference between revisions of "User:Harry/Sandbox"

From Birocapedia
Jump to navigationJump to search
 
(21 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
[[File:Fall 2004.pdf]]
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
<googlemap version="0.9" lat="42.711618" lon="-73.205112">
 +
</googlemap>
 +
 +
<sgallery height="600" width="800" showinfopane="false">
 +
Image:IMG_0350.JPG
 +
Image:IMG_0351.JPG
 +
</sgallery>
 +
 +
 +
 
[[Image:Sound.ogg|thumb|noicon|One Too Many Mornings]]
 
[[Image:Sound.ogg|thumb|noicon|One Too Many Mornings]]
 
[[Image:Sound.ogg|thumb|One Too Many Mornings]]
 
[[Image:Sound.ogg|thumb|One Too Many Mornings]]
  
<gallery>
+
== Installing ImageAnnotator on another Wiki ==
File:IMG_0350.JPG
+
 
File:IMG_0351.JPG
+
Image notes are only visible when the ImageAnnotator gadget is installed and activated (either by default for all users, or the viewing user has the gadget enabled). This means that notes added here at the Commons are not visible at other Wikis unless the gadget is installed there, too.
File:IMG_0353.JPG
+
 
File:IMG_0354.JPG
+
=== Installing from scratch ===
File:IMG_0356.JPG
+
:'''Note''': if you want to upgrade an existing installation to the latest version, do ''not'' follow these steps. Follow the steps in the section "[[#Upgrading an installation|Upgrading an installation]]" below.
File:IMG_0358.JPG
+
 
File:IMG_0361.JPG
+
To install the gadget on another Wiki, follow these steps:
File:IMG_0363.JPG
+
#Copy the following files from the Commons onto your own Wiki:
File:IMG_0366.JPG
+
#*[[MediaWiki:Gadget-ImageAnnotator.js]]
File:IMG_0367.JPG
+
#*[[MediaWiki:ImageAnnotatorConfig.js]]
File:IMG_0369.JPG
+
#*[[MediaWiki:LAPI.js]]
File:IMG_0370.JPG
+
#*[[MediaWiki:TextCleaner.js]]
File:IMG_0371.JPG
+
#*[[MediaWiki:Tooltips.js]]
File:IMG_0372.JPG
+
#*[[MediaWiki:UIElements.js]]
File:IMG_0373.JPG
+
#*[[MediaWiki:AjaxSubmit.js]]
File:IMG_0374.JPG
+
#*[[MediaWiki:Gadget-DisableImageAnnotator.js]]
File:IMG_0375.JPG
+
#Set up [[MediaWiki:Gadget-DisableImageAnnotator.js]] as a gadget on ''your'' Wiki: copy [[MediaWiki:Gadget-DisableImageAnnotator]] to your Wiki and add the line "<tt>DisableImageAnnotator|DisableImageAnnotator.js</tt>" to [[MediaWiki:Gadgets-definition]] on ''your'' Wiki.
File:IMG_0376.JPG
+
#To set it up ''ImageAnnotator'' as a gadget, write a description of it at [[MediaWiki:Gadget-ImageAnnotator]] on ''your'' Wiki, and add the line "<tt>ImageAnnotator|ImageAnnotator.js</tt>" to [[MediaWiki:Gadgets-definition]] (also on ''your'' Wiki).
File:IMG_0377.JPG
+
#To enable the gadget for everyone, you may skip step 3 and instead add the line "<tt>if (wgNamespaceNumber != -1) importScript ('MediaWiki:Gadget-ImageAnnotator.js');</tt>" to [[MediaWiki:Common.js]] on ''your'' Wiki. (Or take a look at ''our'' [[MediaWiki:Common.js]] to see how we do this and copy that code over to your Wiki.)
File:IMG_0379.JPG
+
#Copy the templates [[Template:ImageNote]], [[Template:ImageNoteEnd]], and [[Template:ImageWithNotes]] to your Wiki and protect them. Don't forget to adapt the category and the namespace selector (replace "File" as appropriate) in [[Template:ImageNote]].
File:IMG_0381.JPG
+
#Copy the templates [[Template:ImageAnnotations]], [[Template:InlineImageAnnotations]], and [[Template:ImageNoteColors]] to your Wiki.
File:IMG_0382.JPG
+
#Copy the templates [[MediaWiki:ImageAnnotatorTexts]], [[MediaWiki:ImageAnnotatorUITexts]], and [[MediaWiki:ImageAnnotatorEditSummaries]] to your Wiki.
File:IMG_0384.JPG
+
#Modify [[MediaWiki:ImageAnnotatorTexts]] to adapt it to your Wiki's default language. Replace the string <tt>lang="en"</tt> (one occurrence) as appropriate; e.g. at the Arabic Wikipedia, use <tt>lang="ar"</tt>.
File:IMG_0385.JPG
+
#Translate the texts in the [[#Edit summaries|edit summaries]] into the content language of your wiki.
File:IMG_0386.JPG
+
#If you want, also create user interface texts in your language in the MediaWiki-messages noted [[#User interface texts|above]]. The messages in the default language of the Wiki always go into the pages without suffix. For other languages, use suffixes. On the Arabic Wikipedia, for instance, you'd put Arabic text at [[MediaWiki:ImageAnnotatorEditorLabel]] and the English text at [[MediaWiki:ImageAnnotatorEditorLabel/en]].
File:IMG_0387.JPG
+
 
File:IMG_0388.JPG
+
The gadget will work for files uploaded locally on your Wiki exactly as it does for files here at the Commons. For non-local files (files hosted here at the Commons, but viewed on your Wiki), the script will enable viewing of the notes (if there are any), but will not allow modifying them. Modification of notes is possible only if the user views the file at the Wiki where the file actually resides.
File:IMG_0389.JPG
+
 
File:IMG_0392.JPG
+
Note: the above instructions assume that you want to install the gadget on another WMF project. If you are using a MediaWiki installation that does not serve [http://commons.wikimedia.org/skins-1.5/common/wikibits.js wikibits.js], you are on your own. You will have to modify the scripts to use whatever environment your Wiki provides (in particular script loading and <tt>getElementsByClassName</tt>).
File:IMG_0393.JPG
 
File:IMG_0394.JPG
 
File:IMG_0395.JPG
 
File:IMG_0396.JPG
 
File:IMG_0397.JPG
 
File:IMG_0398.JPG
 
File:IMG_0399.JPG
 
File:IMG_0401.JPG
 
File:IMG_0402.JPG
 
File:IMG_0405.JPG
 
File:IMG_0406.JPG
 
File:IMG_0407.JPG
 
File:IMG_0408.JPG
 
File:IMG_0410.JPG
 
File:IMG_0413.JPG
 
File:IMG_0414.JPG
 
File:IMG_0416.JPG
 
File:IMG_0418.JPG
 
File:IMG_0419.JPG
 
File:Stream crossing.JPG
 
File:IMG_0422.JPG
 
File:IMG_0424.JPG
 
File:IMG_0426.JPG
 
File:IMG_0431.JPG
 
File:Spaulding Lean-to.JPG
 
File:Lone Wolf.JPG
 
File:IMG_0435.JPG
 
File:IMG_0436.JPG
 
File:IMG_0437.JPG
 
File:Nolan and the fire.JPG
 
File:IMG_0440.JPG
 
File:IMG_0441.JPG
 
File:IMG_0442.JPG
 
File:IMG_0443.JPG
 
File:IMG_0445.JPG
 
File:IMG_0448.JPG
 
File:IMG_0449.JPG
 
File:IMG_0450.JPG
 
File:Sullivans descending.JPG
 
File:IMG_0452.JPG
 
File:Sugarloaf Valley.JPG
 
File:Ken descending.JPG
 
File:Ken.JPG
 
File:IMG_0456.JPG
 
File:Sugarloaf shack.JPG
 
File:IMG_0462.JPG
 
File:IMG_0464.JPG
 
</gallery>
 

Latest revision as of 16:28, 17 September 2013

File:Fall 2004.pdf







<googlemap version="0.9" lat="42.711618" lon="-73.205112"> </googlemap>

<sgallery height="600" width="800" showinfopane="false"> Image:IMG_0350.JPG Image:IMG_0351.JPG </sgallery>


File:Sound.ogg File:Sound.ogg

Installing ImageAnnotator on another Wiki

Image notes are only visible when the ImageAnnotator gadget is installed and activated (either by default for all users, or the viewing user has the gadget enabled). This means that notes added here at the Commons are not visible at other Wikis unless the gadget is installed there, too.

Installing from scratch

Note: if you want to upgrade an existing installation to the latest version, do not follow these steps. Follow the steps in the section "Upgrading an installation" below.

To install the gadget on another Wiki, follow these steps:

  1. Copy the following files from the Commons onto your own Wiki:
  2. Set up MediaWiki:Gadget-DisableImageAnnotator.js as a gadget on your Wiki: copy MediaWiki:Gadget-DisableImageAnnotator to your Wiki and add the line "DisableImageAnnotator|DisableImageAnnotator.js" to MediaWiki:Gadgets-definition on your Wiki.
  3. To set it up ImageAnnotator as a gadget, write a description of it at MediaWiki:Gadget-ImageAnnotator on your Wiki, and add the line "ImageAnnotator|ImageAnnotator.js" to MediaWiki:Gadgets-definition (also on your Wiki).
  4. To enable the gadget for everyone, you may skip step 3 and instead add the line "if (wgNamespaceNumber != -1) importScript ('MediaWiki:Gadget-ImageAnnotator.js');" to MediaWiki:Common.js on your Wiki. (Or take a look at our MediaWiki:Common.js to see how we do this and copy that code over to your Wiki.)
  5. Copy the templates Template:ImageNote, Template:ImageNoteEnd, and Template:ImageWithNotes to your Wiki and protect them. Don't forget to adapt the category and the namespace selector (replace "File" as appropriate) in Template:ImageNote.
  6. Copy the templates Template:ImageAnnotations, Template:InlineImageAnnotations, and Template:ImageNoteColors to your Wiki.
  7. Copy the templates MediaWiki:ImageAnnotatorTexts, MediaWiki:ImageAnnotatorUITexts, and MediaWiki:ImageAnnotatorEditSummaries to your Wiki.
  8. Modify MediaWiki:ImageAnnotatorTexts to adapt it to your Wiki's default language. Replace the string lang="en" (one occurrence) as appropriate; e.g. at the Arabic Wikipedia, use lang="ar".
  9. Translate the texts in the edit summaries into the content language of your wiki.
  10. If you want, also create user interface texts in your language in the MediaWiki-messages noted above. The messages in the default language of the Wiki always go into the pages without suffix. For other languages, use suffixes. On the Arabic Wikipedia, for instance, you'd put Arabic text at MediaWiki:ImageAnnotatorEditorLabel and the English text at MediaWiki:ImageAnnotatorEditorLabel/en.

The gadget will work for files uploaded locally on your Wiki exactly as it does for files here at the Commons. For non-local files (files hosted here at the Commons, but viewed on your Wiki), the script will enable viewing of the notes (if there are any), but will not allow modifying them. Modification of notes is possible only if the user views the file at the Wiki where the file actually resides.

Note: the above instructions assume that you want to install the gadget on another WMF project. If you are using a MediaWiki installation that does not serve wikibits.js, you are on your own. You will have to modify the scripts to use whatever environment your Wiki provides (in particular script loading and getElementsByClassName).