الگو:شنیدن - ویکی‌پدیا، دانشنامهٔ آزاد

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

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

استفاده آسان

{{ شنیدن | نام پرونده =  | عنوان      =  | توصیف      =  }} 
  • 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
  • description: a description of the audio file

چندین پرونده

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

{{ شنیدن | نام پرونده   =  | عنوان        =  | متن جایگزین  =  | توصیف        =  | نام پرونده۲  =  | عنوان۲       =  | متن جایگزین۲ =  | توصیف۲       =  | نام پرونده۳  =  | عنوان۳       =  | متن جایگزین۳ =  | توصیف۳       =  }} 
  • 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 Wikipedia:Alternative text for images. This is needed for file formats such as Ogg's .ogv format 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 audio file

پارامترهای استایل

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

  • نوع: can be used to alter the image displayed at the left depending on the type of audio content being embedded. Acceptable values are صدا, گفتار and موسیقی (default)
  • سرآیند: can be used to add a header to the box.
  • کمک: if set |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.
  • مکان قرارگیری: by default the box floats to the right side of the screen. Setting this to left will cause the box to instead float on the left-hand side.
  • تصویر: define a different image. Eg |image=[[File:Example.jps|20px]]. 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.
  • پخش کردن#: some media files cannot be displayed inline; if this is the case set |play=no to prevent the broken inline link from displaying.
  • ساده: 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.

نمونه‌ها

نمونهٔ پایه


{{ شنیدن | نام پرونده = Accordion chords-01.ogg | عنوان      = Accordion chords | توصیف      = Chords being played on an accordion }} 
نمونه‌هایی برای ویدیو


{{شنیدن  |سرآیند      = Inaugural Address  |نام پرونده  = Barack Obama inaugural address.ogv  |متن جایگزین =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.  |عنوان       = Inaugural address of Barack Obama  |توصیف       = Barack Obama delivers his [[inaugural address]] on January 20, 2009.<br>(Duration: 21 minutes, 21 seconds)  |کمک         = نه  |نوع         = صدا }} 
نمونه با سرآیند


{{ شنیدن | نام پرونده    = Phrase de Neil Armstrong.oga | عنوان         = "One small step for a man..." | توصیف         = First words spoken on the [[ماه]]. | نوع           = گفتار | مکان قرارگیری = چپ | سرآیند        = Recordings of this phrase: }} 
نمونهٔ ساده


{{ شنیدن | نام پرونده = Accordion chords-01.ogg | عنوان      = Accordion chords | ساده       = بله | style    = float:left }} 
چندین پرونده


{{ شنیدن | نام پرونده  = Accordion chords-01.ogg | عنوان       = Accordion chords | توصیف       = Chords being played on an accordion | نوع         = موسیقی | نام پرونده۲ = Moonlight.ogg | عنوان۲      = ''Moonlight Sonata'' | توصیف۲      = [[Beethoven]]'s "Sonata in C-sharp minor" | نام پرونده۳ = Au_clair_de_la_lune_mode_do.mid | عنوان۳      = Au Clair de la Lune | توصیف۳      = The traditional French children's song | پخش کردن۳    = نه }} 

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.

See also