背叛什么意思| 心悸心慌吃什么药| 空心人是什么意思| 什么品牌的书包质量好| 鸡胗是鸡的什么部位| 位数是什么意思| 浑身没劲挂什么科| 梦见狗是什么意思| 射手女跟什么星座最配| 吃豌豆有什么好处| vlone是什么牌子| 香肠炒什么菜好吃| 孕妇血压低吃什么能补上来| 1月19号是什么星座| 三黄鸡是什么鸡| 特步属于什么档次| 黄脸婆是什么意思| 小便多吃什么药好| 谷子是什么| 鼻窦炎是什么| 桥本甲状腺炎吃什么药| 止血芳酸又叫什么| 梦见自己来月经了什么预兆| 雄字五行属什么| 搬家下雨是什么兆头| 疝气有什么症状| 胡萝卜和什么榨汁好喝| 剑突下是什么位置| 3月12是什么星座| 血糖高能吃什么水果| 妈祖属什么生肖| 变化不著是什么意思| 地藏经适合什么人念| 低聚果糖是什么东西| 尿酸高吃什么药效果好| 金族念什么| 失眠用什么药| 镁偏高是什么原因| 这是什么呀| 什么蛇有毒| 望穿秋水是什么意思| 耳火念什么| 01年属蛇的是什么命| 接站是什么意思| 风湿免疫科是看什么病的| 射精是什么| ACEI是什么药| 睫毛炎有什么症状| 什么是脑梗塞| 补中益气丸适合什么人吃| 自慰用什么| 智商125是什么水平| 油价什么时候调整| 二甲医院是什么级别| 膀胱炎尿道炎吃什么药| 胃疼吃什么饭| 肝胆不好有什么症状有哪些表现| 伯伯的儿子叫什么| 什么的珊瑚| 什么牌子的床垫好| 团委书记是什么级别| 左肺上叶肺大泡是什么意思| 怀孕为什么要建档| 什么是血糖| 相对湿度是什么意思| 芒果和什么相克| 宫颈息肉有什么危害| 什么是再生障碍性贫血| 什么是韵母| 王加申念什么| 扁平足为什么不能当兵| 新型冠状病毒有什么症状| 男士补肾吃什么| 宫颈多发潴留囊肿是什么意思| 为什么泡完脚后非常痒| 怔忡是什么意思| 诱因是什么意思| 鹞是什么意思| 什么叫六亲| 发改委是干什么的| 慢性病是什么意思| 什么叫法令纹| 妇科千金片和三金片有什么区别| 79年的羊是什么命| 乳腺纤维瘤有什么症状表现| 小五行属性是什么| 盛是什么意思| 日本为什么要侵略中国| 什么忙什么乱| 指甲有条纹是什么原因| 什么的医生| 乳腺增生是什么原因引起的| 深呼吸有什么好处| 甲状腺有血流信号是什么意思| 为什么老想睡觉| 土乞念什么| 心脏衰竭吃什么药| au990是什么金| 1964年出生属什么| 囊实性结节是什么意思| 梦见捡钱了是什么预兆| 1990是什么生肖| 杀阴虱用什么药最好| 精尽人亡是什么意思| 正常白带是什么样子| 拔完牙后能吃什么| 宝宝不爱喝水有什么好的办法吗| 中国的全称是什么| 丙火是什么意思| 伤口不愈合用什么药| 腿弯处的筋痛是什么原因| 心脏早搏什么意思| guess是什么品牌| 感冒吃什么菜| 伽蓝菩萨保佑什么| 非典是什么| 什么人容易得阿尔兹海默症| 耀武扬威的意思是什么| 糖醋鱼用什么鱼做好吃| 为什么暑假比寒假长| 2012属什么生肖| 秋葵有什么营养| 咋啦是什么意思| 仙草是什么| 十一月份是什么星座| 韩红是什么民族| 吃什么食品减肥| 含蓄是什么意思| 前列腺增生吃什么药| 腿总是抽筋是什么原因| 浪荡闲游是什么生肖| 泡泡什么意思| 外科和内科有什么区别| 曹操是个什么样的人| 女性什么时候排卵| 猫咪的胡子有什么作用| 啖是什么意思| 人工受孕和试管婴儿有什么区别| 金益什么字| 牡丹花有什么颜色| 沙僧是什么动物| 大将军衔相当于什么官| 蔡字五行属什么| 裙摆是什么| 青储是什么| 红色的蛇是什么蛇| 胃溃疡可以吃什么水果| 为什么狗不能吃巧克力| 咽后壁淋巴滤泡增生吃什么药| 前胸疼是什么原因| 心志是什么意思| fredperry是什么牌子| 小燕子的尾巴像什么| 6月11日是什么星座| 迪奥是什么意思| 膀胱壁毛糙是什么原因| 银屑病吃什么药| 猪血炒什么好吃| 足字旁的字有什么| 嗜酸性气道炎症是什么意思| 什么颜色衣服显皮肤白| 什么鸟一生只有一个伴侣| 4月18日什么星座| 球菌阳性是什么意思| 汗疱疹是什么引起的| 什么是肝阳上亢| 如夫人是什么意思| 司马光和司马迁是什么关系| 梦见自己把蛇打死了是什么意思| 腋下有异味是什么原因导致的| 蒲公英什么功效| 梦见火烧房子是什么预兆| 什么玉最好有灵性养人| 手代表什么生肖| 尿失禁用什么药好| 脸书是什么| 明天属什么生肖| 荨麻疹要用什么药| 心电监护pr是什么意思| 山东特产是什么| 复试是什么意思| 子癫是什么病| 胃不舒服能吃什么水果| 头昏应该挂什么科| 为什么掉头发| 平和是什么意思| 闻所未闻是什么意思| 1962年五行属什么| 双肾囊性灶是什么意思| 内分泌紊乱有什么症状表现| 锑是什么| 炸东西用什么油| 炙的意思是什么| add是什么意思| abo溶血是什么意思| 身体缺钾有什么症状| 什么是轻食| 数字化摄影dr是检查什么| 物质是什么| 肛门里面疼是什么原因| 单核细胞百分比偏高是什么意思| 铁蛋白高吃什么药能降下来| 女性乳房痒是什么原因| 高血糖能吃什么水果| 切口憩室是什么意思| 轴重是什么意思| 扁桃体发炎用什么药| 汗颜是什么意思| 飞龙在天是什么生肖| 奔跑吧什么时候播出| 躺着头晕是什么原因| 广州为什么叫花城| 子宫内膜回声不均匀是什么意思| 什么是唐氏综合征| 血精和精囊炎吃什么药| 三斤八两什么意思| 子母环是什么形状图片| 一边什么一边什么| ccu病房什么意思| 西红柿和什么搭配最好| 双什么意思| 李姓男孩起什么名字好| 肠鸣是什么原因引起的| 十月二十六是什么星座| 什么是孢子粉| 养性是什么意思| 衣服的英文是什么| 胃热是什么原因| 枸杞有什么作用和功效| 天津立冬吃什么| 975是什么意思| 什么河没有水| 胸痛挂什么科| 918是什么日子| 化妆品属于什么行业| 精神衰弱吃什么药| 手麻是什么原因引起的| 全飞秒是什么| 血压偏低有什么症状| 三奇贵人是什么意思| 脐炎用什么药| 旖旎是什么意思| 巽是什么意思| 松字五行属什么| 六月初一什么日子| 肝胃不和吃什么药| 牙髓炎是什么| 色弱什么意思| 三月十七是什么星座| 为什么眼皮会肿| 天蝎配什么星座| 肾虚是什么| 慈母手中线的下一句是什么| 622188开头是什么银行| 霉菌性阴道炎用什么洗液好| 了解是什么意思| 鸡眼膏为什么越贴越疼| 副县长是什么级别干部| 平均分是什么意思| 常温保存是什么意思| 等闲识得东风面下一句是什么| 梦见闹离婚是什么意思| 湿气太重吃什么药最好| 腺样体增生是什么意思| 百度Jump to content

5招拯救男性“更年危机”被更年期困扰怎么办

From Wikimedia Commons, the free media repository
(Redirected from Help:Gadget-ImageAnnotator)
This page in other languages:
百度 脚上长疣是什么原因

Deutsch | English | espa?ol | fran?ais | magyar

The Commons is running

Version 2.3b

of this gadget.

ImageAnnotator is a gadget that allows users to place comments onto images shown on file description pages, similar to the "photo notes" on Flickr. It works on all image files for which the MediaWiki software displays a preview image on the file description page, i.e., PNG, JPG, GIF, SVG, and single-page TIFF files.

Trying it out

[edit]

If you want to make test edits using this feature but don't want to do so on live pages, you can create here a personal "sandbox" page in your user space where you can play around as you like. Just click the button below, and then save the page you're being taken to.


Please note that here at the commons, image notes are configured such that only autoconfirmed users can modify (edit/add/delete) image notes. Other users can edit image notes only within their own user space, such as on their personal image note sandboxes.

How to add informative notes

[edit]

See Commons:Using ImageAnnotator guidelines.

Image annotations in general should highlight features, details, or points of interest within an image. A description of the image as a whole is better placed on the image description page directly (click the "edit" link at the top of the page to do so).

In general, images that can benefit most from annotations are busy images like: group portraits, panoramas, aerial photographs, satellite images, maps and diagrams. The type of images that likely will not be improved by notes are simple images lacking enough detail to need notes. For example: flags, coats of arms, computer icons, single person portraits, etc. Of course one can find many exceptions from this general rule. The content of a note should be relevant to the region of the image outlined by its box and as with other descriptions, "neutrality of description should be aimed at wherever possible" (see COM:NPOV). Use of links to Commons categories, Commons galleries, or Wikipedia articles is encouraged.

