پرش به محتوا

الگو:بشنوید

از ویکی‌پدیا، دانشنامهٔ آزاد
توضیحات الگو[نمایش] [ویرایش] [تاریخچه] [پاکسازی]

{{بشنوید}} allows audio and video files to be embedded in articles. It should be used for audio files that are set off from the text, such as music clips or sound recordings.

Simple usage

[ویرایش]
{{Listen
| filename    =
| title       =
| description =
| pos         =
}}
  • filename (Required): the pagename of the media file, without the File: (formerly Image:) prefix
  • title (Required): the title of the audio file, to be displayed. Do not use wikilinks in the title – they will not work.
  • description: a description of the sounds being heard
  • pos: right (default), left, or center

Multiple files

[ویرایش]

Additional files can be embedded in an article with one template by appending a number to each parameter.

{{Listen
| filename     =
| title        =
| alt          =
| description  =
| filename2    =
| title2       =
| alt2         =
| description2 =
| filename3    =
| title3       =
| alt3         =
| description3 =
}}
  • filename (Required): the pagename of the media file, without the File: (formerly Image:) prefix
  • title (Required): the title of the audio file, to be displayed.
  • alt: alt text for the image displayed for the file, for visually impaired readers; see ویکی‌پدیا:متن جایگزین برای تصاویر. This is needed for file formats that include video as well as sound. The alt text should describe just the initial static image, not the entire video or its sound.
  • description: a description of the sounds being heard

Style parameters

[ویرایش]

The template also takes a number of style parameters to control its appearance:

  • type: can be used to alter the image displayed at the left depending on the type of audio content being embedded. Acceptable values are music, speech and sound (default)
  • header: can be used to add a header to the box.
  • help: if set to |help=no, suppresses the help text that normally appears at the bottom of the box. Only do this if there are other audio files on the page which do have the help link; it must be provided on at least the first file on the article.
  • pos: by default the box floats to the right side of the screen. Setting this to left or center will float the box on the left-hand side, or center it, respectively.
  • image: define a different image. E.g. |image=[[File:Example.jpg|50px]]. You can set |image=none to disable the image entirely.
  • style: can be used to pass specific style instructions to the box. Setting this to float:none will anchor the box when this is convenient. Setting this to float:none; clear:none will enable the anchored box to co-exist gracefully beside another floating box.
  • play(n): some media files cannot be displayed inline; if this is the case set |play=no to prevent the broken inline link from displaying.
  • plain: if set |plain=yes, removes most of the ornamentation (table border, image, and help links) to give a minimalist version. This also removes the left/right float and positioning, to allow the box to be manually positioned as desired using the |style= (e.g., |style=float:right) parameter and surrounding markup.
  • embed: use |embed=yes to remove border and padding when using as a module embedded in another infobox (see examples below).
  • start(n): Timestamp at which the file should start playing
  • length(n): setting |length(n)=hide hides the duration (h:m:s).

Examples

[ویرایش]
{{Listen
| filename    = Accordion chords-01.ogg
| title       = Accordion chords
| description = Chords being played on an accordion
}}

With video

[ویرایش]
{{Listen
| image       = [[File:Crystal Project video camera.png|50px]]
| help        = no
| filename    = Barack Obama inaugural address.ogv
| alt         = A black man in a black coat gestures and talks at a lecturn surrounded by teleprompters. Behind him, in the background, are about a dozen warmly-dressed onlookers.
| title       = Inaugural address of Barack Obama
| description = Barack Obama's [[نخستین مراسم تحلیف باراک اوباما]], January 20, 2009<br />(Duration: 21 minutes, 21 seconds)
}}

With header

[ویرایش]
{{Listen
| header      = Recordings of this phrase:
| type        = speech
| filename    = Frase de Neil Armstrong.ogg
| title       = "One small step for a man..."
| description = First words spoken on the [[ماه]].
}}

Embedding

[ویرایش]
Dr. Accordion
پیشهAccordion player
{{Infobox person
| name = Dr. Accordion
| occupation = Accordion player
| module =
{{Listen
| filename = Accordion chords-01.ogg
| title    = Accordion chords
| embed    = yes
}}
}}
{{Listen
| filename = Accordion chords-01.ogg
| title    = Accordion chords
| plain    = yes
| style    = float:left
}}

