« Template Inheritance - Templates that Inherit code from other Templates | Main | Fast Search 2.0 - Tag Search and More »

Comment Registration for Movable Type

Comment Registration is a plugin for Movable Type that enables readers to register an account on your site and login to post comments. Commenters register and login directly with your site, not via an external authentication service (this plugin does not use TypeKey).

Movable Type supports comment registration (authentication), but commenters must register and sign via TypeKey, a centralized authentication service offered by Six Apart (the makers of MT). While this "remote authentication" approach has some key advantages, there are also reasons why you might prefer a "local authentication" system. The Comment Registration plugin provides this option.

Comment Registration works with the built-in Commenter system of MT (see the "Commenters" menu item on the left-hand navigation menu). When someone creates a commenter account on your site and posts a comment, they will appear on the Commenters screen, including their Nickname, username, URL, email, and a tally of their comments:

Note: Commenters must post at least one comment before they appear on the Commenters listing. If someone creates an account but does not post a comment, they will not appear in the listing.

Because the plugin uses the the built-in Commenters system, you can use all the MT commenter features, such as:

  • Trusting and Banning commenters:
  • Settings for accepting comments:
  • Settings for publishing comments:

Comment Registration comes with 4 default templates (based on the default MT3.3 templates):

Commenter Login - An index template that contains a login form for commenters.
Commenter Registration - And index template that contains a form for creating a commenter account on your system.
Site Javascript - This is a replacement index template for the existing Site Javascript (mt-site.js) template. (Your existing Site Javascript will be renamed as a backup during installation).
Widget: Commenter Login - A Widget Manager widget that you can add to your sidebar, containing a login form for commenters.

Test it Out Now

Head over to the MT Hacks Test Blog and register for an account and then submit a few comments. Start at this test entry by clicking here.

Installation:

  1. Extract the files from the zip file, and upload the contents of the 'plugins' directory to the 'plugins' directory of your MT installation.
  2. Change the permissions on the mt-login.cgi file to 755 (CHMOD 755).
  3. Browse to the blog you want, then go to Settings - Plugins, and then the Settings button for Comment Registration. You will notice that the plugin has no settings of its own, but you will find a link to install the default templates. Click that link. The default templates will be installed and rebuilt.
  4. You must have Authentication enabled for the default templates to work (if you currently allow TypeKey authentication, you can skip this step). Go Settings > Feedback and find the "Authentication status" setting. In field after "Or, manually enter token", enter some text (anything will do).
  5. (Optional) Adjust the Feedback settings for accepting and publishing comments (see images above) as desired.
  6. Save Feedback settings and then manually rebuild the Site Javascript (mt-site.js) index template.

Get Comment Registration

Comment Registration is free for personal use, but you must place a link on your site, such as:

Powered by the <a href="http://mt-hacks.com/commentregistration.html">Comment Registration</a> plugin for Movable Type.

Donations are appreciated:

Download

Download Now
Downloads: 285

Commercial License (up to 5 blogs) - $97

Blog Network License (unlimited blogs) - $249

Note for multi-blog installations / blog networks: commenters need only create one account and can use the same login for all of the sites on the same MT installation.

As always, comments and feedback are appreciated. Please reply to this entry.

Rate this entry:

  • Currently 5/5
  • 1
  • 2
  • 3
  • 4
  • 5
Rating: 5/5 (1 votes cast). Powered by the Ajax Rating plugin.

Comments (43)

Very nice, once again, Mark. But just a couple of things I've noticed...

When I tried to register as "dafyd", it said that the username already existed. Is that because I had previously submitted a comment here?

Presumably commenters are shared across blogs on the same installation, which could get confusing, especially if the different blogs are at different domains (mt-hacks.com, markcarey.com, for example). I wouldn't expect my login to be shared across different blogs... But I suppose it's no more confusing than TypeKey...

And as regards TypeKey - the commenter profile icon on the comment on the test blog points to a non-existant TypeKey profile, even though I didn't log in through TypeKey. Is that just a template thing, or a bug in the plugin?

Excellent work, though - I'll likely be giving this one a try soon...

erinther:

Wow! amazing.. I wonder if you are going to integrate this with entrypost plugin?!

