billso.com

Bill Sodeman writes about management, mobile computing and information systems

billso.com header image 4

Entries tagged as 'plugin'

OpenID, ID Selector and WordPress

all

Posted Saturday, 18 October 2008

Read 1 comment

There’s a new version of the WP-OpenID plugin available. Version 3.0 includes some new features, but it is not compatible with WordPress plugins that intercept HTTP POST requests, including the following list. If you rely upon these plugins, then don’t try to install OpenID support.

This new OpenID plugin also requires some changes for sites that use the JanRain ID Selector. I posted some code on 30 April 2008 in a billso.com article called Updating WP-OpenID to support ID Selector.

Example of an OpenID selector box

The code updated the OpenID plugin to accommodate this ID Selector feature, which displays an attractive dropbox of OpenID providers in the main WordPress login box. This code won’t change the comment form at all.

Here’s the updated code, which is almost identical to my earlier work. Version 3 of the OpenID plugin shifted the login_form function to a new file, so upgrading the OpenID plugin will overwrite any previous changes that we made.

The code below should be placed inside function openid_wp_login_form() in the wp-login.php script, and should be uploaded to the OpenID plugin directory. The keyword “hex” should be replaced with the long hexadecimal string embedded in the ID Selector script that you must generate at idselector.com

Tags: administrivia, authentication, janrain, openid, plugin, WordPress

Updating WP-OpenID to support ID Selector

all

Posted Wednesday, 30 April 2008

Read 7 comments

Today I spent a few minutes modifying the WP-OpenID plugin to support JanRain’s ID Selector.

I added OpenID support to billso.com last month. This page has more information about the OpenID signle sign-on (SSO) system. Short story: OpenID lets users log in to a site with an ID they obtained on another web site. There are many different providers of OpenIDs, and many Internet users have not heard of the OpenID system.

So the ID Selector box provides opportunities to promote the OpenID system, and to add more users to a web site by supporting OpenID authentication.

Example of an OpenID selector box

The ID Selector is a small dropdown box that gives the user several choices for an OpenID provider. The system uses a small piece of JavaScript that calls a centralized server at www.idselector.com and generates an attractive selection box.

WP-OpenID doesn’t support ID Selectors yet, so I modified the code myself. The code is available in this ZIP file as interface.php

Installation is easy. Simply download my zipped file, extract the php file, edit it to include the ID Selection script that can be generated here, and upload the modified php file to your WordPress server at wp-content/plugins/openid/

The only hitch I have seen is that the selection button does not render properly in Safari, possibly because Safari uses its own weird buttons. In Firefox and Internet Explorer, it seems to work.

I’m tested this against WP 2.51 and WP-OpenID 2.1.8. I’m sure other people will find issues, so please add a comment to this post and check out my other OpenID posts, too.

For WordPress sysads who want to type in the modified code themselves, here’s an example. The code that must be changed is found in function login_form() as follows:

<label>Or login using your
<a class="<?php echo $link_class; ?>"
href="http://openid.net/">OpenID</a> url:<br/>

<input type="text" name="openid_url"
id="openid_url" class="input openid_url"
value="" size="20" tabindex="25" /></label>

</p>

<!-- this section remaps the OpenID Selector
box to the proper field on the form-->
<script type="text/javascript">
  <!--
      idselector_input_id = "openid_url";
    -->
</script>

<!-- insert the ID SELECTOR script that
you generated at idselector.com AFTER THIS LINE -->

<!-- BEGIN ID SELECTOR -->

<script type="text/javascript"
id="__openidselector"
src="https://www.idselector.com/selector/hex"
charset="utf-8"></script>

<!-- END ID SELECTOR -->
<!-- the rest of the interface.php
proceeds as originally written-->

<?php
}
Tags: administrivia, authentication, janrain, openid, plugin, WordPress

Userscripts

all

Posted Friday, 22 February 2008

Read 2 comments

These are scripts I have written for Greasemonkey, a Firefox plugin that is available on this page.

Internet Duct Tape has an excellent explanation of what Greasemonkey is and how to install this handy extension.

If you already have Greasemonkey installed, click any of the links below to install that script.

Tags: Firefox, greasemonkey, linkedin, plugin