Skip to content

Repository files navigation

Plugin for OctoberCMS which provides easier-than-ever embedding of content from various sites and services. Optimized for Static Pages. See the Supported Providers list.

Embed Plugin

Live DemoOctoberCMS Marketplace

Build Status

Installation

OctoberCMS Backend:

Go to the plugin installation page. Search for Krisawzm.Embed and install the plugin.

Command Line:

$ php artisan plugin:install Krisawzm.Embed

Usage

Each provider is a component. Simply drag and drop any component in to a CMS page, partial, layout or content file. Then click on the component to configure its properties.

This plugin is optimized to work with the Static Pages plugin. Every component this plugin provides will also be registered as a snippet. This makes it super easy to embed things on a static page with the rich editor. This makes it really easy for even end-users or clients to do embedding - without a line of code!

Simply open a page, then click on Snippets in the menu. Select any snippet. Now click on the new snippet to configure its properties.

Plugin Settings

This plugin ships with a settings page. Go to Settings and you will see a menu item Embed listed under Misc.

By default every component will be enabled. This is in most cases unnecessary. Instead, it is recommended to only enable the components you will be needing. To do so, set the Mode to either Use all except the following Embeds: or Use only the following Embeds: -- then specify a comma separated list of component names in the text box under.

You can also specify the allowed CSS units (in addition to auto and %) to define Width/Height properties on the applicable embeds. This is particularly useful if you want to add some 'responsiveness' to non-responsive embed.

Supported Providers

Component Details

CodePen

PropertyDescription
PenThe Pen ID or the full URL copied from the browser address bar. Example: https://codepen.io/stessyco/pen/noDCi
Default TabSelect which tab shows up by default. Options:ResultHTMLJSCSS
Widget Height Height of the widget specified in elegible CSS length value. Default: 268

Flickr

Embed any Flickr URL. This includes links to photos, albums and user profiles.

PropertyDescription
URLThe full Flickr.com URL.
Widget WidthWidth of the widget specified in elegible CSS length value. Default: 640
Widget Height Height of the widget specified in elegible CSS length value. Default: 426
ResponsivenessClick here for details.Default: False

GitHub Gist

PropertyDescription
GistThe gist ID or full URL. It is recommended to include the username. Eg: krisawzm/0db0766c46a465bb40e8 or https://gist.github.com/krisawzm/0db0766c46a465bb40e8

Google Maps

PropertyDescription
PlaceThe place you want to display on the Map. Accepts any Google Maps search query. Eg: Oslo, Norway
Map TypeType of map to display. Options:RoadmapSatellite
Widget WidthWidth of the widget specified in elegible CSS length value. Default: 600
Widget Height Height of the widget specified in elegible CSS length value. Default: 450

Important note: The Google Maps component requires a API key. Get your key from Google Developers and register it in the settings page.

Google Plus

PropertyDescription
Link To PostA direct link to the post. Click on the arrow in the top right corner of a post -> Link to post

Imgur

Embed a Imgur image or album. If you are embedding an album, you must include the a/ part of the ID or URL. Image example: id, https://imgur.com/id or https://imgur.com/gallery/id Album example: a/id or https://imgur.com/a/id

PropertyDescription
PostThe post ID or URL.
Hide Post DetailsHide metadata such as username, views and number of comments. Default: False

Instagram

PropertyDescription
PostThe ID of the post or the full URL copied from the browser address bar.
Hide CaptionHide caption. Default: False

jsFiddle

PropertyDescription
jsFiddleThe ID or full URL of the fiddle you wish to display. Eg: https://jsfiddle.net/id/
TabsRemove or rearrange tabs. Default:js,resources,html,css,result
SkinWhich skin should be used. Options: LightPresentation
HeightHeight of the widget specified in elegible CSS length value. Default: 300

Kickstarter

PropertyDescription
URLThe ID of the post or the full URL copied from the browser address bar.
Display TypeHow to display the widget. Options: VideoCard
Widget WidthDefault for Video: 360 -- Default for Card: 220
Widget HeightDefault for Video: 480 -- Default for Card: 420

Note: When switching to the Card display type, it is important to change the width and height so the widget contents display properly.

SoundCloud

Embed any SoundCloud URL. This includes links to individual tracks, profiles, albums and playlists.

PropertyDescription
URLFull SoundCloud URL copied from the browser address bar.
Auto PlayPlay begin playback when the widget loads. Default: False
Widget Height Height of the widget specified in elegible CSS length value. Default: 166

Note: When embedding a playlist or user profile, you must increase the Widget Height to display the playlist.

Important note: The SoundCloud component requires a Client ID API key. Get your key from SoundCloud.com and register it in the settings page.

Spotify

Embed a Spotify Play Button.

PropertyDescription
TrackThe Spotify URI. Right click on a track -> Copy Spotify URI. Also accepts the Spotify HTTP URL.
Widget WidthWidth of the widget specified in elegible CSS length value. Default: 300
Widget HeightHeight of the widget specified in elegible CSS length value. Default: 380

Twitter

Embed a tweet.

PropertyDescription
TweetFull URL. Click on a Tweet, then copy the URL in the address bar.
Hide MediaHide media such as images and videos. Default: False

Vimeo

PropertyDescription
VideoVideo ID or Vimeo URL copied from the browser address bar.
Autoplay AudioAutomatically play audio. Default: False
TypeHow to display the widget. Options:SimplePostcard
SizeThe size of the widget. Options:300px480px600px
ResponsivenessClick here for details.Default: False

Vine

PropertyDescription
VineVine ID or the full URL. Eg: https://vine.co/v/id
Widget WidthDefault for Video: 360 -- Default for Card: 220
Widget HeightDefault for Video: 480 -- Default for Card: 420

YouTube

PropertyDescription
VideoVideo ID or Vimeo URL copied from the browser address bar.
Widget WidthDefault for Video: 360 -- Default for Card: 220
Widget HeightDefault for Video: 480 -- Default for Card: 420
ResponsivenessClick here for details.Default: False

Responsiveness

Some components have a property named Responsiveness. This makes the widget responsive -- or fluid.

The way this is done is by wrapping the widget in a div.embed-responsive element. If you are using Twitter Bootstrap, this will work automatically. However, if you are not using Bootstrap, you will have to add some CSS. Check out this Gist for an example of how you can achieve this.

Options:

  • Fixed - Disables responsiveness and uses size defined with width and height.
  • 4:3 - Enables responsiveness with 4:3 size.
  • 16:9 - Enables responsiveness with 16:9 size.

Note: When responsiveness is enabled, you can skip setting a fixed width and height.

Contributing

Bugs

If you have found a bug, please create an issue on GitHub.

Feature requests

If you want to see a provider added to this plugin, don't hesitate to let me know. Feel free to create an issue with the request tag -- or better yet, make it yourself and create a pull request.

Translations

Everyting in this plugin can be translated -- even components. If you create a translation for your own language, please give back to the community by creating a pull request!

Thanks to @exotickg1 for providing a Russian translation.

License

MIT © 2016 Kristoffer Alfheim

About

Plugin for OctoberCMS which provides easier-than-ever embedding of content from various sites and services.

Resources

Stars

8 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages