free geoip Adding CoComment Support to Community Server - protected virtual void jaysonBlog
in

jaysonKnight.com

Welcome to my corner of the internet

protected virtual void jaysonBlog

A conduit to the voices in my head

Adding CoComment Support to Community Server

[Update] I've updated my code to use Thomas Freudenberg's solution, which can be found in the trackbacks of this post.

I posted earlier about CoComment, which is an online tool that allows you to track comments you make on other blogs (if you go plug in your email address on their site, you’ll get a beta key within a day or so if you want to try it out, which I highly recommend doing).  At the time of that posting, CoComment only supported the big name blogging engines, and from what I gathered somewhat poorly at that.  So I emailed the development team asking if there was anything I could do from my end to expedite the process of getting more blogging engines in the mix, namely Community Server of course. 

Lo and behold I get an email back from them a couple of days later stating they had gutted the approach they were taking (screen scraping) and were moving to a tag based system, and about a day after that I received another message pointing me towards this post on their site which outlines the implementation they came up with.  Within half an hour I had this hammered out on my own site and am pleased to announce that it works quite nicely, so kudos to the folks over at CoComment.  CS purists probably would have taken a CSModule based approach, but seeing as A) this is still very beta software and thus might change quite often, and B) that it’s literally 10 lines of code, I simply plugged it into the Skin-CommentForm.ascx control.  Here’s the code:

<%@ Import Namespace="CommunityServer.Components" %>
<%@ Import Namespace="CommunityServer.Blogs.Components" %>

<% WeblogPost currentPost = WeblogPosts.GetWeblogEntry(CSContext.Current.BlogGroupID, CSContext.Current.PostID); %>
<% bool isAuthor = CSContext.Current.IsAuthenticated && CSContext.Current.User.UserID == currentPost.AuthorID; %>
<script type="text/javascript">
        var blogTool                = "<%=SiteStatistics.CommunityServerVersionVersionInfo %>";
        var blogURL                 = "<%=Globals.FullPath(currentPost.Weblog.HomePage) %>";
        var blogTitle               = "<%=currentPost.Weblog.Name %>";
        var postURL                 = "<%=Globals.FullPath(BlogUrls.Instance().Post(currentPost)) %>";
        var postTitle               = "<%=currentPost.Subject %>";
        var commentAuthorLoggedIn   = "<%=isAuthor %>";
<% if (isAuthor) { %>
        var commentAuthor           = "<%=CSContext.Current.User.DisplayName %>";
<% } else{ %>
        var commentAuthorFieldName  = "<%=tbName.UniqueID %>";
<% } %>
        var commentFormName         = "__aspnetForm";
        var commentTextFieldName    = "<%=tbComment.UniqueID %>";
        var commentButtonID         = "<%=btnSubmit.UniqueID %>";
</script>

Voila, your blog is now CoComment enabled.  To actually use CoComment, you’ll need to get an account, and there is a bookmarklet available from their site that sits in your links toolbar of your browser of choice (it looks like the big 4 are supported).  My next feature request will be some sort of visual cue that lets the commenter know that the site is CoComment-enabled…other than that, it works beautifully.

Share this post: Submit Adding+CoComment+Support+to+Community+Server to Technorati | Submit Adding+CoComment+Support+to+Community+Server to del.icio.us | Submit Adding+CoComment+Support+to+Community+Server to digg.com | Submit Adding+CoComment+Support+to+Community+Server to reddit.com | Submit Adding+CoComment+Support+to+Community+Server to DotNetKicks | Add Adding+CoComment+Support+to+Community+Server to Live Bookmarks
Only published comments... Feb 08 2006, 04:49 PM by Jayson Knight

Comments

 

Thomas Freudenberg's Blog said:

Yesterday Jayson Knight described how to add coComment support to CommunityServer. I'm a user of coComment...
February 9, 2006 11:07 AM
 

Thomas Freudenberg's Blog said:

