Download the PHP package nr/fieldtypeoembed without Composer
On this page you can find all versions of the php package nr/fieldtypeoembed. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nr/fieldtypeoembed
More information about nr/fieldtypeoembed
Files in nr/fieldtypeoembed
Package fieldtypeoembed
Short Description Collect and store Oembed Data
License MIT
Homepage https://github.com/neuerituale/FieldtypeOembed
Informations about the package fieldtypeoembed
FieldtypeOembed
What it does
Store, collect and update oembed data from external sources. This module uses the great PHP Library Essence by Félix Girault and adds some processwire magic. It is inspired by Ryan's example module FieldtypeEvents and the TextformatterOEmbed module by felixwahner. Thanks!
Features
- Simple embedding of content via oembed endpoints and opengraph crawling
- Backend preview
- Searching in oembed data with $pages->find()
- Autoupdate with lazycron
- Support for ProcessGraphQL with the additional module GraphQLFieldtypeOembed
- Filter result with hooks
Install
- Copy the files for this module to /site/modules/FieldtypeOembed/
-
Execute the following command in the /site/modules/FieldtypeOembed/ directory.
- In admin: Modules > Refresh. Install Fieldtype > Oembed.
- Create a new field of type Oembed, and name it whatever you would like. In our examples we named it simply "embed".
- Add the field to a template and edit a page using that template. Enter a (embed)-url in the field and save the page.
Install via composer
- Execute the following command in your website root directory.
Configuration
Modules > Configure > FieldtypeOembed
Lazycron
Set up the Lazycron schedule. The cache expiration is configurable in the field settings.

Custom Provider for Essence
You can configure your own Oembed or OpenGraph providers for Essence.
How to add custom providers (Essence Git)
You can disable all providers
Field settings
Fields > embed > Details
The FieldtypeOembed extends the FieldtypeURL (core).
In addition to these settings, you can also set the cache time for the oembed data.
The lazycron will update the data.

Field preview

API
Returns the Oembed object (WireData)
Check emptiness
``
Render
Result Hooks
If you want to filter or change the results of the oembed provider, use the hookable methods e.g. ___filterProps().
In this example we want to get the high resolution version of the thumbnail of a YouTube video.
The Oembed object
`
Find pages
You can query the oembed result fields
GraphQLFieldtypeOembed
You can query this field over ProcessGraphQL.
Please install the additional module GraphQLFieldtypeOembed.
Field definitions
Todos
- Remove extend urlfield!
- remove _oembed helper construct (dirty)