pre alpha

Getting started with Commenthub.com



HTML snippet

CommentHub makes implementing comments as easy as possible. In its most basic form, implementing CommentHub on your website is as easy as copying and pasting these three lines of html:

<a id="comments" href="http://www.commenthub.com/comment-thread/site/1/id/1">View the Comments</a>
<script type="text/javascript">_chub$threadTitle = "My Title Here";</script>
<script src="http://www.commenthub.com/js/dn/initialize.js" type="text/javascript" charset="utf-8"></script>

To create new comment threads, simply change the id specification in the url. To set the title of a new thread, modify the "My Title Here" part, before calling the script for the first time.


Convenient PHP function

To further simplify implementation, here a convenient php function:

<?php
function displayComments($website, $threadid, $title, $echo = 1) {
$title = addcslashes($title, "\0..\37\\'\"\177..\377\/");
$template = '
<a id="comments" href="http://www.commenthub.com/comment-thread/site/%1$d/id/%2$d">View the Comments</a>
<script type="text/javascript">_chub$threadTitle = "%3$s";</script>
<script src="http://www.commenthub.com/js/dn/initialize.js" type="text/javascript" charset="utf-8">
</script>';
$comments = sprintf($template, $website, $threadid, $title);
if($echo != 1) return $comments;
echo $comments;
}
//example usage for the account you just registered
displayComments(1,1,'My Great Discussion')

Integration for your blogging platform

No integrations are currently available. However plugins for major blogging platforms will soon be available.