User interface

[edit]

On image description pages, the script adds a button "Add a note" below the preview image. If the image already has annotations, it also shows a message indicating such. The button is only present if Ajax is enabled.

Display of image annotations

[edit]

An annotation is shown on the preview image as a yellow rectangle. The note is supposed to explain some feature in the image at the location of that rectangle. These yellow rectangles are only shown if the user moves the mouse cursor over the preview image, otherwise they're hidden.

If the yellow rectangles are visible, the note text will appear in a small popup when the user moves the mouse cursor over such a rectangle. This popup is hidden again when the mouse leaves the area of the rectangle combined with the area of the popup. While the popup is visible, its rectangle will be highlighted.

Screenshot Explanation
Initial display: rectangles are invisible because the mouse pointer is outside the image. Text below the image indicates the presence of annotations, and there's a button to add new notes.
When the mouse pointer is moved onto the image, the rectangles are shown.
When the mouse pointer is moved over the rectangles, the corresponding notes are shown...
... and the rectangles are highlighted.

Adding a new annotation

[edit]

When the "Add a note" button is clicked, the script enters definition mode. The preview image gets a green border, and the rectangles of all existing notes are shown. The user can now draw a new rectangle (shown in red) onto the preview image by clicking within the image, dragging the mouse cursor, and then releasing the mouse cursor. If the resulting rectangle has non-zero width and height, the note editor will pop up. When the note text is saved from that editor, a new note will be placed onto the preview image.

If the full image is much larger than the preview image, the script provides a floating zoom to make it easier to position the new rectangle. By default, this zoom is activated when the full image size is eight times larger than the preview, but this can be configured by the user to their liking. The zoomed image is initially just the preview image scaled up by the browser, but the script loads an image at the correct zoomed size from the server in the background, and once that truly zoomed image has arrived, it replaces the browser's upscaled image.

Screenshot Explanation
This is the button to add a new note. It is located below the preview image on the image description page.
The image has a green border, and the rectangles of all existing annotations are shown.
Because this is a huge file, ImageAnnotator provides a built-in zoom as soon as the mouse pointer enters the image.
The new rectangle is shown in red. Once the left mouse button is released within the image, the editor will be shown.
If Ajax is enabled, notes can be edited. The note editor appears in a popup in the vicinity of the note's yellow rectangle, and is pre-filled with the current text of the note (or empty, if the user is editing a newly defined note). The editor of ImageAnnotator features a built-in preview. The text entered may contain WikiText markup.

Editing a note

[edit]

The note editor fully supports a preview function, just like the standard edit pages. Clearing the text and saving will delete an existing note (or cancel the definition of a new note). The "Revert" button will discard all changes made by the user and fill the editor again with the current text of the note. The "Cancel" button will close the editor without applying the changes. Clicking the "Save" button will edit the current page in the background and add the note text plus the coordinates of its rectangle to the page.

On multilingual wikis such as Wikimedia Commons, notes are shared across all languages. For guidance on making translatable notes, see Commons:Image annotations#Choice of language.

Deleting a note

[edit]

An existing note can be deleted in two ways:

  • by clicking the "Delete" link in the note's popup, or
  • by editing it, clearing the text, and then saving.

When you remove a note through ImageAnnotator, it will prompt you for a deletion reason.

User rights

[edit]

The ability to edit, add, or delete notes is available only on pages the user is actually allowed to edit. On protected pages, non-admin users can only view existing notes. On files stored non-locally, only viewing of notes is possible.

Please note that here at the commons, image notes are configured so that only autoconfirmed users can modify (edit/add/delete) image notes. Other users can edit image notes only within their own user space, such as on their personal image note sandboxes.

Local annotations

[edit]

Normally, the gadget is used on file description pages. On such pages, it is activated automatically.

Sometimes, one might use image notes for an image on other pages, though. An example is nominations for featured pictures, where notes that are local to the nomination, but that are not shown on the file description pages, could be used to point out problems in an image.

This is possible through the use of template {{ImageWithNotes}}. Any file link that actually displays an image that is wrapped with a substitution of that template also activates the gadget. Notes added for such images are stored on the page that includes the substitution of the {{ImageWithNotes}} template, not on the file description page.

If a page contains more than one substitution of {{ImageWithNotes}}, either directly or though transclusions, as on COM:FPC, the gadget only allows viewing notes. Editing notes is possible only on the page that directly contains the template substitution. A nomination page that uses this feature is Commons:Featured picture candidates/File:Vista panorámica de Pe?íscola desde el castillo.jpg.

This mechanism is also used on the personal image note sandbox pages.

Inline display of annotations

[edit]
This image has a few notes, which you should be able to see here on this thumbnail if version 2 of ImageAnnotator is enabled.

