1. Installing the WPOpenID plugin, and the JanRain PHP OpenID library Like any Wordpress plugin, the wpopenid directory needs to be copied into Wordpress' wp-content/plugins/ directory. The JanRain PHP OpenID library is included in the plugin zip or tgz archive, and shouldn't require any additional installation. An example directory structure with the library installed in the plugin directory: blog/ wp-content/ plugins/ wpopenid/ README openid-registration.php user-interface.php images/ openid.gif Auth/ OpenID.php OpenID/ Consumer.php ... Services/ Yadis/ Yadis.php ... 2. Modifying theme's comments.php for better styles If a blog requires registration & login before accepting comments, then comments.php displays a link to the login form. Augment it with a quick and easy OpenID login form. If a blog permits anonymous commenting, the plugin tries to modify the form to include an OpenID field, and then wrap the anonymous text fields with semantically valid markup indicating a choice between OpenID and Anonymous comments. You can turn this feature off in the OpenID Options pane, and modify your templates yourself. Here is part of the modified comments.php from the default Kubrick theme.

You must be logged in to post a comment.


Logged in as . Logout »

Login Method

OpenID

Anonymous

3. Useful Hooks For use in Wordpress template files, exist the following functions: Anywhere: is_user_openid() - return true if the currently logged in user registered with OpenID. In the LOOP: is_comment_openid() - return true if the current comment was left by a user logged in with OpenID. get_comment_openid() - prints OpenID logo if is_comment_openid() is true. Comment Form: wpopenid_comment_form() - 4. Form Element Names On a comment form: