Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
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>
Offline
Offline
Offline
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!
Offline
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)
Offline
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.
Offline
Re: oui_embed - embed everything…
maniqui wrote #306538:
I renamed
embed/
folder toEmbed/
, and got it working. You may want to mention on plugin help that if you ever release a new version.
Thanks for the report.
Offline
Pages: 1