Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2016-04-06 12:18:11

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

oui_embed - embed everything…

This plugin textpatternize the use of Embed by Oscar Otero. It allows you to 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). It also add a way to cache the output of your requests to speed the page load and avoid too many external requests.

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>

Documentation | Download


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#2 2016-04-06 16:40:15

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: oui_embed - embed everything…

v0.3.3 is out…


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#3 2016-04-07 13:17:02

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

Re: oui_embed - embed everything…

Cool!


TXP Builders – finely-crafted code, design and txp

Offline

#4 2017-08-02 23:05:45

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: oui_embed - embed everything…

I’ve downloaded the plugin and installed it. I’ve also downloaded Embed, renamed the src folder to embed and copied it to textpattern/vendors.
When trying to embed something using the oui_embed tag, I get:

Fatal error: Class 'Embed\Embed' not found in /path/to/public/textpattern/lib/txplib_misc.php(1782) : eval()'d code on line 116

What could be going on?
Thanks!


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#5 2017-08-03 07:22:50

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: oui_embed - embed everything…

maniqui wrote #306524:

[…] What could be going on?

This plugin would need some improvements and a composer support but basics should work, I just tried with the last Embed release and the following tag <txp:oui_embed url="https://vimeo.com/157562955" />.
Just to be sure, you should have something like:

┌ www (or whatever directory where Txp is installed)
├── textpattern
├──── vendors
├────── embed
├──────── Adapters
          autoloader.php
          …

Last edited by NicolasGraph (2017-08-03 07:24:58)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#6 2017-08-04 04:18:47

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: oui_embed - embed everything…

Thanks.
Looking at the autoloader.php code, I noticed it could be a case-related issue (embed vs Embed). I renamed embed/ folder to Embed/, and got it working. You may want to mention that on plugin help if you ever release a new version.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#7 2017-08-04 06:10:11

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: oui_embed - embed everything…

maniqui wrote #306538:

I renamed embed/ folder to Embed/, and got it working. You may want to mention on plugin help that if you ever release a new version.

Thanks for the report.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

Board footer

Powered by FluxBB