Template:Admin service awards/doc

Basic usage
To display the template, just place on the relevant page where the item in italics is replaced by the relevant value. These parameters are required, and should not be omitted.

The template takes four required parameters:


 * year – Starting year
 * month – Starting month
 * day – Starting day of month
 * actions – Number of administrative actions

Display format
The format parameter is used to specify the type of template displayed. Most users will want to use one of the standard format values. There are also some special formats that allow you to put together your own custom format.

Custom formats
You can create your own format by combining the name, description and image of an award in any way you like. The format parameter values shown below allow you to fetch these parts of an award on their own. Transclude the template multiple times to fetch multiple elements, arranged how you like.

For example:

Image alignment
Use the align parameter to specify the location of the template. It can only be used with the medal, book, ribbon, and smlribbon formats.

Image size
For the most award formats, the size parameter specifies whether to change the image size. The ubxmedal, ubxmop, and smlribbon images have fixed widths (45 pixels for the userbox awards and 72 pixels for the small ribbons). The default image width for the medal and mop formats is 130 pixels, and the default for the ribbon format is 120 pixels wide.

Examples:
 * size=##px : Display the image at the specified width, selecting the best height to maintain the image proportions (e.g. 140px displays the image 140 pixels wide).
 * size=x##px : Display the image at the specified height, selecting the best width to maintain the image proportions (e.g. x160px displays the image 160 pixels tall).
 * size=upright=#.## : Display the image as a percentage of your user preference (defaults to 220 pixels wide) while maintaining image proportions (e.g. size displays the image at 50% of the user's preferred thumbnail width).

For the topicon format, the size parameter specifies the width of the top icon. Any non-numeric characters are ignored. The height is capped to 20 pixels by the top icon template. The default of 48px results in an image that is 48 pixels wide by 20 pixels tall. Set this to 20px to keep the top icon the same width as a standard 20px×20px top icon.

Technical details
Internally, this template uses the following sub-templates:
 * /compose: Displays an award as described by various parameters.
 * /core: Displays the award for the specified level (0-20) by calling /compose with the appropriate parameters. Edit this template to change the template names or text displayed for each award.
 * /select: Determines which level of award to display, based on the length of service and number of edits. Edit this template to change the award requirements.

Template Data
{	"params": { "actions": { "label": "Actions", "description": "Number of administrative actions", "example": "2000000", "type": "number", "required": true },		"day": { "label": "Day", "description": "Starting day of the month", "example": "15", "type": "number", "required": true },		"month": { "label": "Month", "description": "Starting month", "example": "1", "type": "number", "required": true },		"year": { "label": "Year", "description": "Starting year", "example": "1995", "type": "number", "required": true },		"size": { "label": "Size", "description": " Size of image (##px, x##px, upright=#.##)", "example": "72px", "type": "string" },		"align": { "label": "Align", "description": "Alignment of image (left, center, or right)", "example": "left", "type": "string", "suggestedvalues": [ "left", "center", "right" ]		},		"format": { "label": "Format", "description": "Type of template desired (medal, ubxmedal, book, ubxbook, ribbon, smlribbon, topicon)", "example": "medal", "type": "string", "suggested": true },		"nocat": { "label": "Nocat", "description": "Indicate whether to add the user to associated categories", "example": "true", "type": "boolean" },               "sortkey": { "label": "Sortkey", "description": "Indicate sort order of topicons", "example": "42", "type": "string", "suggested": true }	},	"paramOrder": [ "year", "month", "day", "actions", "format", "align", "size", "sortkey", "nocat" ],	"description": "Display an Administrative Service Award automatically based on administrator's starting date and number of administrative actions." }