This is a quick post to introduce you to a little plugin I wrote for wordpress, wordpress-idno-feedwidget.

The plugin creates a wordpress widget that lets you display the latest content from your Idno site in your blog sidebar. It’ll render the first 50 characters of a status update, and the titles of blog posts, with an author picture and a link to both the author profile and original posting. Image posts are also rendered, with a thumbnail view (although this could be made more efficient).

There is plenty of room for improvement; I’d like to render different types better, videos and events with an appropriate player for example, but it’s a start! The widget makes use of the JSONP endpoint, so make sure you’re using the latest codebase.

» Visit the project on Github...

I have been involved in a whole bunch of projects, both professionally and personally, which require interacting with third party APIs by calling web service endpoints.

I had to do this a lot, and essentially I found myself cutting and pasting the same bits of code about from project to project. This is obviously bad, so I took the time one morning to wrap up the code into a reusable library, and as a good open source citizen, I stuck it on Github.

Example usage

The library lets you specify an web service object, and bind it to an endpoint. You can then talk to this object and get various PHP data structures back.

Currently I’ve only written a JSON endpoint object, but it’d be easy enough to define classes to handle other formats.

e.g.

require_once('Webservice.php');
require_once('JSONWebservice.php');

$json = new \simple_webservice\JSONWebservice('https://example.com/rest/');

$result = $json->get('path/to/query', ['param1' => 'foo', 'param2' => 'bar']);

Enjoy!

» Visit the project on Github...

Quick post to point out a tiny tool that I’ve found useful while hacking together various webby thing that use and expose open graph meta tags and microformats.

It’s a VERY simple tool, that when passed a URL, will mine the page for Open Graph and Microformat data (using my Open Graph library, and Barnaby Walter’s fantastic MF2 parser). You can even execute it from the command line if you have the CLI version on your path, which I find handy.

Anyway, code on github, and you can see it running on skunk.

» See it running on skunk…

» Visit the project on Github...