www.coComment.com

The official coComment weblog

Blog Integration

February 16th, 2006

As you might already have noticed, we added blog integration to our TeamBlog. Now you don’t have to remember to click the bookmarklet when posting on our TeamBlog. coComment is automatically turned on, as long as you are already logged into coComment (you need to be logged in, because we don’t want to harass non-coComment users with a pesky login screen all the time).

If you are not logged in, just use the bookmarklet as usual. If you don’t want to use coComment for posting, just press the bookmarklet and coComment is turned off.

If you already added the standard integration to your blog, it is very easy to also add complete integration. Just add the following lines at the end of the block of javascript you already added:

var cocomment_force = false;

Additionally, add the following script call just below the block you already have:

<script type=”text/javascript” xsrc=”http://www.cocomment.com/js/cocomment.js”></script>

For our own WordPress TeamBlog, this means the final code looks as follows:

<script type="text/javascript">

var blogTool = “WordPress”;
var blogURL = “<?php echo get_option(’siteurl’); ?>”;
var blogTitle = “<?php bloginfo(’name’); ?>”;
var postURL = “<?php the_permalink() ?>”;
var postTitle = “<?php the_title(); ?>”; <?php if ( $user_ID ) : ?>
var commentAuthor = “<?php echo $user_identity; ?>”; <?php else : ?>
var commentAuthorFieldName = “author”; <?php endif; ?>
var commentAuthorLoggedIn = <?php if ( !$user_ID ) { echo “false”; } else { echo “true”; }; ?>;
var commentFormID = “commentform”; var commentTextFieldName = “comment”;
var commentButtonName = “submit”;
var cocomment_force = false;

</script>

<script type=”text/javascript” src=”http://www.cocomment.com/js/cocomment.js”> </script>

