OpenID Comments
OpenID Comments for Movable Type
Download OpenID Comments 1.7 (14 November 2006)
Changes since 1.5
- Finds userpic/avatar images in commenters' FOAF profiles, and provides them with the
MTCommentAuthorPictureURLtag. - Properly handles cancelled signins.
- Signing out of the blog no longer signs commenters out of TypeKey.
- Per-blog option to disable inline styles in the
SignOnThunktags.
Using OpenID Comments
To install, unzip the archive to your MT directory. (If you run MT in a cgi-bin or aren't using the standard location for mt-static for some other reason, move the mt-static/openid-comment directory into your static web path.)
The plugin is now installed, so you can configure the individual blogs that should accept OpenID sign-ins. On the weblogs that should accept OpenID sign-ins, if you don't already accept TypeKey sign-ins, go to Settings → Feedback and set up authentication with the "Setup Authentication" button.
Note: you must have the "Require E-Mail Addresses" option off to accept OpenID sign-ins. OpenID does not provide you with email addresses like TypeKey does.
After enabling authentication, edit your templates to add this template code before the comment form HTML:
<MTOpenIDSignOnThunk>
Now you're all set! Try signing in with your LiveJournal or TypeKey account to test it out.
Form configuration
Using the <MTOpenIDSignOnThunk> tag is intended to be the easy, quick way to add the sign-in form to your site. However, you can customize the form if you wish. As of OpenID Comments 1.7, this is the HTML for the sign-in form:
<div id="openid">
<form method="post" action="<MTOpenIDSignOnURL>">
<input type="hidden" name="entry_id" value="<MTEntryID>" />
<input type="hidden" name="__mode" value="signon" />
<p>
<label>Your blog URL:</label>
<input name="openid_url" size="35" value="" />
<input type="submit" value="Sign in" />
</p>
</form>
</div>
This plugin provides several tags for use in publishing or composing this form:
<MTOpenIDSignOnThunk>- The entire form as above, with special styling to show the OpenID logo.
<MTLiveJournalSignOnThunk>- A special version of the form above, prompting the user to enter a LiveJournal username instead of a full OpenID URL. The plugin will authenticate LiveJournal users by converting the username into a
http://www.livejournal.com/users/username/OpenID. <MTOpenIDSignOnURL>- The URL to the sign-in form, for use in the HTML
formtag. <MTStaticWebPath>openid-comment/openid.gif- The URL to the OpenID logo, as used in
MTOpenIDSignOnThunkand comments left by OpenID users. <MTStaticWebPath>openid-comment/livejournal.gif- The URL to the LiveJournal logo, as used in
MTLiveJournalSignOnThunkand comments left by LiveJournal users.
Future enhancements
See my todo list in Backpack for possible future enhancements.
I just tried to sign in to post a comment here, and got this error message:
This blog requires email addresses from commenters, which are not available when signing in with OpenID. Please inform the owner of the blog that the "Require E-mail Address" option should be disabled to allow OpenID sign-ins.
You might want to fix that!
Surely! I must have left it on when I was testing once (I hope). Thanks for the note.
Thanks much for providing this! Way cool, and very useful, and seems to work fine.
However, I wanted to make a suggestion about the installation instructions:
As someone fairly new to MT, it took me a while to figure out what to do with the unzipped files.
Your instructions say to put them in the MT directory; I moved the unzipped openid-comment-1.6 directory into my main MT directory, but nothing happened.
I eventually figured out that I needed to move the files in openid-comment-1.6/php/plugins/ to (mt-directory)/php/plugins/, and to move the openid-comment-1.6/plugins/openid-comment/ directory to (mt-directory)/plugins/ -- that seems to be working. But it would be great if you could change your instructions to make clear that that's how to install. Also, I'm not sure whether I need to do anything with the pmtoblib file.
But all that's minor; the plugin seems to work well and smoothly. Thanks again!
I just upgraded to MT3.2 and installed this plugin, but upon going to an individual archive, I get:
"Smarty error: [in mt:14 line 112]: syntax error: unrecognized tag 'MTOpenIDSignOnThunk' (Smarty_Compiler.class.php, line 580)"
Hey, when LJ users try to use this on my site, they get an error return of "Can't call method 'nickname' without a package or object reference at signon.cgi line 270." It works fine with typekey or my own OpenID server.
Since most of the people who actually comment on my blog use LJ, this is bad. Any ideas?
That would seem to indicate your database has OpenIDIdentity records without the related Author records. If you're willing to mess with the database, removing those OpenIDIdentity records will let the sign-on process make new ones. Otherwise it'll need a code fix.
Just testing a comment here with my brand new openid+delegate setup.
Even a Marketing Guy was able to get this up and running. I was wondering if you have a plan to incorporate the newest libraries that allow the use of XRIs (i-names).
Alas, going blowing away the old OpenID data in the database produces "Unknown action signon."
I suspect I'm doing something stupid. I'll beat it with a stick next week.
They had both author and OpenID records. I blew them away (I have a backup) and got, "Unknown action signon."
I suspect I'm doing something stupid. I'll beat it with a stick next week.
D'oh! Sorry about the duplicates. facepalm
I upgraded to 1.7, too, BTW.
D'oh! Sorry about the duplicates!
Okay, now that I'm at home and paying attention, there was one OpenID identity that didn't have an author associated with it. Deleting that one user out of the openididentity table seems to have done the trick.
As for what I was doing at work that produced the "Unknown action signon" error, I suspect that was a templating mistake on my part.
Thanks!
Just testing this out... very interesting.
This is awesome stuff. So very easy to use, too. How do you specify a default image if your commenter doesn't have one/isn't signed in?
Thanks!
You can specify a
defaultattribute on MTCommentAuthorPictureURL with the URL to fall back to. You can also play with MTIfEmpty, if you want to do something more complicated, such as also use the Gravatar plugin.How do you get the plugin to pull the OpenID profile's name or nickname from the OpenID server and display that rather than just their OpenID URL as their name? It looks like you're doing it on this site, so I must just be missing something. I've looked through the documentation but I can't seem to find anything about it.
The plugin automatically uses data from commenters' FOAF documents, if declared on their identity pages. For example, in addition to the OpenID headers, my identity page says:
<link rel="meta" type="application/rdf+xml" title="FOAF" href="http://markpasc.org/mark/index.foaf" />so it gets my name and userpic from there. If no FOAF is present, the plugin will also look for an Atom feed, and use the feed's author name if it can.
Sorry it's not documented except in the Changes file (which doesn't really count). I figured half the people installing the plugin wouldn't know or care about FOAF or Atom, and it's something the commenter has to do anyway, so it's intended to be automatic. :)
Hi Mark,
I'm getting the dreaded "Unknown action signon" error message when trying to sign on with my OpenID URL. I've read the above comments but don't see any suggested workaround.
Note that my TypeKey seems to be working okay though.
Thanks.
MK
I should have added that this is happening when your plug-in is installed on my MT blog, not yours.
The "Unknown action signon" error could appear if the
formtag has the regularmt.cgifor the action, rather thanplugins/openid-comment/signon.cgi. It's hard to diagnose without seeing the HTML and the login exchange. Is it a public blog?Aha! You helped me figure it out. I had the OpenID form inside the mt-comments form tag. Put it outside and it's now working...
Thanks!
I'm delegating like a mofo.
I notice both here and in my own test install that the OpenID login process doesn't return you to the same URL when completed. As in (using this page as the example), if I come to this page at openidcomments/ and then login via OpenID, I'm returned to openidcomments/index.html instead.
On my own site, at any rate, I find this behavior annoying because the user isn't ever meant to see the index file name, and doesn't see it under any other conditions.
If there a way to get the post-OpenID-login redirect to go to the proper URL?
Works wonderfully. Thanks for that!
I had the excellent OpenID plugin working without a problem, then I upgraded to MT 3.34 and reinstalled it and it doesn't work.
When I type in my website details it does send me off to my authentication system to login and accept the sharing of details (just like here) and when I come back the comment form looks just the same - all details blank and waiting to be filled out, including the OpenID sign on.
Any chance you could help out and have a quick look? I can supply the page code.
Many thanks.
Richard
Is it possible to edit the code so that you don't have to disable the "email address required" setting in MT? Or else, is there code to change Movable Type's comment feature so it will not require the email request field if the openid field is filled in?
I tried looking at the MT code, but I'm a programming amateur, and don't know if I'd need to change a template, or actually change the code itself in my installation of MT.
thank you very much for your nice job.
When using your plugin, the Preview function is broken.
That is, once you hit on Preview and submit your post then, you will no longer submit the post as someone being logged into OpenID.
Although it continues to use the name that this plugin extracted from your OpenID. But you are no longer authenticated, there is no icon next to your name in the Movable Type App, you're just like a regular commenter that didn't sign in.
Also, this plugin really needs AJAX or at least a way to retain the text a user has written before logging in. Imagine you fix the Preview functionality, and a user only decides to log in in the Preview screen.
very useful plugin of Movable Type
in your post you say that "OpenID does not provide you with email addresses like TypeKey does." It actually does give you an email address.
How would I get my signin URL replaced with my real name in the comments using this approach?
In my setup, I use jschuur.com as the OpenID URL, which currently just redirects to dearest.cope.rnic.us and has open.server/delegate entries that point to jschuur.myopenid.com. Some OpenID authenticated users posting here (Katherine, Mark, Adam) seem to have their real name next to their posting and not the URL.
Are there any additional setup steps I'm missing?
ali: While you can infer the owner's email address from a FOAF or other document declared by the identity URL's resource to be related (YADIS documents being a structured facility for this), I don't see anywhere in the OpenID 1.1 spec there's an email address involved (especially as the second sentence of the entire document reads, "It does this without passing around their password, email address, or anything they don't want it to").
Messing about with this, I'm noticing that <MTLiveJournalSignOnThunk> is perfectly happy to live inside the comments HTML. Is there some reason why that works, but the main thunk doesn't? (Should it not?)
(er, the "it" in "should it not" referring to the LJ thunk. Insufficient coffee. To wit: Should that thunk not work the way it's working for me?)
Hi. First- thanks for the plugin!
Two questions:
1) My users have been complaining that if they use the "preview" option for the comment, esp. if they preview it more than once (for fixing errors), they get logged out. Is that a known issue?
2) How can I tell the plugin which info from the FOAF to display? For example, I want it to use the user's nick instead of the name of the person for the display.
Thanks!
Also, the handeling of the poster's url seems to be a bit messy. Is there a way to have $MTCommentAuthorLink$ contain the commenter's URL without them actually having to enter it again after logging in? Perhaps from their FOAF and then a fall-back to the info from their OpenID?
测试
I tried using this on one of my blogs and when I test it to sign in I keep getting this error message:
"This is Movable Type's OpenID server endpoint, not a human-readable resource. For more information, see http://openid.net/.
Get public key."
Excuese me Sir, how to solve "Unknown action signon" problem?
Does this plugin support MT 4.0?
No, OpenID comment registration is built into MT 4.0.
Great plugin, thanks for sharing :)
Testing to see if a clue gleaned from here will show my Name!