Since version 2, ImageAnnotator can also display notes defined on an image description page on the thumbnails of that image where it is used in articles, both at the same and at other projects (if those other projects also have version 2 of ImageAnnotator installed). This feature is highly configurable. ImageAnnotator can be configured on a site-wide basis

  • whether to display notes on such thumbnails at all, depending on whether the image is local and the namespace of the page on which the thumbnail appears, and depending on whether the use is actually a thumbnail ([[File:Example.jpg|thumb|...]]) or an inline image (without the "thumbnail", i.e., [[File:Example.jpg|...]]). See site-wide configuration below.
  • whether to display the full notes (rectangles and popups) or just a small icon indicating that there are additional notes.

In addition, template {{InlineImageAnnotations}} can be used to define note display on thumbnails and inline images on a per-image basis. This template is placed on the image description page of an image that has notes and defines how notes are displayed in places where that image is used. See the template for documentation.

Furthermore, note display on images in articles can also be defined on a per-article basis by placing the template {{ImageAnnotations}} in the article.

If both are used, the values from the per-image definition (in the {{InlineImageAnnotations}} on the image description page) have an effect only if there is no definition in the {{ImageAnnotations}} on the article page. Otherwise, the per-article definition overrides the per-image definition.

Users can additionally switch off note display on inline images and thumbnails on a per-namespace basis. See #User configurations below.

In galleries (created with the <gallery> markup), inline display of image annotations is always disabled.

Rectangle colors

[edit]
On this image, rectangle colors have been changed from the default to make them more visible. Because the image has many notes, you may not see the notes here (depending on the configuration), but then you should see a small indication icon in the upper right or left corner of the image. Click on the image (or on the icon) to visit the file page, where you can then see the notes.

Normally, ImageAnnotator displays the rectangles of notes with yellow borders, and highlights the rectangle of the currently visible note using an orange color. On images that are predominantly yellowish or in orange tones, this makes the rectangles hard to see. For such cases, the rectangle colors can be specified on a per-image basis by adding the template {{ImageNoteColors}} to the image description page.

A note rectangle has two borders, an outer and an inner border. To highlight the active rectangle (the one whose note is shown), the color of the outer border is set to the active color. All three colors can be specified with the template {{ImageNoteColors}}. See the template for usage instructions.

The image at the right uses red rectangles, which work well in this case. They were generated by placing {{ImageNoteColors|inner=red}} on the file description page at File:Prequile lyon 1863.jpg.

On another yellowish image, File:Schleswig Braun-Hogenberg.jpg, red didn't work that well. It was better than yellow, but it turns out that using light green using {{ImageNoteColors|inner=#00FF00|active=#00FF00}} makes the note rectangles even more visible in this case.

In general, the "active" color, which is used to mark the rectangle of the currently visible note, should be a light color. Dark colors do not contrast enough with the default outer color (which is gray).

Settings for a particular image use

[edit]

as of Version 2.1

Sometimes, one may want to control the appearance of image annotations for a single particular image use (thumbnail or otherwise included image) in an article. This can be accomplished by wrapping the image inclusion (the [[File:....|...]]) within template {{ImageNoteControl}}. This template accepts parameters to

  • switch off image annotation for a particular image use altogether,
  • show only an indication icon instead of the notes and a caption indicating their presence, or
  • display the notes but suppress this caption.

See the template itself for more information.

Site-wide configuration

[edit]

Site-wide configuration of ImageAnnotator is done in file MediaWiki:ImageAnnotatorConfig.js. This is a JavaScript file, so any changes there should be made only by admins who do know the JavaScript programming language. This is even more important as changes in that file start taking effect immediately. (The file is cached by clients for four hours, so after four hours a change in the site-wide configuration will have propagated to everybody.)

The site-wide configuration overrides any definitions from {{ImageAnnotations}} in articles or from {{InlineImageAnnotations}} on image description pages.

In MediaWiki:ImageAnnotatorConfig.js, admins can define:

  • where image annotations should be displayed at all: viewingEnabled()
  • who (everyone, or autoconfirmed users only, or other rules) may edit image annotations (if viewing is enabled at all): editingEnabled()
  • as of Version 2.2 who may remove image annotations through the gadget, and if so, whether empty deletion resons are allowed and who, if anybody, may bypass the prompt for a deletion reason altogether. (Note that image annotations may be removed anyway through normal edits to the image description page.) See mayDelete(), emptyDeletionReasonAllowed(), and mayBypassDeletionPrompt().
  • whether notes shall be shown on thumbnails (if viewing is enabled at all): thumbsEnabled()
  • whether notes shall be shown on inline images, i.e., any non-thumbnail use of images (if viewing is enabled at all): generalImagesEnabled()
  • whether notes shall be shown on image uses (thumbnail or other) for non-local images: sharedImagesEnabled()
  • on which image uses to display rectangles and popups, and on which to use only an indicator icon (provided viewing is enabled at all): inlineImageUsesIndicator()
  • as of Version 2.1 whether to display a caption on images with notes that are displayed in articles: displayCaptionInArticles()
  • internal functions for determining the location of a shared repository (by default, the Commons; see sharedRepositoryAPI() and imageIsFromSharedRepository()), the default colors for note rectangles, and the default interface texts.
  • as of Version 2.1 internal setting telling the gadget whether the wiki is set up to automatically generate missing thumbnails (thumbnailsGeneratedAutomatically()).
  • as of Version 2.2 the default zoom activation threshold.