52 Responses to “Blog Integration”

  1. Eddie Says:

    I’m logged in to coComment and I do see the “CO” logo and check mark (http://www.cocomment.com/images/float/by.png) next to the “Submit Comment” button on this blog. However, I am not able to see it on my blog http://awads.net/wp/ . I did add the above JavaScript to my comment form! Thanks.

  2. jaypatrick Says:

    Yeah, same here. Here’s a link: http://jaysonknight.com/blog/comments/6950.aspx#commentform (the coco image next to the submit button is one I made myself). I hope you guys can get this working!

  3. CetaMac Says:

    great!

  4. kara Says:

    same here - i added the edited js code on my MT site, but coComment doesn’t work unless i click the bookmarklet.

  5. Merlin Says:

    I just looked at the two blogs you mentioned but I did not see anything out of the ordinary. As far as I can tell, it should work. I’ll have a close look tomorrow. Sorry about that.

  6. steph Says:

    I’m not certain what this does: does it just relieve coCommenters from clicking the bookmark once I install it on my blog, or does it mean that all comments will be tracked? The topic on the help page mentioning integration hints at this — are you by any chance using the same word “blog integration” to mean two different things? I’m a bit confused.

    Oh, and when I first arrived here to comment, there was a red cross in the coCo logo — I had to click the bookmarklet twice to make it green. I use the greasemonkey script.

  7. jaypatrick Says:

    No problem Merlin, I know you guys have your hands full :-). What I’m most curious about is how authentication takes place, i.e. how does the blog I’m visiting know I’m jaypatrick (I understand how coco.com does b/c I’m signed in w/ my coco creds)? Also, has anyone had success with this addition yet? I’d love to see it in action.

  8. ecmanaut Says:

    I think you’ll find references buggy behaviour related to “the Greasemonkey script” for as long as you don’t publish one that works somewhere in your tools section. While I believe there are only two in wide circulation now, any amount of low quality controlled ones could keep creeping up, and the first one is growing more glaringly unsufficient with every improvement you make.

    (That said, I suppose my version isn’t 100% future safe either, if you change the format of cocomments_web, for instance.)

  9. chiunam Says:

    I just figure out a typo of the post. That should be the reason of those peoples can’t use the script.

    <script type=”text/javascript” scr=”http://www.cocomment.com/js/cocomment.js”></script>

    the scr should be src.

    ;)

    Cheers.

  10. 喃喃自娛 » æ–°çš„ coComment Blog Integration Says:

    […] 從 coComment TeamBlog 得知,blogger ç?¾åœ¨å?¯ä»¥åœ¨ blog 中加入新的 javascript ,若果 comment author å·² login coComment ,coComment é ?設啟動,就ä¸?需å†?ä¾?è³´ bookmarklet 或 GM script 把 coComment 啟動。 […]

  11. chiunam Says:

    And one more
    var commentAuthorLoggedIn = ;

    There should be a semi-colon at the end of this line.

  12. chiunam Says:

    oops.
    Sorry for the last comment. Please delete. It should be:

    And one more typo:
    var commentAuthorLoggedIn = <?php if ( !$user_ID ) { echo “false”; } else { echo “true”; } ?>;

    There should be a semi-colon at the end of this line.

  13. jaypatrick Says:

    @chiunam: Yeah that’s it! Wow, good call…it’s always the simple things.

  14. Merlin Says:

    Sorry about this, I will just correct it now. Does it work this way with anybody now?
    (I hate this WordPress posting form… it really messes up ‘verbose’ text with html tags in it… I had quite a fight to just get it to the thing we now had… which is near from perfect…).

    Sorry guys for the problems.

  15. Merlin Says:

    steph, it just relieves people from clicking the bookmarklet. It does not automatically collect all comments. We are currently investigating this, but there are some security problems that need to be cleared first.

    We have to straighten out the wording of integration and such. I’ll have a look

  16. singpolyma Says:

    Hmm… very nice… but even harder to work with with my multiple comment forms on one page… the onsubmit handler idea won’t work properly with this code… I’ll have to start looking into possible ways around it… It really would be nice if the coComment script would accept some sort of GET parameter like ‘?postdata=VARNAME’ where VARNAME is the name of a JavaScript variable containing JSON data that works like the above. I could then create a variable for each post on the page using:

    var POSTID = {blogTool:”Blogger”,… &c }

    and then include:

    or something of that sort.

  17. 讓 comment 支� coComment。 at 二三街角 Says:

    […] 2006-02-17 Update: ç?¾åœ¨æœ‰æ–°çš„æ–¹å¼?çœ?去使用者按 bookmarklet 的麻煩囉,將最後的 </script> 改為這樣: […]

  18. Merlin Says:

    Hmm, having multiple forms really is a problem. We could try to add a method to update our internal structure. Like cocomment_update(), or even cocomment_update(”title”, “url”, “post-title”, “post-url”, …) or something.

    What do you think?

  19. singpolyma Says:

    Doing it with a separate data-updater function works just as well for me :) I just suggested the other way because it came into my head, but something that works would really be nice :)

  20. jaypatrick Says:

    @Merlin: Working good over here!

  21. rolivares Says:

    No se que pasa pero no funciona en mi blog (www.colaborame.tk) alguna idea de que puede ser?

  22. rolivares Says:

    I don’t have any idea Why the ” var cocomment_force = false;” don’t work in my blog. Any idea??? thanks

  23. jaypatrick Says:

    How about a link to your blog so we can see the source?

  24. CetaMac Says:

    It’s a great news for commnetors, but it seems some blogs used to be supported by coco, but now, not anymore.

  25. Merlin Says:

    I’ve heard this some times now. I’d be very glad if you could point me out to the blogs that don’t work anymore. Actually we tried to improve support, not reduce it….

  26. rolivares Says:

    ups sorry here is the link … ( http://www.colaborame.tk )

  27. CetaMac Says:

    right, and here’s the page failed to be submitted (http://www.chedong.com/blog/), and I capture the screen here. And Greasemonkey script failed either. I’m sorry if I miss something about it.

  28. CetaMac Says:

    right, and here’s the page failed to be submitted http://www.chedong.com/blog/, and I capture the screen here, http://static.flickr.com/29/100893750_9d654411bf.jpg.
    And Greasemonkey script failed either. I’m sorry if I miss something about it.

  29. Merlin Says:

    I just found a serious bug in our blog detection routine. I’ll try to update the script as soon as possible, but unfortunately I can’t do anything before tomorrow (well, actually today, as it’s just past midnight here….)

  30. Merlin Says:

    Ok, I just travelled to my office (rather quite here at 1:20 in the morning…) and deployed the fix on the server. I hope the bookmarklet works again.

    Time for bed…

  31. jaypatrick Says:

    @Rolivares: That link doesn’t seem to work, getting a server not found error.

    @Merlin: Wow, that’s job dedication right there! I’m surprised you guys don’t have some sort of remote access though :-).

  32. daveburke Says:

    Merlin, congrats to you and the others for phenomenal output these last few weeks (and prior.) Thanks to Jayson Knight (jaypatrick) I was able to get the integrated CoComment support working on my Community Server blog. It took me a while to track down why it wasn’t working, and it was because I had a FeedBlitz form on my blog sidebar with an Submit button, confusing your script. Once I replaced that with a URL the CoComment scripted worked great. This thread was helpful in tracking down my problem. thanks, all.

    postscript: yeah, it would be useful to modify the script to support multiple forms.

  33. rolivares Says:

    what about this???

    http://www.publicita.virtuabyte.cl/wordpress/

  34. /pd Says:

    Injection on comments !!

    This is a good garden of coComments, but why is it taking so long to appear in my reader ?? ( I am sub’ing to one of the community).

    Has any1 thought of a tag garden of comments by userid
    (?)

  35. jaypatrick Says:

    @rolivares: you have a typo in your script tag. Search for scr and change it to scr.

  36. Merlin Says:

    Again, yes. I don’t know what WordPress is doing here… I seem not to be able to remove the x from the xsrc=”..”. Each time I remove it, WordPress thinks it’s a great idea to add it again. *sigh*
    I’ll try again to fix that, though…

  37. Merlin Says:

    I finally managed to turn of the ‘rich’ text editor. Now the code should appear as I wrote it, not as WordPress thinks it should be. I hope it works now.

  38. rolivares Says:

    thanks jaypatrick… anyway, just did make copy-> paste of original page of coComments :|

    Thanks a lot

  39. steph Says:

    I copied the exact code provided here (my blog runs WordPress) and it’s not working. Any idea where I should start troubleshooting? See this page for example:

    http://climbtothestars.org/archives/2006/02/19/integrer-cocomment-sur-votre-blog/

  40. Climb to the Stars (Stephanie Booth) » Intégrer coComment sur votre blog Says:

    […] If you are a blog owner, you can spare your commenters the trouble of clicking on the bookmarklet or even make your blog coComment-compatible if it isn’t yet on the supported platforms list. […]

  41. Merlin Says:

    steph, that’s hard to say. For some reason, your blogURL is empty, but without knowing the code you put in there I can’t tell. Can you post the line for the blogURL you put into the code?
    The most important problem, though is that a ‘;’ is missing after the declaration of var commentAuthorLoggedIn = “falseâ€?.

    Thus, it should read ‘var commentAuthorLoggedIn = “falseâ€?; var commentFormID = “commentformâ€?;’ (not the additional ‘;’ after “false”.

  42. steph Says:

    I added the missing ; — it’s missing from the teamblog post, because I copy-pasted the code from there. I hardcoded my url in the javascript now. It still doesn’t seem to work.

  43. bollet Says:

    I corrected the post and just added the missing ;
    thanks for your help.

  44. Der LeuMund (die ganze Wahrheit!) Says:

    CoComment for Expression Engine

    Jetzt aber mal was ganz technisches fr die anderen ExpressionEngine User. Mit CoComment kann man endlich Kommentare verfolgen, das heisst man wird informiert wo wer was ergnzt oder kommentiert hat. Nachfolgend erkl줤r ich mal, wie man auch Expres…

  45. andare.ch - Blog » Blog Archive » coComment Wordpress Plugin v0.6 Says:

    […] 2Teamblog: Blog Integration Verwandte Artikel:coComment Wordpress PluginMoblog Picture Dock - fancy!Schweizer Blog ForumReaktion der Blogger auf Mingels’ ArtikelSZ: Blogs gefährlich? […]

  46. jinjiru Says:

    It works for ExpressionEngine, thank you!

  47. andare.ch - Blog Says:

    coComment Wordpress Plugin v0.9

    Und noch ein Update des coComment Enhancer Plugin: als Erweiterung habe ich einen Schalter eingebaut, der neben dem Submit Knopf des Kommentar Formulars angezeigt wird. Der Schalter hat die selbe Funktion wie das coComment Bookmarklet. So kann einfach …

  48. pietrosperoni Says:

    Thanks, it works for me: http://blog.pietrosperoni.it

    But I had to play around with the comment.php. Basically I am using the Brian’s Nested Comments plugin. The problem with the comment.php suplied is that the submit button is not called submit but addcommentbutton. Basically the line:

    should instead look like:

    As a general comment to the service, I found it very good and very useful, yet I find it is too hard once you are looking at a comment in the cocomment page to find the link to the comment in the ctual page. It is as if cocomment would not want you to go to the original blog but tries to keep people reading all the comments necessarily onsite. And this I I don’t like very much.

  49. pietrosperoni Says:

    OOps, it did not appear, let me try again
    the line:
    <input onclick=”if(typeof(onAddComment) == ‘function’) { onAddComment(); } else { alert(’ERROR:\nIt looks like the website administrator hasn’t activated the Brians Threaded Comments plugin from the plugin page’); };” name=”addcommentbutton” type=”button” id=”addcommentbutton” value=”Add comment” />

    should become:
    <input onclick=”if(typeof(onAddComment) == ‘function’) { onAddComment(); } else { alert(’ERROR:\nIt looks like the website administrator hasn’t activated the Brians Threaded Comments plugin from the plugin page’); };” name=”submit” type=”button” id=”addcommentbutton” value=”Add comment” />

    and the difference is that name=”addocmmentbutton” becomes name=”submit”

  50. Make You Go Hmm: » Cocomment red x syndrome? Says:

    […] Update 3/5/2006 5:40am PST: Nicolas from cocomment support has responded to my ticket. Here is what he said in part about this issue: I know this is not convenient and we are working on solutions to make it better, at least not having to repeat the action as you say. For the moment, only the blog owner can prevent it by specifying to coComment the required info. http://www.cocomment.com/teamblog/?p=37 (ex with wordpress: http://www.cocomment.com/teamblog/?p=21) […]

  51. Michael Says:

    Cool site!replica watch

  52. relab.ch endless whitepaper â„¢ Says:

    Serverside or Clientside cocommenting?

    Ich hab jetzt irgendwie meine Blogs insofern ausgestattet, dass cocomment immer automatisch aktiviert ist. Der Vorteil, man vergisst nicht das Bookmarklet zu drücken.
    Jetzt sehe ich aber andernorts, dass User ihre Firefox Browser aufpimpen um cocomme…

Leave a Reply



  • About

    Welcome to the blog of the coComment team. News, stories, releases, here is all you need to know about the tool helping you track your conversations on the web!

    This blog is
    coComment
    coComment

    RSS feed

    Search this blog: