Arc youtube - Youtube plugin for Textpattern

Overview

arc_youtube

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

This plugin works well with arc_vimeo and oui_dailymotion if you are looking to support Vimeo and DailyMotion too.

GDPR: with the introduction of GDPR you may want to consider enabling the privacy mode with this plugin so that cookies aren’t automatically set on page load.

Table of contents

  1. Plugin requirements
  2. Installation
  3. Tags
  4. Examples

Plugin requirements

arc_youtube’s minimum requirements:

  • Textpattern 4.5+

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.

Tags

arc_youtube

Embeds a Youtube video in the page using an iframe.

<txp:arc_youtube />

Video and playlist attributes

  • video – Youtube url1 or video ID for the video you want to embed
  • playlist – Youtube playlist ID for the playlist you want to embed
  • custom – Name of the custom field containing video IDs/urls associated with article
  • start – Start position of the video as an integer
  • auto – ‘1’ to autoplay the video, ‘0’ to turn off autoplay (default)
  • loop – ‘1’ to play the video in a loop, ‘0’ for a single play
  • playsinline – ‘1’ causes inline playback on iOS, ‘0’ fullscreen playback

1 The url can be either for an individual video or for a playlist.

Basic attributes

  • link – Set to ‘1’ to show a link to the Youtube video page below the player; the link text will be the URL or the text between opening and closing tags
  • label – Label for the video
  • labeltag – Independent wraptag for label
  • wraptagHTML tag to be used as the wraptag, without brackets
  • classCSS class attribute for wraptag

Customising the Youtube player

Some of the attributes with this plugin are subject to change if Youtube change their supported parameters for the player. Some will not work with the HTML5 player which the player defaults to if the browser supports it.

  • width – Width of video
  • height – Height of video
  • ratio – Aspect ratio (defaults to 4:3)
  • theme – Use either the “dark” or “light” Youtube player
  • color – Use either a “red” or “white” video progress bar
  • modestbranding – ‘1’ to prevent the YouTube logo from displaying in the control bar
  • fs – ‘1’ to allow full screen, ‘0’ to disable full screen mode2
  • cc – ‘1’ to display captions/subtitles by default, ‘0’ to use the user’s preference2
  • related – ‘1’ to show related videos, ‘0’ to turn them off
  • privacy – ‘1’ for enhanced privacy mode, no cookies unless the user clicks play, ‘0’ normal mode
  • autohide – ‘2’ for the video progress bar to fade out while the player controls (play button, volume control, etc.) remain visible; ‘1’ for the video progress bar and the player controls will slide out of view a couple of seconds after the video starts playing; or ‘0’ to always show the progress bar and controls
  • controls – ‘2’ to display the controls in the player, ‘0’ to hide them
  • annotations – ‘1’ to show annotations, ‘3’ to hide them
  • title – ‘0’ to hide the video’s title and other information, ‘1’ by default to show the information

2 Not supported by the HTML5 player.

arc_if_youtube

The arc_is_youtube tag is a conditional tag and always used as an opening and closing pair. It will render the content between the tags if the video attribute is a valid Youtube URL.

<txp:arc_if_youtube video="[URL]"></txp:arc_if_youtube>

Parameters

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 Youtube URL

Examples

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

<txp:arc_youtube custom="Youtube" />

Example 2: Customise the appearance of the player and associate video with custom field

<txp:arc_youtube theme="light" modestbranding="1" custom="Youtube" />

This will use the light player theme with modest branding (i.e. removes the Youtube logo from the controls). As example 1, the video is selected using an article’s custom field called ‘Youtube’.

Example 3: Small video player with fixed video

<txp:arc_youtube width="200" video="tgbNymZ7vqY" />

Here the video is defined within the tag using the video attribute which has been given the value of Youtube’s video ID, alternatively this value could have been the video’s URL.

You might also like...
Pat if amp - ⚡ A Textpattern Conditional Plugin for Google's Accelerated Mobile Pages Project (AMP)
Pat if amp - ⚡ A Textpattern Conditional Plugin for Google's Accelerated Mobile Pages Project (AMP)

pat_if_amp Download | Packagist AMP pages for Textpattern CMS. This conditional tag examines the URL of the current page and determines if the URL end

Oui cookie - Cookie management plugin for @Textpattern

oui_cookie Introduction Set, check, read, reset or delete cookies manually or through GET/POST parameters. . According to the EU legislation, some coo

Unicode-url-for-Textpattern - Plugin for using unicode urls instead of transliterations to ASCII characters

Unicode-url-for-Textpattern Summary textpattern plugin wcz_utf8_url – uses UTF-8 permlinks instead of transliterated ones for SEO Features automatical