All these configurations cannot be overridden by a user and apply globally on the whole site. The default settings are to enable note display everywhere except on the main page, allow editing for everyone, display notes on any image uses, and to use an indicator icon on image uses if the image is either non-local (comes from the shared repository) or otherwise small and has more than six notes.

User configurations

[edit]

Users can customize some few aspects of ImageAnnotator.

Setting the edit box width

[edit]

By default, ImageAnnotator uses a textbox for modifying notes that is 50 characters wide. Although notes may contain arbitrary WikiText, they should typically be rather short. The somewhat small edit box helps avoid that people write whole sermons in a note. If you often create notes containing long links, though, you might want a slightly larger box. In that case you can define the text box width by adding the following line to your monobook.js or other skin-specific JS file (such as vector.js for the Vector skin):

var ImageAnnotationEditor_columns = 80; // Or any other number from 30 to 100.

This specifies the width of the textbox in characters. If the value set is not a number or outside the range of 30 to 100, the gadget reverts to its default behavior and uses a box 50 characters wide.

Note that on some browsers, notably Firefox, the textbox may be slightly wider than specified. Firefox, for instance, always adds space for a potential vertical scrollbar up front, even when it doesn't show a scrollbar yet. As a result, an empty textbox with 50 columns may on Firefox actually provide an input area that is 52 characters wide, until a vertical scrollbar appears.

Setting the zoom activation

[edit]

When the full image is much larger than the preview image, the script activates a floating zoom to make positioning new rectangles easier. How much larger the full image needs to be than the preview image to activate this zoom is governed by the zoom threshold. By default, this threshold is set to 8.0: the zoom is activated only if the full image is eight times larger than the preview. This threshold ratio can be changed, though:

var ImageAnnotator_zoom_threshold = 8.0; // Or any other number >= 0

Setting the threshold to very high values will in practice disable zooming for most images. Setting it to zero enables the zoom on all images where the full image is at least twice the size of the preview. (In other words, the lower bound of ImageAnnotator_zoom_threshold is 2.0 in practice.)

Whatever the setting of this variable, zooming is enabled automatically for users who have set a very small preview size in their preferences (smaller than 600 pixels wide), and for images that are more than twice as wide as high, but only if the full image is at least twice the size of the preview image.

Switching off note display on image uses

[edit]

As of Version 2.0

Logged-in users can customize note display on thumbnails and other images used in articles by setting special variables in their skin-specific user JS files, such as monobook.js for the "monobook" skin, or vector.js for the "vector" skin.

This customization works on a per-namespace basis. For each feature, the user may define a list of namespace names for which the feature applies. Customizeable features are

  • no_images : switch off note display on all image uses in the namespaces given
  • no_thumbs : switch off note display only on thumbnails in the namespaces given
  • no_shared : switch off note display for non-local images in the namespaces given
  • icon_thumbs : use only an indicator icon (instead of showing the note rectangles and popups) for thumbnails in the namespaces given
  • icon_images : use only an indicator icon for other (non-thumbnail) image uses in the namespaces given

These features are defined through variables the user declares in their skin-specific JS file. The variable names are ImageAnnotator_no_images, ImageAnnotator_no_thumbs, ImageAnnotator_no_shared, ImageAnnotator_icon_thumbs, and ImageAnnotator_icon_images. The values in all cases are JavaScript arrays of strings. An example of a user's configuration might be

var ImageAnnotator_no_images = ["Creator", "Creator talk"]; // No image note display on creator pages
var ImageAnnotator_no_thumbs = ["Talk"];                    // Don't show notes for thumbs on talk pages
var ImageAnnotator_icon_thumbs = ["Commons"];               // Only an indication icon for thumbs in the commons
                                                            // namespace, such as on [[COM:FPC]]

as of Version 2.1 You may also use "*" as a wildcard denoting "any namespace" in these arrays.

as of Version 2.1 Using the variable ImageAnnotator_hide_captions, you can switch off the display of extra captions indicating the presence of annotations on image uses in articles. For instance,

var ImageAnnotator_hide_captions = ["*"];

would suppress these captions on all image uses (thumbnails and otherwise included images) in all namespaces.

Note that this feature relies on the server including wgNamespaceIds in the inline JavaScript on the page. If wgNamespaceIds does not exist, this user-defined customization will not work. (But image annotations will continue to work anyway.)

Switching off the prompt for a deletion reason

[edit]