Multiple files

[ویرایش]
{{Listen
| type         = music
| filename     = Accordion chords-01.ogg
| title        = Accordion chords
| description  = Chords being played on an accordion
| filename2    = Moonlight.ogg
| title2       = ''Moonlight Sonata''
| description2 = [[لودویگ فان بتهوون]]'s [[سونات شماره ۱۴ پیانو (بتهوون)]]
| filename3    = Brahms-waltz15.ogg
| title3       = Waltz No. 15
| description3 = From [[Sixteen Waltzes, Op. 39 (Brahms)|Sixteen Waltzes, Op. 39]] by [[یوهانس برامس]]
}}

Microformat

[ویرایش]

The HTML mark up produced by this template includes an hAudio microformat, which makes the recording's details تجزیه‌کننده by computers, either acting automatically to catalogue articles across Wikipedia, or via a browser tool operated by a person, to (for example) add the subject to a playlist or database. For more information about the use of microformats on Wikipedia, please see the microformat project.

Date-of-publication ("published") information will only be included in the microformat if {{Start date}} (or {{Start date and age}} where appropriate) is used in a parent template or infobox (but do not use these if the date is before 1583 CE).

For the length or duration of a recording, say 3 minutes 45 seconds, use {{Duration}} thus: {{Duration|m=3|s=45}}, which renders as ۳:۴۵. An optional h parameter can be used for hours.

hAudio uses HTML classes including:

  • haudio
  • fn
  • album
  • description
  • category
  • contributor
  • duration
  • h
  • item
  • min
  • photo
  • position
  • price
  • published
  • s

Please do not rename or remove these classes; nor collapse nested elements which use them.

Tracking categories

[ویرایش]

TemplateData

[ویرایش]
این، توضیحاتِ الگوداده است که توسط TemplateWizard، ویرایشگر دیداری و دیگر ابزارها استفاده می‌شود. گزارش خطای ماهیانه برای این الگو را ببینید.

الگوداده بشنوید

Allows audio and video files to be embedded in articles.

پارامترهای الگو[ویرایش داده‌های الگو]

این الگو، قالب‌بندی شخصی‌سازی‌شده دارد

پارامترتوضیحاتنوعوضعیت
Headerheader

Text or other content to go above all the files in the template (but within the template boundary). Allows markup.

محتوااختیاری
Music or speech icontype

Enter "music" or "speech" here to change the template icon to a speaker with music notes or a microphone.

مقدارهای پیشنهادی
sound music speech
پیش‌فرض
sound
مثال
music
خطاختیاری
Custom iconimage

Custom image to replace the speaker icon in the template. Alternatively, enter "none" here to hide the icon entirely.

مثال
[[File:Example.jpg|50px]], none
پروندهاختیاری
Filenamefilename

The filename of the file. Filename2, filename3, etc. can be used for subsequent files.

پروندهضروری
Titletitle

The title to display for the file. Title2, title3, etc. can be used for subsequent files.

رشتهضروری
Descriptiondescription

A description of the file. Description2, description3, etc. can be used for subsequent files.

رشتهپیشنهادشده
Start timestart

Timestamp at which the first file should start playing (start2, start3, etc. can be used for subsequent files)

مثال
0:20
خطاختیاری
Hide duration?length

Enter "hide" here to hide the duration of the first file (length2, length3, etc. can be used for subsequent files).

مثال
hide
خطاختیاری
Hide player?play

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.

مثال
no
خطاختیاری
Hide help text?help

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.

مثال
no
خطاختیاری
Positionpos

Enter "left" or "center" here to change the default position of the template from on the right.

مقدارهای پیشنهادی
left center right
پیش‌فرض
right
مثال
left
خطاختیاری
Plain style?plain

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.

مثال
yes
خطاختیاری
Optimise for embedding?embed

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.

مثال
y
خطاختیاری
Custom CSSstyle

Custom CSS for the template

مثال
float:none; clear:none
محتوااختیاری

See also

[ویرایش]