Someone else has written a (imho) better plugin. I have a backlog of tweaks to do to this plugin to make it work on more systems which I haven’t got around to blogging/integrating. Note that this new plugin does not support using your blog as an OpenID server. It does, however, support sreg (but not hCard) and integrates into the WordPress account system.
I have modified Alexander Nikulin’s plugin for WordPress that enables users to leave authenticated comments using OpenID and enables blog owners/contributors to use the blog as their OpenId. I have made the plugin compatible with WordPress 2.0, cleaned up the validity of the XHTML produced, and fixed a bug that kept some sites from finding the server.
It is reccomended that when using the server the blog admin use the blogs main URL as their OpenID but that other users/contributors use BLOGURL/?author_name=USERNAME.
When returning to the post page after posting a comment, if the comment was held for moderation ?moderated=true is appended to the URL. Adding code like the following will alert your users to this fact:
<?php if($_GET[‘moderated’] == ‘true’) echo ‘<div style=”display:block;padding:20px;background-color:#ccc; font-weight:bold;font-family:sans-serif;font-size:12pt;”> Your comment is awaiting moderation.</div>’; ?>
Possible future features:
- Support for sreg / hCards to get an actual name for the commentor instead of just using their URL
- Support for sreg / hCards in the server implementation
- Support for YADIS
Download the plugin
To install the plugin:
- Download the gzip from the link above and unzip it
- Upload the resulting folder into your /wp-content/plugins/ directory
- Edit your template and replace your comments form code (likely in comments.php) with
<?php include dirname(__FILE__).’/../../plugins/openid/openidform.php’; ?>
My previous YubNub extension suffered from several glitches. While it was useful, it annoyed me enough to get me to research a new format. So I have written a new extension. This one functions a little differently and so I will leave the old one up. This extension modifies the standard FireFox location bar to support YubNub commands. If the entered text is determined to be a URL the location bar will function as normal, otherwise the text is passed to YubNub. No more second bar, no more glitchy locationbar behaviour, just straight YubNub integration. All YubNub commands will work, including single-word commands without parameters.
Download YubNub Locationbar
Version 0.11 has been released which fixes a glitch that broke access to about:config and typeing some javascript: URLs
Version 0.12 has been released which fixes a flitch that caused commands that are passed URLs not to work
Version 0.13 has been released which adds a command history feature. Simply push your up/down arrow keys while in the location bar to access the command history.
Version 0.14 has been released which fixes some minor bugs with navigating to local IPs, and also allows defined FireFox keyword bookmarks to supercede YubNub commands.
Version 0.15 has been released which has some minor improvements to the look and feel of the extension, and also now allows local firefox bookmarks to use switches (using the same syntax as YubNub proper). It also stores up to 50 commands from your command history between sessions now.
Version 0.16 has been released. Support for non-standard URLs (such as those from nic.d. Arrow-key history navigation broke some default Firefox features, so it is now Ctrl+Arrow Key. A hackish integration with Firefox auto-complete history has also been coded. Type y: before a command to have the auto-complete work (or just to force it into YubNub mode).
Version 0.17 has been released which fixes some minor URL resolution bugs.
Version 0.19 (0.18 was released silently) fixes some minor bugs noted in the comments. There is also now an entry at mozilla. Please review there if you find this useful!
There is some work going on at the microformats site to provide a datatypeing mechanism for microformats. XOXO being the most flexible format, it stands to gain much from such a system. While the work is as yet not done, it has come a fair way since I first saw it. Here is a basic overview of the system as it applies to XOXO :
Add the class ‘typed’ to the root XOXO element to specify that this XOXO makes use of datatypeing. Then, to each ‘a’ or ‘dd’ tag add one of the following classes:
- ‘string’ for strings (this is the default if you do not specify a datatype class)
- ‘boolean’ for boolean values (should be in page as ‘1’ or ‘0’)
- ‘int’ or ‘long’ for integer values
- ‘double’ for decimal values
- ‘datetime’ for dates and times (should be encoded using the datetime-design-pattern)
- ‘binary’ for binary data (should be encoded using a data URI)
- ‘nil’ for NULL values
Note that other field types (such as HREF and TITLE) will simply always be treated as strings and this can only be applied to the direct contents of ‘a’ or ‘dd’ field-tags.
XHTML validity is a buzzword around the Internet, but many people generally agree that it is not all that important. It has its advantages, but it is not the end of the world if you can’t quite get it. XML well-formedness, however, is very important. Why? Because it makes server-side hackery much easier. That may not be the only reason, but it is an important one. Some people have mastered the art of screen-scraping with RegExps, but I and others like me have never quite mastered that often-complicated technique. Instead, it is much easier to parse the webpage as XML and pull out the data that way. This works especially well when the page is known to conform to some standard (as in the code addition for Blogger Recent Comments).
While some leniancy can be built in, here are some basic guidelines for keeping your pages well-formed and making our job that much easier:
- XHTML empty tags — some tags, such as <br>, <link …>, and others used to be written in HTML as you see them there. This breaks XML well-formedness. Instead, one should use <br />, <link … /> and the like. (note to advanced users, this can be partially overcome using a RegExp line similar to $XMLdata = preg_replace(‘/<(img|meta|link|hr|br)([^<>]*?)([\/]?)>/i’,'<$1$2 />’, $XMLdata); )
- Escaping out Ampersands — Many URLs contain the ‘&’ character, and sometimes this character is used in content as well. If this character is left unescaped it breaks XML well-formedness. Use ‘&’ instead. (note to advanced users, this can be mostly overcome use a RegExp line similar to $XMLdata = preg_replace(‘/&([^;]{10})/i’,’&$1′, $XMLdata); )
- Escaping Scripts — JavaScript code will often contain characters that must be escaped out in XML, but which cannot be escaped out if the script is to work. To overcome this you add ‘//<![CDATA[‘ after every <script> tag and ‘//]]>’ before every </script> tag.
- Closing tags — Some tags, such as <p> are often inserted by web designers without a closing tag. instead of ‘<p>text<p>more text’ use ‘<p>text</p><p>more text</p>’. Note that XML is case-sensetive, so if you open a section, say, with <head> you must end it with </head> not </HEAD>
- Quoting Attributes — <p class="1"> not <p class=1>, etc. Quotation marks always go around attributes, no matter what.
- Non-tag < > — If you reference a Blogger template tag (such as <$BlogID$>) or for some other reason need to include a < or > character in content, you must escape it out with < or >, respecively.
A note about content : Blogger’s post form and comment form is not very good at checking XML well-formedness. Thus if you want to maintain a (at least mostly) well-formed page you must follow these rules in any code entered in these forms. For example, if you enter a < character in the blogger post form, it does not escape it out for you, you must actually enter <, and the same goes for the comment form. This is sometimes annoying if you are trying to maintain full XML well-formedness because a well-meaning commentor can sometimes mess up your well-formedness and you must go and edit their comment. This is not usually the biggest problem, however, since it is usually one of the first two problems which can be overcome as noted. You can check for XML-formedness without validating XHTML using this tool.
So Trev tagged me and I’m gonna do this thing:
3 things I want to do or see before I die
- Get married
- Have kids
- Bring glory to God through my life
3 things I can’t do
- I cannot do anything remotely athletic
- I cannot draw
- I cannot fly
3 things that attract me to the opposite sex
- Sense of humour
- Being accepting
- Holding fast to morals and integrity
- Only three? that’s nuts!
- Long hair (will people kill me if I list some physical stuff too? 😉 )
3 books and movies I love
- The Bible
- Byzantium and anything else by Stephen Lawhead
- Black, Red, White — Ted Dekker
- Many more 😉
3 things I say most often
- 😉
- What? Me?
- Chels
3 things you should know about me
- I speak French
- I don’t speak Latin (yet)
- I must be asked a more specific question to gain more insight ;P
And so I do tag my brother Daniel