Is it only a step to build a user-group and publish content for a special member group as a service add-on?

Hi Dafyd, good questions.

The 'dafyd' username was taken because you previous submitted comments to MT Hacks (that previous commenter account was created via the Trusted Commenters plugin, which also uses the MT Commenters system, but doesn't require passwords). This is a good question because I am sure that others will see this as well, those who have posted on MT Hacks in the past. (A future feature might enable blog admins to convert an existing commenter by adding a password to the account)

Yes, Commenter accounts are "system wide" and can thus be used to login to any blog on the system. In many cases, where the blogs are "related" to one another, this is feature that saves time for commenters to create multiple accounts. In cases where blogs on the same system are not related, commenters can still create a second account if desired, but the cookie will like be found, so the second site will greet them "Welcome, username" -- which might confuse some people at little, I suppose.

Yes, the TypeKey Icon link. Since the plugin uses the existing commenter system, MT thinks it is a TypeKey user -- unfortunately this is part of the <$MTCommentAuthorIdentity$> tag. There some flexibility here, by modify the IdentityURL configuration directive, but changing that will still create a broken link, so not a perfect solution. Ideally, I would like to provide a replacement tag, perhaps one that is smart enough to differentiate between TypeKey commenters and local ones, and generate profile links (or not) accordingly. Thanks for the reminder about this issue.

erinther, yes, this will work will EntryPost. For example, if you create an account on the test blog, then go to the Entry Post submit page, you will see that the Entry Post page greets the logged in user and will accept the entry from that user. That said, you would have do a little customization of the Entry Post javascript if you wanted to present a local sign-in link instead of TypeKey, etc.

Joerg, yes that is possible. Several steps perhaps, but possible.

Thanks to Kevin for find a bug affecting Internet Explorer browsers. Now fixed in version 1.01. Use the download link above. If you previously had v1.0, you should delete the Comment Registration templates and then re-install them.

1.01 appears to work just fine.

While you're fixing the IE Javascript errors you might as well change this line in the SA provided mt-site.js:

var commenter_name;

To this:

var commenter_name, mtcmtemail, mtcmtauth, mtcmthome;

That's the fix Arvid came up with for the IE "Error on page" annoyance as mentioned on ProNet. It's supposed to make it into the released version of the code, but I've not been out to look for it.

And one last bug. When installed with Trusted Commenters 1.2 any attempt to post a comment after a logon results in the following error:

Comment Submission Error
Your comment submission failed for the following reasons:

Registration is required.

Disabling Trusted Commenters clears the error and allows you to post. I noticed this odd behavior with another Typekey replacement system I was looking at, so I think that this is an error with Trusted Commenters.

If you change your settings to allow comments from anyone the combination of the two plugins turns registered comments into anonymous ones...


Some quick feature requests...

1) On the register screen a "check availability" button to the right of the username field.

2) Retrieve lost password via e-mail.

3) Confirmed account creation (via e-mail link)

4) User account management self serve, i.e. edit their details post-regisration...

Thanks again, Kevin. I am aware of the incompatibility with the current version of Trusted Commenters. I have fixed this in a devlopment version of Trusted Commenters and may tweak it a bit further before I release a compatibility update.

