User:Andrewds1021/Hotlink Vignette

This template was created in response to Thread:1640832 and also applies to. This page is under construction

This template is meant to simplify the process of using Vignette to hotlink and optionally crop/resize images from the local wiki.

Specifying the Wiki
The template should be able to access images from any wiki on the FANDOM network (i.e. fandom.com or wikia.org). The template will assume the local wiki if both the "domain" and "language" parameters are omitted (or set to whitespace).
 * domain
 * domain (lower-case) of the target wiki
 * defaults to the local wiki as extracted from " "
 * NOTE: Target wikis that have been moved (i.e. have had the URL changed) may require use of a previous domain.
 * language
 * language code (lower-case) of the target wiki
 * defaults to the language of the local wiki as extracted from " "
 * language subdomains
 * prepends the language code to the domain as a subdomain
 * to enable, provide a non-whitespace value
 * acts regardless of the "keep subdomains" option
 * NOTE: This option should not be needed for most target wikis. However, the image server still uses the old method of handling different language versions for some older wikis. If the target wiki is one of those wikis, then this option must be enabled for image retrieval to work.
 * keep subdomains
 * prevents the stripping of subdomains from the "domain" parameter
 * to enable, provide a non-whitespace value
 * NOTE: Due to the current domain structure used by Wikia, this parameter should not be needed. However, it has been provided just in case.

Specifying the Image

 * image - required
 * name (case-sensitive) of the image including the file extension
 * NOTE: If not provided, an error message will be displayed on the page.
 * replaced
 * timestamp of when the desired version was replaced (i.e. when the next version was uploaded) in the form YYYYMMDDhhmmss
 * leave blank if latest version is desired
 * code
 * two-character hexadecimal code (lower-case) assigned to the image
 * required if the target wiki is not the local wiki
 * characters beyond the first two are ignored
 * NOTE: Although this code is not random, the template is not capable of calculating it.
 * NOTE: If this parameter is not provided, the template will assume the local wiki regardless of the values provided for the "domain" and "language" parameters.

Specifying Image Modification

 * 1) mode
 * 2) *type of cropping/resizing to perform
 * 3) *recognized values:
 * 4) *#set
 * 5) *#*fixes the dimensions of the output image by padding where needed
 * 6) *#*resizes like "max" mode
 * 7) *#*required parameters: width, height
 * 8) *#width
 * 9) *#*resizes to match the "width" parameter
 * 10) *#*required parameters: width
 * 11) *#height
 * 12) *#*resizes to match the "height" parameter
 * 13) *#*required parameters: height
 * 14) *#max
 * 15) *#*resizes like either "width" mode or "height" mode, whichever produces the smallest image
 * 16) *#*required parameters: width, height
 * 17) *#crop
 * 18) *#*crops the image before resizing
 * 19) *#*crop submode determined by "position" parameter
 * 20) *#*required parameters: position
 * 21) *leave blank if no cropping/resizing is desired
 * 22) width - target width of resized image
 * 23) height - target height of resized image
 * 24) position
 * 25) *recognized values:
 * 26) *#top
 * 27) *#*crops like "center" position except height is cropped from the top
 * 28) *#*required parameters: width, height
 * 29) *#center
 * 30) *#*crops width if specified aspect ratio is smaller than original aspect ratio
 * 31) *#*crops height if specified aspect ratio is larger than original aspect ratio
 * 32) *#*crops width from the center
 * 33) *#*crops height from the center
 * 34) *#*required parameters: width, height
 * 35) *#custom
 * 36) *#*crops specified window
 * 37) *#*resizes cropped portion like either "width" mode or "set" mode depending on the "fixed" parameter
 * 38) *#*required parameters: width, window width, window height
 * 39) upscale
 * 40) *allow upscaling when resizing
 * 41) *enable by providing a non-blank value
 * 42) *not used by "height" mode and "custom" position
 * 43) x offset
 * 44) *horizontal location of window's left edge
 * 45) *defaults to 0
 * 46) *used by "custom" position only
 * 47) y offset
 * 48) *vertical location of window's top edge
 * 49) *defaults to 0
 * 50) *used by "custom" position only
 * 51) window width
 * 52) *width of window
 * 53) *used by "custom" position only
 * 54) window height
 * 55) *height of window
 * 56) *used by "custom" position only
 * 57) fixed
 * 58) *fix the dimensions of the output image by padding where needed
 * 59) *enable by providing a non-blank value
 * 60) *required parameters: height
 * 61) *used by "custom" position only
 * 62) fill
 * 63) *color to use for padding
 * 64) *defaults to white
 * 65) query - additional query string portion to append
 * 66) *include neither leading "?" nor leading "&"

Other

 * link
 * page to link to
 * behaves like the "link" parameter from the standard image syntax
 * supports internal, interwiki, and external links
 * defaults to image's URL
 * to disable, provide a whitespace value
 * error
 * content to display when the "image" parameter is not provided
 * defaults to " Template error: An image has not been specified. "
 * to "disable", set as an empty string