Player on a page: {player}, block and [video]
One player, three ways to place it anywhere: {player} for the video of the current record, the {block:player.video} block for any page and place, and the [video] mark in text.
1. The “Video” field and the {player} tag
The field. In Admin → Extra fields create a field of the “Video” kind (or “Video” for a section). In the record form it looks like a line: paste a link from YouTube, Vimeo, Rutube, VK Video or Dailymotion — “Recognised” appears under the field. Or press “Upload from computer” (mp4, webm): the file goes to “Media” by itself and media:N is put into the field. Or pick a clip from “Media” or a series (series:N). The value of the field is one line: https://…, media:N or series:N.
Record tags (record page, section page, tag-based themes):
{player}— the player of the record’s first “Video” field (empty if not filled in: a[if:player]…[/if]block hides);{player:name}— the player of the named “Video” field;{player.s},{player.m},{player.l},{player.full}— the same at the given size;{player.muted}— starts without sound when the player is in view.
In PHP views: <?= $this->player($fieldValue, ['size' => 'l', 'autoplay' => 'muted', 'start' => 30, 'ads' => 'no']) ?>. In any other place (forum, pages, blocks on the home page and in columns) use the block {block:player.video url=…|id=…|series=…} described below. If the field is empty the tag prints nothing: no empty box and no empty gap is left.
2. The {block:player.video} block — a player anywhere
The block goes into the tag file of any view and into the panel “Places”: the home page, a sidebar, the footer, a forum page. The source is one parameter:
id=N— a clip from “Media” (the number is in the “Media” list);series=N— a series collection: the player switches episodes by itself;url=…— a link to a service clip. Put a link with?and&in quotes:url="https://www.youtube.com/watch?v=…".
Examples:
{block:player.video id=5}
{block:player.video url="https://vimeo.com/76979871" size=s}
{block:player.video series=3 size=l autoplay=muted}If none of the three is set, the clip does not exist or the link is not an allowed one, the block prints nothing: no empty frame and no broken insert is left on the page.
3. Player parameters
The parameters work in the {block:player.video …} block and in a PHP view; in record tags the size and starting without sound are set by the ending ({player.m}, {player.muted}).
- size — width:
s(small, up to 20 rem),m(medium, up to 36 rem),l(large, up to 52 rem),full(whole column, default;wideis the same). - autoplay —
off(default: starts on click) ormuted: the player starts by itself, without sound, when half of the block is in view. It does not start for visitors with data saving on or the “reduce motion” setting — they get the usual click. - start — the second to start from, a number from 0 to 86400.
- ads —
no(or0): show no ads in this player;yes(default) — as set in the ad settings.
4. The [video] mark in text
In the text of a record, page or message the player is placed with a mark, no templates needed:
[video]https://youtu.be/…[/video]— a link to a service clip; a plain link on its own line does the same;[video id=N]— a clip from “Media”;[video series=N]and[video series=N ep=M]— a collection (from episode M).
What visitors may do. A number from “Media” and a collection are parsed only in the text of the owner and staff: otherwise anyone could guess numbers and learn which clips are in the library. In the forum and comments a visitor may only place a link to a service clip: the “Allow video in messages” switch in the forum settings turns this on, and “Video in one message, at most” limits the number of players (the other links stay links). When it is off a link in a message stays a plain link.
5. If the player did not appear
- the link was not recognised: YouTube, Vimeo, Rutube, VK Video, Dailymotion and the services from the player settings are supported, everything else stays a plain link;
- there is no clip with that number in “Media”, or it is closed to this visitor;
- the block has none of
id,seriesandurl; - the “Video player” module is off: video plays with the plain browser player, without our buttons and ads (the
{block:player.video}block is then unavailable, while{player}and[video]work).
Обновлено 17.10.2026
Пока никто не высказался. Будьте первым.