Template:FileContentsByBot/Streams

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Streams
#FormatRateDimensions
Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:FileContentsByBot/doc.

Used by Bots evaluating the file contents and adding these information to file description pages. This template creates human readable markup, allows adjustments later and exposes the information in a machine-readable form.

Usage

{{FileContentsByBot
 |botName =
 |Fields =
}}

Template parameters

ParameterDescriptionDefaultStatus
botNameThe bot's name. Used for some verbose output.a botoptional
FieldsAny number of table rows consisting of one of the following templates:
  • generic: Any entry holding any information (if used a lot, a specialized template - see below - should be used instead) constisting of multiple or one {{FileContentsByBot/generic}} blocks, look there for more information
  • specialized templates for use with often used categories
    • Faces: A collection of table rows (<tr>) marking the faces. Please use multiple or one {{FileContentsByBot/Faces}} for the formatting. Refer to that template to find how you can read the position from the HTML.
      Row's id: FileContentsByBot-Faces. Caption class: bot-Faces-legend.
    • ColorAverage: The average color of the image. Use one {{FileContentsByBot/ColorAverage}} for the formatting. Refer to that template to find how you can read the data from the HTML.
      Row's id: FileContentsByBot-ColorAverage. Caption class: bot-ColorAverage-legend.
    • ColorRegions: A collection of table rows (<tr>) containing information about associating color regions/areas. Use multiple or one {{FileContentsByBot/ColorRegions}} for the formatting. Refer to that template to find how you can read the data from the HTML.
      Row's id: FileContentsByBot-ColorRegions. Caption class: bot-ColorRegions-legend.
    • Properties: Please use one {{FileContentsByBot/Properties}}. ...
      Row's id: FileContentsByBot-Properties. Caption class: bot-Properties-legend.
    • For more please confer "See also" below.
emptyoptional
helpLocationThe location of the documents describing how the information was obtained. The subpages are fixed.User:DrTrigonBotoptional
additionalInfoStyleThe style to be applied to the "there are additional information available".emptyoptional
demoStyleStyle to be applied to the whole table.display:noneoptional

Additional information

The template is intended to be used in the following namespaces: the File namespace

The template is intended to be used by the following user groups: Bots

Placement:

Below {{Information}} and related templates.

Relies on:

  • MediaWiki:FileContentsByBot.js, which is invoked when the user clicks on the "View them!" link/button. This script will read the face and eye positions, create image notes from them and show the template.

See also

Localization

This template is localized by utilizing custom MediaWiki namespace messages.

Not implemented yet.

Example of custom styling: To your Special:MyPage/common.css, add the following (you can also just select some of the rules)

/* Show the template left by the bot by default */
#FileContentsByBot { 
  display:table !important; 
}

/* Hide the message "A bot has evaluated ..." */
#FileContentsByBot-Advertiser{ 
  display:none !important; 
}

/* Hide the average color table row */
#FileContentsByBot-ColorAverage{ 
  display:none !important; 
}

The IDs and classes are listed above, in the parameter documentation.

How to create new specialized templates

Look at the examples already existing in Template:FileContentsByBot/doc#See also (with exception of Template:FileContentsByBot/generic of course).