Oui embed - (o)Embed plugin for @Textpattern

Overview

oui_embed

Embed everything…

Get information from any web page (using oembed, opengraph, twitter-cards, scrapping the html, etc). It’s compatible with any web service (youtube, vimeo, flickr, instagram, etc) and has adapters to some sites like (archive.org, github, facebook, etc).

Download | Donate

Table of contents

Plugin requirements

oui_embed’s minimum requirements:

Installation

  1. Download Embed by Oscar Otero, rename the src folder to embed and paste it in your textpattern/vendors folder;
  2. paste the content of the plugin file under the Admin > Plugins, upload it and install.

Preferences

Visit the plugin prefs to add additional parameters or key needed for some providers.

Tags

oui_embed

Single or container tag use to embed your stuff.

<txp:oui_embed url="…" />

Attributes

Required
  • url="…"Default: unset – The url from which you want to get any information.
Recommended
  • cache_time="…"Default: 0 – Duration of the cache in seconds; during this time the result of the tags request will be stored in the Txp cache folder and read from there, avoiding too many external requests.
Optional
Single tag use
  • class="…"Default: unset – The css class to apply to the HTML tag assigned to wraptag.
  • type="…"Default: code – The information to retrieve from the url feed. Valid values are title, description, url, type, tags, images, image, imageWidth, imageHeight, code, width, height, aspectRatio, authorName, authorUrl, providerName, providerUrl, providerIcons, providerIcon, publishedDate (More informations).
  • label="…"Default: unset – The label used to entitled the generated content.
  • labeltag="…"Default: unset – The HTML tag used around the value assigned to label.
  • responsive="…"Default: unset – Uses a div as wrapper if the info attribute value is code and adds a padding-top to it according to content ratio. You still need to set the rest of the css rules. Useful for video embed.
  • wraptag="…"Default: ul – The HTML tag to use around the generated content.
Container tag use
  • class="…"Default: unset – The css class to apply to the HTML tag assigned to wraptag.
  • label="…"Default: unset – The label used to entitled the generated content.
  • labeltag="…"Default: unset – The HTML tag used around the value assigned to label.
  • wraptag="…"Default: ul – The HTML tag to use around the generated content.
Special
  • hash_key="…"Default: 194820 – A number used to hash the 32-character reference assigned to your query and to generate a key for your cache file (you shouldn’t need to change that).

oui_embed_info

Single tag to use in a oui_embed container tag.

<txp:oui_embed url="…">
    <txp:oui_embed_info info="…" />
</txp:oui_embed>

Attributes

See oui_embed optional attributes for single tag use.

Example

Single tag use

<txp:oui_embed url="https://youtu.be/aVARdqevPfI" />

returns:

<iframe width="480" height="270" src="https://www.youtube.com/embed/aVARdqevPfI?feature=oembed" frameborder="0" allowfullscreen></iframe>

Container tag use

<txp:oui_embed url="https://vimeo.com/157562955" label="Embed" labeltag="h1">
    <txp:oui_embed_info type="code" responsive="1" label="Video" labeltag="h2"   />
    <txp:oui_embed_info type="title" label="Title" labeltag="h2" wraptag="p" />
</txp:oui_embed>

returns:

<h1>Embed</h1>

<h2>Video</h2>
<div class="oui_embed " style="padding-top:56.25%">
    <iframe src="https://player.vimeo.com/video/157562955" width="1920" height="1080" frameborder="0" title="The Uses of Envy" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>

<h2>Title</h2>
<p>The Uses of Envy</p>

Styling

Responsive use

To make your embed content fit the width of its container and keep its ratio, use the responsive attribute…

<txp:oui_embed url="…" responsive="1" />

…and add the following css rules to your stylesheet.

.oui_embed // or your wrap class // {
    position: relative;
    width: 100%;

    iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

Author

Nicolas Morand

Licence

This plugin is distributed under MIT license.

You might also like...
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

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

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

Arc youtube - Youtube plugin for Textpattern

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

Releases(v0.3.3)
Owner
Nicolas Morand
@drupal/@symfony developer @maetva
Nicolas Morand
Oui instagram - Instagram user infos and recent images embedding plugin for @textpattern

oui_instagram Easily display Instagram recent images galleries. Plugin requirements required: Textpattern CMS 4.6+. recommended: aks_cache or any part

Nicolas Morand 4 Feb 20, 2020
Oui player - Manage configurable media players in @Textpattern CMS

oui_player Introduction An extendable plugin to easily embed customized audio and video players. . This plugin does not use oembed, it builds iframe e

Nicolas Morand 3 Aug 15, 2018
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
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
Michael Pratt 307 Dec 23, 2022
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
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

Patrick LEFEVRE 4 Dec 15, 2019
Arc social share - A Social Bookmarking Plugin for Textpattern

arc_social_share A Social Bookmarking Plugin for Textpattern; easily add links for sharing content with numerous social networks. arc_social_share 1.4

Andy Carter 5 Nov 15, 2022