One of the things that I thought it’d be cool to be able to do with Idno, is to be able to embed a post into a blog post, rather like you can with a tweet or public Facebook posting.

Embedding posts mean that you can take a posting that you or someone else has written on their Idno site, and then build up a conversation around it.


So, I wrote a quick plugin that provides this functionality!

This current version uses an iframe to display an embed view of the selected object, using code inserted using the JSONP api, which gives you a live view of the object complete with latest comment count and using your site’s theme choices. Future versions of the plugin may make more use of the raw data returned via the JSONP endpoint.

All links will open in a new tab, so if you want to see the comments (or comment directly, if the site in question uses my in place comments plugin), then you can follow links without causing problems.

Have fun!

» Visit the project on Github…

idnoJSONP, or json with padding, is a technique hack that allows you to retrieve json content from a remote page, and pass that content to a Javascript function, without falling foul of the browser XSS same origin policy.

Idno has had a JSON view of it’s data objects for some time, but up until now it has been hard to call that data from within javascript, unless you were doing it from the same domain.

So, I sent Ben a pull request which adds JSONP support to Idno core, together with some enhancements to the data the standard JSON view provides.