Rah cache minify - HTML compressor module for rah cache Textpattern CMS plugin

Minify module for rah_cache This is a minify module for rah_cache, a full-page caching solution for Textpattern CMS. Rah_cache_minify will minify HTML

Etc cache - Cache plugin for Textpattern CMS

etc_cache Download | Packagist This Textpattern plugin provides an events-driven cache solution for Textpattern CMS. Textpattern is fast, but when you

Asy jpcache - jpcache plugin for Textpattern

asy_jpcache is Full Page Caching for Textpattern1.0 rev.300 and up (including RC5). Install asy_jpcache.txt in the Admin-Panel, and click on _help_ t

Etc pagination - Pagination plugin for Textpattern CMS.

etc_pagination Download | Packagist This Textpattern plugin creates a paginated navigation bar on listings. It has a wide variety of attributes – so y

Smd imagery - A Textpattern CMS plugin for managing images in the Write panel.

smd_imagery Insert images into your Write panel. Very handy for people who run photoblog or image-heavy sites, or those who categorise images for incl

Zem contact reborn - An extensible HTML form mailer plugin for Textpattern CMS.

com_connect Contents Introduction Installing and upgrading Migrating from zem_contact_reborn Usage Tags com_connect tag com_connect_text tag com_conne

Comments
  • Auto-enable on installation

    Auto-enable on installation

    Add "auto-enable on install":http://manfre.net/project/2031/auto-enabling-textpattern-plugins to the plugin for an easier install/upgrade process.

    opened by drmonkeyninja 1
Releases(2.0.4)
Owner
Andy Carter
Senior developer at Evoluted New Media, I work mostly with Laravel and CakePHP.
Andy Carter
Arc meta - Textpattern plugin for meta tags to improve site SEO and social marketing.

arc_meta A Textpattern plugin for meta tags to improve site SEO and social marketing. arc_meta adds meta fields to your article, section and category

Andy Carter 3 Jan 20, 2017
Arc vimeo - Textpattern plugin for embedding Vimeo videos in content

arc_vimeo A Textpattern plugin for easily embedding Vimeo videos in pages using a customisable player. This plugin works well with arc_youtube and oui

Andy Carter 1 May 17, 2018
Arc admin comment preview - Simple Textpattern plugin that adds a comment preview to admin

arc_admin_comment_preview This is a Textpattern plugin for adding comment previews to the admin comment edit pages. Requirements Textpattern 4.0.8+ In

Andy Carter 1 Jan 20, 2017
TXP-Tweet - arc twitter - Twitter-Textpattern integration

TXP Tweet This is TXP Tweet, a collection of Textpattern plugins for Twitter integration. TXP Tweet consists of two plugins: arc_twitter (the core Tex

Andy Carter 11 Sep 20, 2021
Textpattern-installer - Textpattern plugin and theme installer for Composer

Textpattern Installer for Composer Package directory | Issues Install plugins and themes to Textpattern CMS with Composer. $ composer require rah/rah_

Jukka Svahn 7 Apr 14, 2022
Textpattern-for-Panic-Coda - A Textpattern CMS mode for Panic Coda

Textpattern elements for Panic Coda 2 Handy elements for use with Panic Coda 2 on a Mac when authoring files for the Textpattern CMS. This repository

Phil Wareham 8 Jun 26, 2017
This package provides a simple and intuitive way to work on the Youtube Data API. It provides fluent interface to Youtube features.

Laravel Youtube Client This package provides a simple and intuitive way to work on the Youtube Data API. It provides fluent interface to Youtube featu

Tilson Mateus 6 May 31, 2023
Ied plugin composer - Inspired Plugin Composer: Create, publish and edit plugins from within Textpattern CMS.

ied_plugin_composer Create, publish and edit plugins from within Textpattern CMS. Creates a new page under the Extensions tab where you can edit and e

Stef Dawson 8 Oct 3, 2020
MassPlugCompiler - Textpattern CMS plugin compiler

mtxpc mtxpc compiles Textpattern CMS plugin sources into installer packages. Supports multi-file structure and a JSON manifest file. Install Using Com

Jukka Svahn 5 Apr 15, 2022
Pat eu cookies law - 🌝 EU Cookie Law Compliance: A Textpattern plugin (or standalone script) for Third-Party Cookies (RGPD compliance)

pat_eu_cookies_law EU Cookie Law Compliance: A Textpattern plugin (or a standalone script) for Third-Party Cookies. A simple solution that respects th

Patrick LEFEVRE 3 Aug 16, 2020