Comments 0.1.3 and Updates

by Sean Cribbs

First of all, I want to give a BIG Thank You to the Radiant community. You guys are awesome!

And now some personal thanks go to:

Which brings me to my next item of business. I have tagged/frozen revision 6 (which includes the typographical fix) into tags/comments_behaviors-0.1.3. Upcoming HEAD revisions will technically be incompatible with those previous because I have added Van’s Akismet code. Why 0.1.3, you ask? Because I can!

With these changes and updates, I have added, almost out of necessity and my personal frustration, the ability to set your comments configuration site-wide. That is, you can set a constant in config/environment.rb that will affect the defaults for every page that you make Commentable. For instance, if I wanted all comments to start in Draft state, use the Markdown filter, and be verified with my Akismet key, I’d put something like this at the bottom of environment.rb:

COMMENTS_CONFIG = {
    :status => 1,
    :filter => "Markdown",
    :akismet_key => "myakismetkey" }

As so much has changed and improved with the Behaviors in the last week, I have realized what an egregious lack of tests there are for this code (i.e. none). As a pathetic plea to the community, I would appreciate some hints on how to create proper tests for the code. In the meantime, I will be investigating the tests associated with the built-in Behaviors.

© 2006-present Sean CribbsGithub PagesTufte CSS