Data Unbound

Helping organizations access and share data effectively. Special focus on web APIs for data integration.

November 21st, 2008

Fixing the OpenID setup my WordPress blogs

Since I want to make it easier for people to write comments on my weblogs (while not making it too easy for spammers), I added support for OpenID for my blogs by using the WordPress OpenID plugin. Unfortunately, the plug-in stopped working sometime along the way, giving rise to the following error message when users try to log in using OpenID:

    User was created fine, but wp_login() for the new user failed. This is probably a bug.

WordPress › Support » OpenID Plugin (WP 2.5) calls non-existant error() method suggests a possible solution. But I think a better one is to install more current OpenID WordPress plug-in. I've installed the plug-in on Hypotyposis on a Good Day, Mashup Guide, and Data Unbound, and Mixing and Remixing Info and tested the plug-in with two OpenID providers (myOpenID and Yahoo! OpenID)– and things seem to work. My apologies to those who had tried OpenID on my weblogs but were not able to post comments.

October 29th, 2008

How WordPress Sanitizes Tags and Attributes

Yesterday, I thought that my installations of WordPress did not allow the use of the class attribute in my span HTML elements. To fix the problem, I followed the trail of references leading from » WordPress Strips Classnames, And How To Fix It MaisonBisson.com. I learned that WordPress uses the kses PHP library to filter HTML of possibly invalid and non-secure constructs. It turned out that the kses configuration in WordPress 2.6.3 wasn't responsible for filtering out the class attributes after all — it was the HTML editor in visual mode.

October 29th, 2008

Changing various annoying aspects of WordPress

Yesterday, I came across two behaviors of WordPress (v 2.6.3), that I wanted to change:

  • the HTML editor sanitizes code in a post if you use the visual editing mode.
  • WordPress changes regular single and double quotation marks into "smart quotes", which causes major problems for snippets of code

One way to change this behavior is to edit some of the WordPress source code (the first issues could be resolved by edits described in Wordpress Editor Fix to Stop Stripping or Changing Code and the second, by changes shown in phpied.com » Blog Archive » Smart quotes in WP).

However, I was hoping that someone had come up with an approach that would not involve changing WordPress code directly, such as writing up WordPress plug-in to make the change. In the second case (of disabling smart quotes), I did find and install the Unfancy Quote Plugin For WordPress, which "lets you override WordPress' quote fancification". In the first case, I was not able to find such an appropriate plug-in and so would have to write one myself. (WordPress › TinyMCE Advanced « WordPress Plugins might be close to what I want.)

Another possible approach is to mess with my-hacks.php — although that's clearly a legacy approach. A final approach would be to stop using the visual editing mode altogether — that's the workaround that I'll use right now.

(I definitely would like to learn how to write a WordPress plug-in (Writing a Plugin « WordPress Codex) — though not today. There's a good chance I will want to render my mashup book in the form of a WordPress site — and I figure I'll have to write a plug-in or two to make that happen.)

May 28th, 2007

Notelets: hosting, Wordpress, open access repositories, Firefox, LibraryLookup

My Dreamhost-hosted sites are down again: DreamHost Status » Blog Archive » Spacey filer issues. Time to move? But where to go?

If I want to add SSL access to any of the domains I host on dreamhost.com, I will need a unique IP address, which costs an extra $4/month . Some threads on this topic: Re: Unique ip?

Since I use Wordpress to display code, I'd dearly like to get the bug #3066 (backslash disappears in <pre>) fixed.

I'm glad to see the emergence of APIs in the scholarly/library realm: OpenDOAR – About OpenDOAR – Directory of Open Access Repositories and the corresponding OpenDOAR – Application Programmers' Interface (API)

I'd like to learn how to write a FireFox toolbar. Born Geek » Firefox Toolbar Tutorial is a tutorial that might help:

    This tutorial explains how to create a toolbar extension for the Firefox web browser (specifically for version 1.5 and later). It provides an overview of how extensions are developed, the tools required to create an extension, and details on how toolbars are created. Please note that this tutorial is lengthy; I recommend spending time with it over the course of a few days (it makes for a good weekend read).

The online Barnes and Noble stor (barnesandnoble.com) uses ISBN-13 in the links to books. (e.g., RESTful Web Services) Amazon.com uses ISBN-10. Something to keep in mind to et LibraryLookup to work for Barnes and Noble.

Because I really dig Python, I perk up with any mention of free (?) Plone hosting, such as Objectis – Objectis Community

|