Yesterday Jayson Knight described how to add coComment support to CommunityServer. I'm a user of coComment...
February 9, 2006 11:12 AM
 

Thomas Freudenberg's Blog said:

Yesterday Jayson Knight described how to add coComment support to CommunityServer. I'm a user of coComment...
February 9, 2006 11:13 AM
 

Keyvan Nayyeri said:

It worked well except that I got an XML parsing error after posting but it's posted as well to my Co-Comment: http://www.cocomment.com/rss2/keyvan.rss
February 9, 2006 2:16 PM
 

Keyvan Nayyeri said:

Jayson has introduced us to CoComment (I found it first time on Scoble&amp;rsquo;s blog before they make...
February 9, 2006 7:02 PM
 

Thomas Freudenberg's Blog said:

Yesterday Jayson Knight described how to add coComment support to CommunityServer. I'm a user of coComment...
February 10, 2006 6:06 PM
 

Thomas Freudenberg's Blog said:

Yesterday Jayson Knight described how to add coComment support to CommunityServer. I'm a user of coComment...
February 10, 2006 6:09 PM
 

Thomas Freudenberg's Blog said:

Yesterday Jayson Knight described how to add coComment support to CommunityServer. I'm a user of coComment...
February 10, 2006 6:09 PM
 

Keyvan Nayyeri said:

I solved my problem with Community Server 2.0: http://nayyeri.net/archive/2006/02/10/486.aspx
February 10, 2006 10:11 PM
 

Positive Impact said:

Dewayne Mikkelson pointed out that Jayson Knight had posted some code to enable coComment support...
February 10, 2006 10:19 PM
 

Dev Notes said:

coComment is a tool/site which allows you to track comments you have made on different sites....
February 10, 2006 10:36 PM
 

Dave Burke said:

Jayson Knight started the Community Server CoComment Support ball rolling with his quick mod to the CS...
February 13, 2006 12:51 AM
 

Dave Burke said:

Jayson Knight started the Community Server CoComment Support ball rolling with his quick mod to the CS...
February 13, 2006 12:55 AM
 

Dave Burke said:

Jayson Knight started the Community Server CoComment Support ball rolling with his quick mod to the CS...
February 13, 2006 12:58 AM
 

protected virtual void jaysonBlog { said:

The developers over at CoComment&amp;nbsp;have added a new feature to the coco service:&amp;nbsp; Total blog...
February 17, 2006 9:11 PM
 

protected virtual void jaysonBlog { said:

It&amp;rsquo;s the little things that keep you on your toes as a programmer.&amp;nbsp; After my site upgrade...
February 26, 2006 12:01 AM
 

TristanK said:

Just trialing a coComment comment, please to ignore me.
March 8, 2006 11:28 AM
 

Souplog said:

Hell, people are up to some interesting Community Server stuff:
Keyvan Nayyeri posted two cool new CS...
April 12, 2006 2:59 PM
 

Souplog said:

Hell, people are up to some interesting Community Server stuff: Keyvan Nayyeri posted two cool new CS

July 31, 2006 6:43 AM

Leave a Comment

(required)  
(optional)
(required)  
Add

About Jayson Knight

Jayson Knight was clueless to the computer programming world until he took a C++ class in college. The rest is proverbial history. He has been building applications targeting the .Net framework for 7 years, focusing mainly on internet technologies and database driven web application development.

Most recently he left the world of Corporate IT to finish up his degree in Chemistry, with an eye on Medical School and an Anesthesiology residency program. Read this post for more information.

He is also a Community Server MVP: Community Server is the software that runs this site, plus many others on the web. For more information, check out http://csmvps.com.

When he finds time to pry himself away from his computer and university studies, he can be found on the mountain bike trails when it's warm, and on the ski slopes when it's cold.

Copyright © :: JaysonKnight.com
External Content © :: Respective Authors

Terms of Service/Privacy Policy