Files (media)
You can include all kinds of files in your polifonic wiki pages: images, audio and video files, and other files. Files can be either internal, i.e. uploaded into your wiki, or external, i.e. hosted somewhere else on the web. The table below describes, for each kind of file, what sources are supported and how they are displayed.
Media type | Internal | External | Displayed as |
---|---|---|---|
Image | Yes | Yes | Image |
Audio | Yes | Yes | Audio player |
Video | Yes | Yes | Video player |
Other | Yes | No | Download link |
Make sure that you have the rights to use the files you embed in your wiki pages! Most images, audio, video or other files are protected by copyright and cannot be used without permission.
Syntax
The general syntax for embedding a file is %%{{%%file_identifyer attributes%%}}%%
File identifyer
The file identifyer serves to, well..., identify the file.
For internal files, you should use the file name, including the extension.
If the file was uploaded in the page's namespace, that is all you need.
%%{{polifonic-w.png}}%%
If the file was uploaded in another namespace, then you should include that namespace.
%%{{syntax:polifonic-w.png}}%%
You can also use relative ids.
Fix Me!
For external files, use the file's url.
%%{{http://www.polifonic.io/bundles/polifoniccore/images/polifonic-w.png}}%%
External links should be avoided, as they are considered bad practice. A better practice is to obtain the file, upload it to the wiki, and use an internal link.
Attributes
All attributes are optional; the order of attributes is unimportant. If you provide multiple values for the same attribute (e.g. left right
), then the last value will be apply (right
in the previous example).
Media type
Polifonic will try its best to identify the media type of the embedded file. if the file is internal, it will do this based on the file's contents; if the file is external, it will do this based on the file's extension. Nevertheless, the process may not be entirely reliable, especially with ogg-vorbis files, where both audio and video files share the same .ogg
extension.
You can avoid this by specifying the media type explicitly via the type
attribute. The value of this attribute can be one of the following keywords:
- Image media type:
img
,image
- Audio media type:
audio
- Video media type:
video
- Download media type:
download
,file
Alignment
You can control the horizontal alignment of the file's rendered markup on the page by using one the of the following keywords: left
, right
, center
(default).
Dimensions
Audio/video-specific attributes
Audio and video files support a few other attributes:
-
auto
orautoplay
-
mute
,muted
-
loop
Attributes reference
Attribute | Details |
---|---|
audio | Explicitly defines the file as an audio media. |
auto | Media will start playing as soon as it is loaded on the page (only applies to audio and video media types) |
autoplay | Synonym for auto |
download | Explicitly defines the file as a download. Synonym for file . |
file | Explicitly defines the file as a download. Synonym for download . |
image | Explicitly defines the file as an image. Synonym for img . |
img | Explicitly defines the file as an image. Synonym for image . |
loop | Media will start playing again after it is finished. Only aplies to audio and video media types. |
mute | Sound will be muted by default. Only applies to audio and video media types. |
muted | Synonym for mute |
video | Explicitly defines the file as a video media. |