Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module:Galeria/doc
Module
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{#ifeq:{{SUBPAGENAME}}|sandbox|<includeonly>[[Category:Scribunto module sandboxes]]</includeonly>|{{Module rating|release}}}} {{Heavily used module}} === The format parameter === When none is specified, the module tries to find the best fitting default format. If another display format is wanted it can be specified;<br> but a wrong format parameter which does not fit to the file name parameters gives troubles. * 0: no captions, every unnamed parameter specifies a valid file name * 1: 'showfilename' captions, every unnamed parameter specifies a valid file name * 2: parameter pairs of file name and caption; when the second value is missing the file name is displayed, with link * 3: as format 2, but file name captions are displayed without link Format 0 and 1 may not contain caption parameters; format 2 and 3 can work with a mixture of file names and caption texts. === The file parameters === Each file to be displayed can be spezified by one, or by two parameters. The chain of files starts of course with a file name; the following parameter can be the caption for the current file, or it specifies the next file name. When such a second parameter is the same as the first one, possibly only differing in case and space/understroke, it is used as a caption for the first parameter. Otherwise every second parameter seeming to be a valid file name is considered to be the next file name, and the first parameter is treated as an unpaired, single file name. An easy solution is the specification of empty parameters for captions: it signals that the file name should also be used as the caption. === How it works === This module gets all parameters from the parent template of {{T0|G}}, creates the attributes and values, and passes them to the ''gallery'' tag. The mainly invoker is {{T|G|+|case=l}}.<br>The template G itself does nothing than to invoke this module, it does not specify any own parameters. The module analyzes these parameters. In special, the unnamed parameter(s) can contain an '''unlimited number''' of items.<br> First of all, the contents of all unnamed parameters are concatenated to one string:<br> # concatenates all pipe-separated items and separates them by an ACK # changes also the newline separators to ACK separators. Then when the parameter for 'format' is '''not''' specified, but : a second parameter exists (after a pipe), ''and'' :: the first parameter is preceded by a newline, ''and'' ::: the second parameter does '''not''' specify a file name, :then the format parameter is defaulted to the value "2". Using the ACK instead of the slash "/" tolerates items containing slashes, as URL web addresses.<br> For the format 2, pairs of items are built, with possible defaulting of the description item.<br><br> Finally the total amount of items is passed to the {{T|G/layout|-}}, together with the other parameters. <br> Because the {{tag|gallery}} tag does not support the suppression of the <code>showfilename</code> option, <br> ''two'' transclusions of the gallery tag are necessary - one with, and the other one without <code>showfilename</code>. === Helper functions === The function "converse" gets a size parameter (possible format examples: 100, x260, 200x240 or 150px, x280px, 220x250px)<br> and returns the <code>widths</code> and/or the <code>heights</code> values; the local function "parseval" is used to parse the values. The function "filename" returns the <nowiki>{{PAGENAME}}</nowiki> without the extension; also " Wellcome X99999999" will be removed. The function "pagename" can change all understrokes to spaces. The function "iffile" performs a rough check whether a string can be a valid file name. Depending on a second parameter, it returns either a flag or the file name without extension. === Other main function === The function 'gallang" is invoked from the template {{T|Lgallery}} to diplay multilanguage SVG files. == See also == * [[Module:Gallery]] and {{tlx|Gallery}}
Summary:
Please note that all contributions to Red Letter Media Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
RLMWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Autotranslate
(
edit
)
Template:Fallback
(
edit
)
Template:GetFallback
(
edit
)
Template:GetFallback2
(
edit
)
Template:Heavily used module
(
edit
)
Template:Incl
(
edit
)
Template:Module rating
(
edit
)
Template:Module rating/i18n/⧼lang⧽
(
edit
)
Template:Nowrap
(
edit
)
Template:Ombox
(
edit
)
Template:T
(
edit
)
Template:T/main
(
edit
)
Template:T0
(
edit
)
Template:Tag
(
edit
)
Template:Template link
(
edit
)
Template:Template link expanded
(
edit
)
Template:Tlx
(
edit
)
Module:Arguments
(
edit
)
Module:Autotranslate
(
edit
)
Module:Message box
(
edit
)
Module:Message box/configuration
(
edit
)
Module:Message box/ombox.css
(
edit
)
Module:Template link general
(
edit
)
Module:Yesno
(
edit
)
Toggle limited content width