模板:Listen
| File:Lua-Logo.svg | 此模板使用Lua语言: |
| CSS | 本模板使用以下模板样式: |
本模板连结至“位于中文维基百科或维基共享资源”的音讯档案。在文章中使用本模板,可让读者聆听辅助文章内容的音讯档案。要使用本模板,请参阅以下说明:
用法[编辑]
{{Listen
|filename = 档案名称.副档名
|title = 档案标题
|description = 档案的描述
|pos = 填入left或right控制左右
|image = 填入[[File:Example.jpg|50px]]
|style = 模板的样式
|play = 填入yes启用另一种显示方式
|plain = 填入yes或no决定是否带边框
|embed = 填入yes或no决定是否嵌入资讯框
}}
其中|filename=参数的档案格式必须是音讯档案。
多重档案[编辑]
{{Listen
|filename =
|title =
|alt =
|description =
|filename2 =
|title2 =
|alt2 =
|description2 =
|filename3 =
|title3 =
|alt3 =
|description3 =
}}
范例[编辑]
{{Listen|filename=Accordion chords-01.ogg|title=手風琴和絃|description=用手風琴彈奏的和絃|pos=left}}
模板数据[编辑]
模板数据
|
|---|
|
<templatedata> { "description": "Allows audio and video files to be embedded in articles.", "format": "Template:\n\n", "params": { "header": { "label": "Header", "description": "Text or other content to go above all the files in the template (but within the template boundary). Allows markup.", "type": "content" }, "type": { "label": "Music or speech icon", "description": "Enter \"music\" or \"speech\" here to change the template icon to a speaker with music notes or a microphone.", "type": "line", "example": "music", "default": "sound", "suggestedvalues": [ "sound", "music", "speech" ] }, "image": { "label": "Custom icon", "description": "Custom image to replace the speaker icon in the template. Alternatively, enter \"none\" here to hide the icon entirely.", "type": "wiki-file-name", "example": "File:Example.jpg, none" }, "filename": { "label": "Filename", "description": "The filename of the file. Filename2, filename3, etc. can be used for subsequent files.", "type": "wiki-file-name", "required": true }, "title": { "label": "Title", "description": "The title to display for the file. Title2, title3, etc. can be used for subsequent files.", "type": "string", "required": true }, "description": { "label": "Description", "description": "A description of the file. Description2, description3, etc. can be used for subsequent files.", "type": "string", "suggested": true }, "start": { "label": "Start time", "description": "Timestamp at which the first file should start playing (start2, start3, etc. can be used for subsequent files)", "type": "line", "example": "0:20" }, "length": { "label": "Hide duration?", "description": "Enter \"hide\" here to hide the duration of the first file (length2, length3, etc. can be used for subsequent files).", "type": "line", "example": "hide" }, "play": { "label": "Hide player?", "description": "Enter \"no\" here to hide the file player for the first file (play2, play3, etc. can be used for subsequent files). To be used for some media files that cannot be displayed inline, to prevent a broken inline link from showing.", "type": "line", "example": "no" }, "help": { "label": "Hide help text?", "description": "Enter \"no\" here to hide the \"Problems playing this file? See media help.\" text at the bottom of the template. Must not be done on the first instance of the template; optional on subsequent instances of the template.", "type": "line", "example": "no" }, "pos": { "label": "Position", "description": "Enter \"left\" or \"center\" here to change the default position of the template from on the right.", "type": "line", "example": "left", "default": "right", "suggestedvalues": [ "left", "center", "right" ] }, "plain": { "label": "Plain style?", "description": "Enter \"yes\" here to remove most of the ornamentation (border, background, icon and help text) and the float/positioning of the template to give a minimalist version, allowing the user to use the custom CSS (\"style\") parameter to style and position the template.", "type": "line", "example": "yes" }, "embed": { "label": "Optimise for embedding?", "description": "Enter any text here to remove the left, right and bottom border, the background, the icon, the help text and the padding of the template for use in an infobox.", "type": "line", "example": "y" }, "style": { "label": "Custom CSS", "description": "Custom CSS for the template", "type": "content", "example": "float:none; clear:none" } }, "paramOrder": [ "header", "type", "image", "filename", "title", "description", "start", "length", "play", "help", "pos", "plain", "embed", "style" ] } </templatedata> |
参见[编辑]
- {{Listen interwiki}},与本模板类似,适用于位于其他语言版本维基百科上的音讯档案。
- {{Audio}},与本模板功能类似的另一个模板,主要以直接将音讯档案插入文字行中。
- {{Pronunciation}},与本模板功能类似的另一个模板,用于发音说明等用途。