Thanks for the feature requests, those are good ones for future versions. (Side note: number 2 is not possible with MT's password scheme, but a "reset password" and/or "change password" approaches are possible).

Gary:

Looking forward to this plugin, but got this error when installing:

"Template already exists. To reinstall the default template, first delete or rename the existing template.':"

When I looked in the templates, the .js filed was renamed, the other templates created, but no new .js file.

I didn't find the new .js in the install zip, so assume the script has to create it.

Gary, hmmmm, that shouldn't happen. First I would check to make sure that the outfile for the exiting template is not mt-site.js. If it is, then rename the outfile somethings else. Then delete each of the other Comment Registration templates (including the widget, under "template modules". Then reinstall them.

OR

The new site js is indeed in the install zip. If you look in plugins/CommentRegistration/tmpl/, you should see it there with a file name of site_javscript.tmpl. You can copy and paste the template code from there.

OR

Copy and paste it from here.

Nick:

I'm having an issue with logout. It returns this error: Can't call method "remove" on an undefined value at lib/CommentRegistration/App.pm line 113.

Also, someone was able to register twice under the same username, creating two entries in the database, each with a different password, and neither would login.

I've installed this plugin today, and it seems to be working for registering and logging in to leave a comment.

Logging out however returns an error:

Page not found - /archives/2007/05/&return=http:/www.fifthgeneration. phaticcommunion.com/archives/2007/05/can_5gw_theory_benefit
_by_stud.php

(I've added a couple spaces to keep the long line from messing up the page.)

It would seem that trying to log out does not cause the script to point back at a key file that would log out the user, but is instead trying to find it in the individual archive page. (Relative url?)

Some questions:

1. Will openID for MT still work if this plugin is installed?

2. How does a TypeKey user use the same login form to log in, or is TK no longer operational? (TK was screwing up for IE users on my site -- which is why I've tried this plugin -- but some are already comfortable with TK logins.)

Ah, sorry. I made the change suggested by Kevin, above (to change var commenter_name;) and the sign-out link worked!

Actually, I'm not sure what is happening.

I tried signing in through openID on a test page, and that worked and I was able to leave a comment. But I could not sign out afterward, receiving the same error. Perhaps the error occurs if an old TypeKey or other cookie still exists on the user computer? (The previous instance of the error occurred after signing in through the Comment Registration plugin, however...)

I have installed both trusted commenter and comment registration, following the instructions word for word.

Trusted commenter works without a problem, but comment registration is misbehaving. I get as far as the registration screen, but after hitting 'register' I get an internal server error (nothing specific, just internal server). I double checked to make sure all the files were in the right place on the server, that authentication was enabled (I put in a manual token), but registering still calls forth that internal server error. What to try? Here's the page: http://www.rosinalippi.com/weblog/register.html

Any thoughts or suggestions? I would love it if I could get this to work. And I will make a contribution, once I've got things up and running.

I just wanted to note that Comment Registration seems to be working fine on my blog, sign-in and sign-out, and that the OpenID plugin does not conflict with this plugin. I'm using both.

Can the sign-in form for Comment Registration be included on the Individual Archive pages; or, at least a re-direct to previous location for those who are logging in on the separate login page? This might cut down on confusion for anyone new to the site, since currently logging in returns the user to the main index page rather than the specific post where he wanted to leave a comment.

Curtis,

The default templates for Comment Registration does exactly what you say. If you click on a sign-in click from an Individual Entry Page, after you sign-in, you will be automatically redirected back to the individual entry page.

Rosina,

It seems like you haven't CHMODed the mt-login.cgi file in /plugins/CommentRegistration/ to 755. This is required.

Now that I look at my installation instructions, it seems I forgot to mention this step. I will make this change now.

Mark -- that fixed the error, thank you. A few more qustions, if you have a moment:

1. Is there a way for a person to know if they are already logged in, apart from going to the comment screen?

2. Is there a way for a user to recover a lost password, or can I reset a password for a user?

I think this will be very useful if I can iron out the kinks.

rosina

Mark:

While all the templates now show up and the 500 errors are gone, I am still having considerable problems making this plugin work.

I don't suppose I could pay you to get it properly installed and working on one weblog? I am pretty desperate at this point.

The problems

When I set up a test registration and then login with that userid, two things can happen: (a) the comment box still shows the fields to be filled in, although it also says "thanks for logging in, you may now comment" (b) it allows the comment to go through and then says "your comment being held for moderation" but the comment does not show up in my email or anywhere in the normal listing for comments to be approved. Even going to the commenters screen and marking the test account as 'trusted' doesn't make a difference.

Note: I did turn off your Trusted Commenter plugin as I saw a note somewhere that it might be interfering. No change in these behaviors.

I really am happy to pay you for your time if you would be willing to look at this.

PS: the "check to Subscribe to the Comment" option below -- doesn't work, even with email filled in.

2

Rosina,

You have at least two key problems. Both stem from the fact that your templates have been customized, and as such there are missing 2 key elements:

On you individual archivem, replace <body> with:

<body onload="individualArchivesOnLoad(commenter_name)">

Then, way down in the template, right before your comment fields (maybe before the <div id="name-email"> line), add:

<script type="text/javascript">
<!--
writeTypeKeyGreeting(commenter_name, <$MTEntryID$>);
//-->
</script>

These two changes combined should display the commenter greeting and hide the name and email fields.

Now, this may not address the problem of the comment being held for moderation and not appearing anywhere. I would have to dig deeper to see about that.

Mark,

I haven't changed anything major in the provided templates -- CSS and body class, mostly -- so don't know why the redirect would be occurring as it occurs. I have two blogs in my installation, one on a subdomain and one on the main domain, and both return the user to the main page of the respective blog after signing in.

Jon Author Profile Page:

I got this plugin installed and successfully managing my commenters. However, when I go to view the commenters in my MT CMS, no one shows up. I have to filter to show only "Trusted" commenters to view the list. Any idea why no one shows up when I have it set to view all?

Curtis, I found a small bug that may have been causing your issue. In the Commenter Login template, look for the form element (ie. <form ). Then add name="comment_form" in there. It seems that part is missing in the defaul template. This has been updated in the download file as well.

Jon, I have no idea why that would happen. My MT always shows commenters with the "view all".

Nick Author Profile Page:

I've encountered a serious bug that I can't seem to fix. Apparently, no password is needed to sign in; it doesn't go to an error page. Although if you type in the wrong password, then the error page will show.

I though maybe OpenID was conflicting with comment registration but after it was removed and the database cleared, the issue was still coming up.

Hi Nick,

Can you be more specific? Are you saying that you can enter a (correct) username and a blank password and it will log you in? But with a correct username and an incorrect non-blank password will generate an error? Are you absolutely sure that the commenter was not already logged in? When testing this, you need to clear your cookies for the blog domain first. The plugin relies on cookies -- if you have a cookie with a valid login in session, then you don't need to login again (and thus, don't need a password).

Nick Author Profile Page:

Yes that's what I'm saying. A blank password box with any correct username will login. As long as any bad password is entered into the box, the error page will show. I made sure the cookie cache was cleared before each test, and this was tested with both firefox and IE7. I also just recently upgraded to MT 3.35. Like i said, i even went as far as removing OpenID and removing those authors from the DB.

I just checked again, verifying the cookie activity log with each step. The generated commenter_name cookie was definitely cleared before the login.

Nick, thank you for reporting this. I have found the bug and fixed in version 1.2, just released. You can use the same download link above to get it.

Nick Author Profile Page:

Thanks a million. Since my site will rely heavily on the login feature, expect a donation soon. This is a great plugin and hopefully SixApart will use it in it's next major release.

Thanks again!

I would like to say thank you for useful this article.

fredje Author Profile Page:

I installed this plugin, but it's not the plugin where i am looking for. So I tried to deinstall this plugin, but user HAVE to register themselves before they can give a comment. HOw to solve this problem?

Sylvia:

If I can get it to work, I will gladly send a donation, but so far, it does not seem to have installed correctly. The templates are there. But if I set it to allow comments from anyone (as per the instructions above), comments can be posted with no registration.

If it is set to only accept comments from authenticated and trusted commenters, I have the same problem I was having with typekey - It is possible my templates are corrupted and I do not know how to fix them, but here is what shows up:
It says "thanks for signing in ____. The "sign out" link is broken - I get a message to:
"Search www.postnormaltimes.net for blog archives 2010 html

If I try posting the comment, I also get an indication of a broken link and get a message to:
"Search www.postnormaltimes.net for blog archives 2010 html "


E eu tenho certeza que tem tofu aqui :(

E eu tenho certeza que tem tofu aqui :(

E eu tenho certeza que tem tofu aqui :(

E eu tenho certeza que tem tofu aqui :(

E eu tenho certeza que tem tofu aqui :(

I agree that Google is not that slow but still i use Twitter, in a way, could be a big boost.but both are good google and twitter.also visit www.tendertiger.com

I agree that Google is not that slow but still i use Twitter, in a way, could be a big boost.but both are good google and twitter.also visit www.tendertiger.com

E eu tenho certeza que tem tofu aqui :(

Post a comment