coComment Support for .Text (dotText)

by Erik Lane 2. April 2006 15:27

Friday I mentioned that Dave, Joel, and Jay got me on the coComment bandwagon.  It's a cool wagon at that!  Now that I can track my comments on other coComment enabled sites I needed the same for my blog.  I got some insight from what Thomas did for CS 2.0 then did the work specific to dotText.

I left off the commentAuthor variable in the coComment script and will always use the commentAuthorFieldName variable instead.  I'm the only one who logs into my blog and my username doesn't correspond to my real name.  This way others will always see "Erik Lane" in the coComment thread.

The code snippet below will go in your skin's PostComment.ascx file just below the control directive.

Giddy Up!

 


 

<%@ Import Namespace="Dottext.Framework" %>
<%@ Import Namespace="Dottext.Framework.Components" %>
<%@ Import Namespace="Dottext.Framework.Configuration" %>
<%@ Import Namespace="Dottext.Common.Data" %>
<% Version dotTextVersion = VersionInfo.FrameworkVersion; %>
<% BlogConfig currentBlog = Config.CurrentBlog(Context); %>
<% Entry entry = Cacher.GetEntryFromRequest(Context, CacheTime.Short); %>
<script type="text/javascript">
 var blogTool   = ".Text <%= dotTextVersion %>"
 var blogURL   = "<%= CurrentBlog.FullyQualifiedUrl %>";
 var blogTitle   = "<%= currentBlog.Title %>";
 var postTitle                = "<%= entry.Title %>";
 var postURL   = "<%= entry.Link %>";
 var commentAuthorFieldName = "<%= tbName.UniqueID %>";
 var commentTextFieldName = "<%= tbComment.UniqueID %>";
 var commentButtonID  = "<%= btnSubmit.UniqueID %>";
 var commentFormName  = document.forms[0].name;
 var commentAuthorLoggedIn = "false";
 var cocomment_force  = false;
</script>
<script type="text/javascript" src="
http://www.cocomment.com/js/cocomment.js"></script>

 


 

Tags:

Comments

eriklane
eriklane United States on 4/1/2006 6:31:00 PM

Its working.  Wink

jayson knight
jayson knight on 4/3/2006 1:50:00 PM

Can you hear me now?

eriklane
eriklane United States on 4/3/2006 1:52:00 PM

Roger!

jayson knight
jayson knight on 4/3/2006 1:52:00 PM

Looks like it's working, one issue though. I entered the wrong captcha code the first time and the comment still got submitted to CoCo. Not sure if maybe you need to reorder the script so that captcha fires first or what, but thought I'd point it out.  Great job!

eriklane
eriklane United States on 4/3/2006 1:56:00 PM

Ooops!  I may need to look at when the CoCo script is invoked and see if I can change that.

Thanks Jayson

Comments are closed