As of Version 2.2 If the site-wide configuration allows this at all, a user may switch off the prompt for a deletion reason when a note is removed through the gadget using

var ImageAnnotator_noDeletionPrompt = true;

This setting is somewhat risky, though, because if a user may remove notes through the gadget (this is another site-wide configuration setting), the deletion link is just next to the edit link. With this setting, a single mis-click might inadvertently remove a note.

The default site-wide setting allows this only for administrators. There is another site-wide setting that determines whether empty deletion reasons are allowed; it's safer to use that to allow administrators quickly removing inappropriate notes.

User interface texts

[edit]

ImageAnnotator uses a small number of texts in its user interface. If Ajax is enabled, the script loads localized strings for these interface messages.

These interface texts can be defined on-wiki in pages in the protected MediaWiki namespace, just like the standard interface texts of MediaWiki. The script uses the following interface texts:

To localize these texts, just place the translations in subpages of these pages. The French texts, for instance, reside at "/fr" subpages:

If there is no translation for a particular text, the script falls back to the English texts.

The help button is a bit special. MediaWiki:ImageAnnotatorHelp can be one of the following:

  • A simple link, e.g. [[Help:Gadget-ImageAnnotator|Get help]]. This will insert the link as is.
  • A span containing some simple text, followed by a link. This will insert a button with the text from the span, linking to the page given in the link.
  • A sequence of one to three images, followed by a link. This will insert the image, linked to the page given in the link. If more than one image are given, the second is displayed when the mouse hovers over the resulting help button, and the third is displayed on a mouse click.

The third possibility is actually only useful if you really specify more than one image to create an animated button, or if you are running on an older MediaWiki installation that doesn't support the "link=" parameter for images. Otherwise, you can achieve the same effect (a clickable image linked to some page) by just defining MediaWiki:ImageAnnotatorHelp as e.g.

[[Image:Gtk-dialog-question-2.svg|16px|Help about image annotations|link=Help:Gadget-ImageAnnotator]]

The button labels are supposed to be simple texts. Those for the "Edit"/"Delete" links and for the "Preview", "Revert", and "Cancel" buttons are optional; if they're not defined, already existing MediaWiki messages that provide sensible default texts are used. Those for the "Save" and "Add a note" button do not have this fallback mechanism because there are no suitable pre-defined MediaWiki messages that could be used.

Getting the localizations through Ajax means that there will be one additional request to the servers for each and every image description page visited with ImageAnnotator active. If this ever becomes a problem, one can either switch off localizations, or make the developers implement an image page footer system message that could be used to transport the interface strings on the page itself when it loads, like it was done for the upload form. However, thanks to caching in the browser and also in the Squids on the server side, this additional request should not be problematic. The only drawback is that localizations for MediaWiki:ImageAnnotatorHasNotesMsg are ignored if Ajax is switched off. On the other hand, the Ajax mechanism works without server-side changes.

Edit summaries

[edit]

In addition to the above interface texts, which can be fully localized, ImageAnnotator uses three more texts as edit summaries for the edits made through this script's interface. These texts are configurable, too, but they cannot be localized. The script uses these messages:

These messages should be in the wgContentLanguage of the wiki (English at the English WMF projects and at the Commons; German at German projects, Arabic at Arabic projects, and so on). They should not be in the user's interface language. Edit summaries are targeted not at the editor making an edit, but are for the benefit of all other users at a wiki. Hence edit summaries should be in a language that most people working on a wiki understand, which is normally the content language of the wiki.

Translation pleas

[edit]

Here at the Commons, the script adds small "translate"-links at various places in the interface if there are no interface texts in the user's language. Clicking such a link opens the page MediaWiki talk:ImageAnnotatorTexts for editing in preview mode; users can enter their translations and save them there so an administrator can later verify them and move them to the correct messages in the protected MediaWiki namespace.

Browser compatibility

[edit]

ImageAnnotator has been tested and is known to work on the following browsers:

Firefox 102 OK Fx 102.15.0 esr (64 bits) on Debian (GNU/Linux) 12
Fx 102.15.0 esr (64 bits) on proxmox-ve: 7.4-1
Fx 102.15.0 esr (64 bits) on proxmox-ve: 8.1-2
Firefox 10 OK Fx 10.0.12esr on Windows 7 SP1 + Windows 2000 SP4 (VM)
Firefox 8 OK Fx 8.0 on Ubuntu 11.10
Firefox 3 OK Fx 3.0.5, 3.0.10, 3.0.11, 3.0.13, 3.5.2 on Win XP Pro, SP2; Fx 3.0.13, 3.5.2 on Ubuntu 9.04; 3.0.10 on Mac OS X 10.5.8
Firefox 2 OK Fx 2.0.0.16 on Win XP Pro, SP2
Firefox 1.5 OK Fx 1.5.0.11 on Wine 1.?
IE 9 OK 9.0.8112.16421CO (x86+amd64) on Windows 7
Internet Explorer 8 OK IE 8.0.6001.18702 on Win XP Pro/SP3 in a virtual PC
(Internet Explorer Application Compatibility VPC Image from Microsoft)
Internet Explorer 7 OK IE 7.0.5730.11 on Win XP Pro/SP3 in a virtual PC
(Internet Explorer Application Compatibility VPC Image from Microsoft)
Internet Explorer 6 OK Win XP Pro, SP2
Internet Explorer 6  Not OK Windows 2000, SP4, HTTP (HTTPS fails anyway)
IE/Mac  Not OK Doesn't load in IE 5.2.3 on Mac OS X 10.5.8.
IE 5.5 Unknown unknown Needed? Probably won't work.
Google Chrome/Linux OK dev-channel build 3.0.189.0
Google Chrome/Win OK Google Chrome 2.0.172.31, WebKit 530.5, V8 1.1.10.13
Konqueror/Linux OK Konqueror 4.2.4
Konqueror/Win OK Konqueror 4.2.3 (KDE 4.2.3) on Win XP Pro, SP2.
Opera ≥ 9.0 OK Opera 9.02, 9.26, 9.50, 9.63, 10 on Win XP Pro, SP2; Opera 9.64 on Ubuntu 9.04
Opera < 9.0  Not OK Tested on Opera 8.02 and 8.50 on Win XP Pro, SP2: layout problems related to float:left (covers sidebar), image display in add mode and z-index of the editor; apparently also XHR problems (doesn't load customized interface texts). Script is disabled for Operas < 9.0. Note that Opera 9 was introduced in 2006; Opera 8 dates back to 2005. Users should upgrade their browser.
QupZilla 1.6.6 OK Windows 7 SP1 + Windows 2000 SP4 (VM)
Safari 4/Mac OK Safari 4.0.3 on OS X 10.5.8.
Safari 4/Win OK Safari 4.0 (530.17) on Win XP Pro, SP2
Safari 3/Mac Unknown Presumed OK since working on Windows
Safari 3/Win OK Safari 3.2.3 (525.29) on Win XP Pro, SP2
Safari 2/Mac Unknown Unknown
Safari 2/Win Don't care Early Safari versions for Windows are known to be buggy. We don't cater to broken browsers (well, except IE :-). Users should upgrade their browsers to Safari 3.
iCab < 4  Not OK Doesn't load in iCab 3.0.5 on Mac OS X 10.5.
iCab ≥ 4 Unknown unknown Presumed OK since it's working in Safari.
Epiphany (Gecko) OK Epiphany 2.26.1 (Gecko 1.9) on Ubuntu 9.10 Alpha 4
Epiphany (WebKit) OK Epiphany 2.27.3 (libwebkit 1.1.10) on Ubuntu 9.10 Alpha 4
Arora OK Arora 0.5 on Ubuntu 9.04
Galeon OK Galeon 2.0.6 on Ubuntu 9.04
Kazehakase OK Kazehakase 0.5.4 with Gecko backend on Ubuntu 9.04

Additionally, the script has been tested in the standard (classic), nostalgia, chick, cologneblue, modern, and vector skins using Firefox. It should work in all skins. It has also been tested accessing the Commons through the secure server (using Firefox).

The script has also been tested with RTL ("right-to-left") languages, here at the Commons using "uselang=he" (Hebrew) and also locally at the Arabic Wikipedia. Both tests were run using Firefox 3.0.11 and IE6.

Like for many other scripts at WikiMedia projects, a DOM Level 2 compatible browser is a prerequisite. Ajax is used to get localized interface texts, to save or delete notes, and for the preview feature of the note editor.

If JavaScript is disabled, the script will of course not do anything. If JavaScript is enabled but Ajax is disabled, the script still displays existing notes on the image, but the user cannot modify or delete them, and it's also not possible to add new notes.

Although modifying notes (automatically editing the image description page) works without the MediaWiki API, the API is used for previews and for getting localized interface texts. On wikis where the API is disabled, the script may not work at all, or fail to show previews and localized interface texts. (The public WMF wikis, including the Wikipedias and the Commons, have the API enabled.) The script does not use the write API. Enabling the read API is sufficient.

Installing ImageAnnotator on another Wiki

[edit]

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.

To install ImageAnnotator on a wiki, you need to be an administrator at that wiki. A detailed installation guide is available.

Limitations

[edit]
  • If an image that has annotations is overwritten by a new version, existing annotations are only displayed if the size of the full version of the top image matches the size of the full image on which the notes were defined. To recover annotations, one will need to edit the image description page manually, adjusting image sizes and rectangle coordinates, or re-enter annotations.
  • Editing and deleting notes only works on modern browsers if the XHTML of the edit page is valid. Normally, this should not be a problem, but during alpha testing, people were updating MediaWiki:Copyrightwarning, and sometimes that message generated invalid XHTML (improper nesting of tags, or spurious unclosed tags). When that happened, edits failed to save automatically.

Frequently asked questions

[edit]
  1. Can't image notes be stored on a subpage of the image page?
    No, they cannot. This was considered as an option when this feature was developed, but the idea was given up because
    1. edits to notes wouldn't show up on watchlists unless people also watched these subpages (currently, editing notes generate edits to the image description page itself, so they show up on watchlists if the image is watched);
    2. it would be technically much harder to detect edit conflicts and keep things in sync between the notes displayed and the notes stored;
    3. the script would need to load the subpage just to display the notes, and we'd like to keep the number of calls to the server at a minimum; and
    4. it would be harder to keep things in sync if and when image moves are (re-)enabled.
    Note that you CAN use local annotations on an image subpage.
  2. Can we have note regions with other shapes than rectangles?
    No. JavaScript does not offer convenient drawing primitives. Rectangles are easy because HTML elements are all rectangular boxes, but anything else is either not possible at all in JavaScript or only with considerable difficulty using the <canvas> element of HTML5, but HTML5 is not supported by older browsers, and back then our pages were "XHTML 1.0 transitional" anyway. Older versions of Internet Explorer (up to IE8) do not support <canvas> out-of-the-box, though there are special extensions for it.
  3. Can we run the ImageAnnotator script in Wikipedias in order to see annotations there?
    Yes, you can. Make a local administrator install the gadget, possibly lobby first to get consensus from your local wiki community. A good way to roll out the gadget might be to install it first as a gadget, enabled only in the "File" namespace. If people like it and no problems occurred, enable it later for everyone. Finally consider switching on inline display of notes.
  4. Where can I test this feature?
    On your personal image note sandbox page.

Problems?

[edit]

Despite having been tested on a wide array of browsers, it is not impossible that this script has still errors or that it doesn't work as it should on some browsers. If you have any problems with this script, report them at MediaWiki talk:Gadget-ImageAnnotator.js.

When reporting an error, always include the following information:

  • Which browser are you using? What version?
  • Which other gadgets have you enabled?
  • Which skin are you using (Monobook, Modern, Vector, other...)?
  • What's your user interface language setting?
  • What exactly did you do?
  • If the error occurred when you were trying to save a note: were there any error messages in the editor's window?
  • Were there any error messages displayed at the top of the page?
  • If you have a modern browser that does have an "error console" of some sort: were there any errors reported there?

For the last three points: we of course also need to know what these messages said exactly.

Emergency switch-off

[edit]

If you encounter severe problems, you can switch off ImageAnnotator by logging in and then setting a checkbox disable the image annotations in Gadgets Preferences. If you do so, you won't be able to see any image notes anymore: the script will not be executed.

If you feel the need to do this, please also make sure that you do report your problem at MediaWiki talk:Gadget-ImageAnnotator.js, so that we have a chance of fixing it. We cannot fix problems that we don't even know about!

Monitoring edits

[edit]

Filter that was supposed to tag all image notes edits was disabled because it triggered too often, and the extension apparently isn't made for general edit tagging.

See also

[edit]
阿姨的老公叫什么 柠檬水苦是什么原因 大寒是什么意思 吃什么降尿酸最有效 肛裂擦什么药膏
夏天肚子疼是什么原因 精神卫生科看什么病 脾是干什么用的 做颈动脉彩超挂什么科 丝瓜水敷脸有什么作用
土生金是什么意思 前任是什么意思 ahc是什么牌子 母亲节送妈妈什么好 转氨酶高吃什么药
1905年属什么生肖 有点尿就想尿什么原因导致的 有眼屎用什么眼药水 继发性高血压是什么意思 戴玉有什么好处
巴氏杀菌是什么意思hcv7jop9ns8r.cn 天蝎座女生配什么星座hcv9jop3ns7r.cn 什么肠什么肚hcv7jop4ns5r.cn 妇女是什么意思hcv8jop3ns0r.cn 21属什么hcv8jop4ns9r.cn
京东什么时候优惠最大hcv8jop0ns4r.cn 巧克力不能和什么一起吃hcv8jop8ns7r.cn 牛肉饺子馅配什么蔬菜hcv8jop1ns0r.cn 打胎用什么药hcv8jop6ns7r.cn 痔疮有什么影响hcv8jop5ns9r.cn
结膜炎用什么眼药水hcv8jop9ns1r.cn 奇货可居是什么意思hcv8jop0ns5r.cn 灰指甲用什么药效果好wuhaiwuya.com 以马内利什么意思cl108k.com 珊瑚是什么hcv9jop2ns5r.cn
头痒用什么东西洗头最好hcv8jop6ns6r.cn pdc是什么意思hcv9jop6ns5r.cn 跑步机cal是什么意思hcv8jop1ns8r.cn 什么是快闪hcv9jop2ns5r.cn 磨牙吃什么药能治好hcv8jop8ns5r.cn
百度