"Plugin Requirements":#help-section01

February 10, 2016 ยท View on GitHub

h1. arc_vimeo

A Textpattern plugin for easily embedding Vimeo videos in pages using a customisable player.

This plugin works well with "arc_youtube":https://github.com/drmonkeyninja/arc_youtube and "oui_dailymotion":https://github.com/NicolasGraph/oui_dailymotion if you are looking to support YouTube and DailyMotion too.

h2. Table of contents

"Plugin Requirements":#help-section01

"Installation":#help-section02

"Tags":#help-section03

"Examples":#help-section04

h2(#help-section01). Plugin Requirements

arc_vimeo's minimum requirements:

  • Textpattern 4.5+

h2(#help-section02). Installation

To install go to the 'plugins' tab under 'admin' and paste the plugin code into the 'Install plugin' box, 'upload' and then 'install'. Please note that you will need to set-up a custom field to use for associating videos with articles, unless you choose to directly embed the new tag in the article text.

h2(#help-section03). Tags

h3. arc_vimeo

Embeds a Vimeo video in the page using an iframe.

bc. <txp:arc_vimeo />

h4. Video attributes

  • video - Vimeo url or video ID for the video you want to embed
  • custom - Name of the custom field containing video IDs/urls associated with article

h4. Basic attributes

  • label - Label for the video
  • labeltag - Independent wraptag for label
  • wraptag - HTML tag to be used as the wraptag, without brackets
  • class - CSS class attribute for wraptag

h3. Customising the Vimeo player

You can customise the appearance of the Vimeo player using this plugin to define things like colours and size.

  • width - Width of video
  • height - Height of video
  • ratio - Aspect ratio (defaults 4:3)
  • color - A hex colour code for the player UI elements
  • portrait - '0' to disable the user's portrait
  • title - '0' to disable the video's title
  • byline - '0' to disable the video's byline
  • badge - '0' to disable the video's badge
  • loop - '1' to loop the video on play
  • autoplay - '1' to autoplay the video, '0' to turn off autoplay (default)
  • autopause - '1' to autopause the video when another is played on the same page

h2. arc_if_vimeo

In addition to arc_vimeo this plugin also comes with arc_if_vimeo, a conditional tag for checking if the video URL is a Vimeo one.

bc. <txp:arc_if_vimeo video="[URL]"></txp:arc_if_vimeo>

h4. Attributes

Use one or the other of the following:-

  • custom - Name of the custom field containing video IDs/urls associated with article
  • video - A URL to check if it is a valid Vimeo URL

h2(#help-section04). Examples

h3. Example 1: Use custom field to associate video with an article

bc. <txp:arc_vimeo custom="Vimeo" />

h3. Example 2: Set the size of the player

bc. <txp:arc_vimeo video="https://vimeo.com/86295452" width="500" ratio="16:9" />

h3. Example 3: Using the conditional tag

bc.. <txp:arc_if_vimeo video="https://vimeo.com/86295452"> Yes <txp:else /> No </txp:arc_if_vimeo>