REQUEST A DEMO

Commenting on Solutions

One of the things I’ve wanted to do for a long time is have the ability to add comments on objects within the Clarify/Dovetail system. As a specific example, I’ve wanted to be able to add comments to a solution. For those not versed in Clarify/Dovetail speak, a Solution is essentially a KnowledgeBase (KB) article.

By allowing comments, I (and others) can (hopefully) enhance the information that is within the Solution.

For example, consider a  KB article that is available on the web, such as a Microsoft KB article, or a Dovetail KB article. Now, lets say that I use the information in that article, but I run into a bit of a snag, discover another tip or workaround, or perhaps I’ve even found something wrong in that article. What can I do? I’d like to be able to leave a comment, improving the information, making it easier for the next person who needs to use this information.

First Idea

My initial idea was to write some code that would allow comments to be added, edited, moderated, etc. These comments would be stored in the Clarify/Dovetail database. It would be nice to be able to have threading, pagination, and sorting. Perhaps even add support for email notification of new comments. Perhaps an RSS feed of the comments. Perhaps allow comments on almost any object within the system, more than just solutions.  And then I would want to add this code to Dovetail Agent, Dovetail SelfService, Dovetail Mobile Agent, etc. None of it would be overly hard to do, it would just take some time.

Second Idea

Hasn’t someone already done this work for me? Yes, indeed they have. JS-Kit Comments.

From the JS-Kit website:

The Comments service provides a full-featured commenting engine for your web site. It is implemented as a lightweight widget and is incredibly easy to install on any static or dynamic web page.

Benefits for visitors:

  • no registrations to fill, no logins to forget
  • threading, pagination and sorting of comments
  • graphical avatars
  • safe HTML support
  • "karma" for each comment
  • optional tracking of replies via email
  • automatic interface language selection

So, with just a tiny bit of code, I can add comments to any page that I want.

Away we go…

Adding comments to Solutions within Dovetail SelfService

Just a tiny bit of code to the solution page:

<h2>Comments for this solution:</h2>

<div class="js-kit-comments"  path="/solution/<%=solution%>" ></div>

<script type="text/javascript" src="http://js-kit.com/comments.js"></script>

 

And here’s what we get:

selfservice_comments

Clicking the Leave a Comment link allows users to add a new comment:

selfservice_add_comment 

 

Adding comments to Solutions within Dovetail Agent

On the Solution page within Dovetail Agent, I created a new tab for the comments and added the JS-Kit comments code:

<div class="clsTab" id="tab_comments">
     <div class="js-kit-comments" label="Leave a Comment" paginate="10" path="/solution/<% =SolnId %>" ></div>
     <script type="text/javascript" src="http://js-kit.com/comments.js"></script>
</div>

I also gave it a bit of styling:

<style type="text/css">
.js-poweredBy, .js-commentTool{display:none;}
.js-kit-comments{height:580px;width:550px;overflow:auto;}
.js-CreateComment { width: 400px; }
.js-CreateComment textarea { width: 400px; }
.js-commentControl a{
font-style:normal;color:blue;padding:5px;
}
</style>

And here’s what we get:

agent_comments

Here’s what it looks like upon clicking the Leave a Comment link:

 agent_add_comments

 

Notice that the same comments show up for this solution (solution 24) whether its displayed in Dovetail Agent, or in Dovetail SelfService. The only thing I had to do to make this work was set the path property so that its the same:

<div class="js-kit-comments" path="/solution/<% =SolnId %>" ></div>

JS-Kit already has support for:

  • WYSIWYG rich text editor
  • video comments
  • avatars
  • moderation
  • spam filtering (using Akismet)
  • sending email on new messages
  • RSS feeds
  • and a bunch more…

Here’s an example of an RSS feed from the solution above:

rss_comments

Pretty slick.

 

As I’ve said before, Its amazing what one can do with powerful (and free!) tools.