Difference between revisions of "Template:IPA soundbox/doc"
Jump to navigation
Jump to search
imported>Bgeron m (Fix displayed syntax for example) |
imported>Bgeron m (→Usage: Fix link to sound documentation) |
||
| Line 15: | Line 15: | ||
This check may prevent red links and (undesired) repeated checks | This check may prevent red links and (undesired) repeated checks | ||
| − | '''Step 3'''. Create the standard browser soundbox on the page, using [[WP:EIS|<nowiki>[[File:soundfile]]</nowiki>]] | + | '''Step 3'''. Create the standard browser soundbox on the page, using [[WP:EIS#Multimedia syntax|<nowiki>[[File:soundfile]]</nowiki>]] |
Here the information is put together, optional settings such as size are used, and the result is soundbox. | Here the information is put together, optional settings such as size are used, and the result is soundbox. | ||
* {{tlx|IPA soundbox|p||size{{=}}60px}} → | * {{tlx|IPA soundbox|p||size{{=}}60px}} → | ||
Revision as of 20:15, 27 March 2017
| This is a documentation subpage for Template:IPA soundbox. It contains usage information, categories and other content that is not part of the original template page. |
| This template employs intricate features of template syntax.
You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages. You can conduct experiments, and should test all major changes, in either this template's sandbox, the general template sandbox, or your user space before changing anything here. |
This template produces a standard box to start a sound file. It has some extra features to help linking to a phonetic sound file. Also, there are options to format possible error messages and to alter the layout of the box. Basic examples:
{{IPA soundbox|ə}}→{{IPA soundbox|χ|Voiceless_uvular_fricative.ogg}}→
Usage
The box is created in three steps:
Step 1. Determine the soundfile name
- - By using input IPA symbol, looked up in a list:
ipa symbol=p→ - - Use input soundfile:
soundfile=bilabial click.ogg→
Step 2. Check if the soundfile exists This check may prevent red links and (undesired) repeated checks
Step 3. Create the standard browser soundbox on the page, using [[File:soundfile]] Here the information is put together, optional settings such as size are used, and the result is soundbox.
{{IPA soundbox|p|size=60px}}→
Input options
- a.
|checkexist=no: skip (expensive) check on file existence. Default=yes (do the check). - b. layout of the soundbox (these settings use basic layout parameters):
- -
|showicon=no: show info icon ("noicon" in basic) - -
|size=50pxsize (in px: default =250px, minimum is ~40px) Basic: width. - -
|style=: any style (CSS format) to be used, e.g.|style=background:yellow;
{{IPA soundbox|| ipa symbol=m| size=120px| style=border:1px solid red; background:yellow;}}→
{{{1}}}
- c. When an error would exist, show an error message:
- - default: show errormessage as error message
- -
|errortext=something is wrong: Show alternate text when error - -
|errortext=: blank, no output at all (no showbox)
Example of check file once:
- See {{infobox IPA}}. First the file is checked, and returns filename if exists. Then if there is a filename, the infobox row is composed, including the soundbox set with
|checkexist=no.
- Full parameter list
{{IPA soundbox
<!-- GENERAL -->
| ipa symbol =
| style =
| errortext =
<!-- ABOVE -->
| show box above=
| showsymbol =
| line-height =
<!-- PLAYER -->
| soundfile =
| checkexist =
| showicon =
| width =
| size =
}}
- Possible errors
- 1. IPA symbol unknown in IPAsym list
- 2. File does not exist
- When an error exists, no button will be shown.
See also
{{IPA audio filename}}{{infobox IPA}}(uses this template internally){{IPA vowels audio}}(uses this template internally){{IPA pulmonics audio}}(uses this template internally)- Wikipedia:Extended image syntax