Module:File link/doc: Difference between revisions

From Mariopedia, a wiki on Mario, Yoshi, Wario, Donkey Kong, Super Smash Bros., and more!
Jump to navigationJump to search
Content added Content deleted
(add more methods)
(add the remaining methods)
Line 170: Line 170:
</source>
</source>


Adds a language attribute to specify what language to render the file in. <var>s</var> must either be nil or a string value. This module does not check whether the language tag is valid or not.
Adds a language attribute to specify what language to render the file in. <var>s</var> must either be nil or a string value. This module does not check whether the language tag is valid or not.

=== StartTime ===

<source lang="lua">
obj:startTime(time)
</source>

Specifies a start time for audio and video files. <var>time</var> must be nil, a number, or a string value. Numbers are interpreted as the number of seconds since the start of the file. Strings can be in the format "''mm'':''ss''" to specify the number of minutes and seconds of a file, or "''ss''" to specify the number of seconds since the start of the file.

=== EndTime ===

<source lang="lua">
obj:endTime(time)
</source>

Specifies an end time for audio and video files. <var>time</var> must be nil, a number, or a string value. Numbers are interpreted as the number of seconds since the start of the file. Strings can be in the format "''mm'':''ss''" to specify the number of minutes and seconds of a file, or "''ss''" to specify the number of seconds since the start of the file.

=== ThumbTime ===

<source lang="lua">
obj:thumbTime(time)
</source>

Specifies the time to use to generate the thumbnail image for video files. <var>time</var> must be nil, a number, or a string value. Numbers are interpreted as the number of seconds since the start of the file. Strings can be in the format "''mm'':''ss''" to specify the number of minutes and seconds of a file, or "''ss''" to specify the number of seconds since the start of the file.

=== Caption ===

<source lang="lua">
obj:caption(s)
</source>

Sets a caption for the file. <var>s</var> must either be nil or a string value.

=== Render ===

<source lang="lua">
obj:render()
</source>

Renders the link wikitext.


<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||