Tags

, , , , , , , , , , , , ,

In our DITA lecture today, we learnt about Application Programming Interfaces (APIs), which are used to create a simplified programming platform that can in turn be used to share data between web services.  In the WordPress context—or at least for the free WordPress.com domain that I am using, not the more advanced WordPress.org equivalent, which allows its users more flexibility in return for downloading the service’s source code, thus modifying it in isolation—the service uses a stripped-down programming language which does not allow the dynamic embedding of content from other web services using standard HTML and JavaScript due to the security concerns associated with running an extremely extensive shared platform; that is to say, if one user were to introduce a security concern by using embedded content in this way, it could compromise many other users’ accounts in turn.

WordPress instead uses its own system of shortcodes which can be used to embed multimedia content from a predefined range of approved web services (listed here). Readers who are already familiar with my blog will have noticed the Twitter widget in the right-hand sidebar, but a substantial number of other services can also be embedded within the main text of each blog post. So far in the course of my posts, I have restricted myself to formatting tweaks and displaying freely-licensed images that I have uploaded to my allowance within the WordPress servers, but the possibilities extend far more widely than that. So, please join me on a voyage of discovery and adventure as I investigate what is possible!

First off, I will start with a platform that I have already embedded in this blog: Twitter. In addition to adding a customised Twitter lineline through the Widgets interface, WordPress also allows me to embed individual tweets. Using the tweet I used to announce my previous blog post as an example, it couldn’t be simpler to embed, as all I have to do is to copy-and-paste the URL:

However, using the “tweet” shortcode (putting the word in square brackets within the text editor) allows me further options for customisation, in this case reducing the width, aligning to the right, and hiding the media attachment linked to in the tweet:

 

 

 

 

 

 

Another popular API that can be embedded is Google Maps, which is extremely suitable for customisation given its fundamentally interactive and quantitative (in terms of co-ordinates) nature. Google Maps features a “share and embed” option in the bottom-right hand corner of the screen, which produces a string of code in standard HTML.

<a href="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2482.2083652802517!2d-0.10233599999996856!3d51.527738000000014!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x48761ca7b1d83351%3A0x570d19c20ab22a83!2sCity+University+London!5e0!3m2!1sen!2suk!4v1413804696127">https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2482.2083652802517!2d-0.10233599999996856!3d51.527738000000014!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x48761ca7b1d83351%3A0x570d19c20ab22a83!2sCity+University+London!5e0!3m2!1sen!2suk!4v1413804696127</a>

Now, I already said that WordPress doesn’t support the full version of this language, but it in fact converts this string automatically (I disabled this above by using the “code” tag to preserve the original structure) into its own house style to produce a fully-functional embedded map.

And that’s not all! All sorts of multimedia can be embedded, from various other APIs. A YouTube video URL can be posted either by itself, or with a “youtube” shortcode for customisation options, to produce this:

Audio files hosted on various platforms can also be embedded. For example, SoundCloud even has a “WordPress code” tick-box available when sharing:

WordPress also supports the embedding of resources produced by Google Office and Microsoft Office Live, in addition to similar services such as SlideShare, whose sharing interface also features a special WordPress option:

Finally, a number of meta-shortcodes create impromptu links to other pages within the blog itself, a selection of which follow.

(Archive)

(Category – general)

(Sitemap)

A full list of shortcodes supported by WordPress can be viewed here. Clearly there are some omissions: for example, it’s not possible just yet to embed a photo from Flickr or the lead of a Wikipedia article (as Google has recently begun doing in many of its search results pages), but it is an ongoing process with a great deal of potential. Using APIs to embed different web services within one another is now a fundamental feature of Web 2.0, and websites that lack such features already look dated.

From the library management perspective, you may wish to refer back to the links I provided to the Russell Group universities’ library OPACs in my earlier post. A quick survey reveals embedded Twitter timelines, image slideshows, walkthrough video guides, interactive tours, and other such interactive features. Many of these features are hosted on the institutions’ own servers, but many also make use of the API technology that underlies the sharing of information between web services throughout the modern Web.

Advertisements