Zoom! Extending The SPLOTbox Media Capability

Sometimes a SPLOT just needs a little more kick.

Well maybe, but I do have a working project with an interest in using the SPLOTbox in a case where the media is from much lesser known site on the other side of the world. I could have just tossed this in as a new case to handle, but also thought a maybe more long sighted approach would be having a plugin that could extend the types of media SPLOTbox can now handle.

No surprise my implementation has some twists and turns as a function of my own sloppy code driving but also adding some features as we go.

First of all, in the current version, these are the kinds of media SPLOTbox can embed:

  • Youtube and video vimeo (via built on WordPress embed functions)
  • SoundCloud audio (also via built on WordPress embed functions)
  • Uploaded or linked mp3, m4a, ogg audio, using an embedded HTML5 audio player
  • Internet Archive Audio or Video (by request last year by Daniel Villar at Coventry, this is done by some search and replace to build iframe display, details inside)
  • Adobe Spark Video or Pages (by request from Dave Quinn, see details blogged somewhere inside this site)

Without vomiting too much code here, I pattern match the URL to see which site its from, and then use WordPress oEmbed it it’s supported, otherwise, it takes some extra magic to convert a link to its site specific embed code.

One simple thing I have in the main theme now, is direct support for TED Talk videos and giphy GIFs since both are natively embedded (strangely the latter was still not mentioned in the WordPress Codex but I’ve found it is so, I tried to edit the Codex entry).

I’ve just been dabbling with a SPLOTbox Extender plugin, that would allow someone intrepid to custom code other sites to include by either method, as it applies.

More or less the new version I am playing with checks for the existence of this plugin, and if found, it is able to bring in the settings and hijinks to extend one site’s media capabilities.

Right now this is play on the test site at http://splot.ca/box. And you can now add new content there now by using media URLs from these four services- again, giphy.com andted.com are built into the main theme, and Mixcloud and Metacafe are a site specific feature added via my test plugin.

I’ve also made the list of sites a site can accept now generated dynamically (it was hard wired into the form before):

The form area title "Enter Audio or Video URL highlights a section of text that reads "Soundcloud, YouTube, Vimeo, Internet Archive, Adobe Spark Pages/Videos, TED Talks, giphy, Metacafe, Mixcloud"

This will eventually be available, I just need to test some more and clean up the plugin. But its a viable proof of concept on a way to extend what the SPLOT can handle, without making custom mods to the main theme.

Featured Image: Image 9 from AFRC Navy team up for first-ever P-8A operational refueling mission from Joint Base Andrews shared into the public domain as a work of a US Government agency.

Privacy Statement