UPDATE: coComment service is no longer operational, so this plugin is no longer of any practical use. The source is provided just as a reference for archives.
I’ve been using coComment for quite sometime now, have seen its pros & cons, it wasn’t upto the least standards that I’d have liked it to be at but everything improves with time and now it certainly is much much better than what it was when I started using it about a month or two back.
But still there are a few quirks, not every blog platform is supported, however those guys are really working up on improving it. They’ve also specified a Javascript API for unsupported or partially supported blog platforms which bloggers can use in their respective blogs to have coComment fully supported. Unfortunately WordPress is also not fully supported by coComment. So I decided to remedy that by allowing an easy integration of coComment.
Presenting the iG:CoComment plugin, that will integrate coComment into your WordPress blog without any pain and frustration. 😉 Originally written for a friend’s blog to let him integrate coComment without modifying his theme templates, I decided that this plugin will indeed do good to a lot of others, so I’m hereby releasing it as a free software under the favoured GNU GPL. 🙂
Full instructions & other trivia are neatly packed in a README file in the download package. For support (I doubt there will be any required) you can post comments here or post on its thread at the WordPress forums located at http://wordpress.org/support/topic/70960. But please don’t duplicate posts here and at the WordPress forums thread, have patience after posting your comment, I’m not around 24×7 checking my blog and/or WordPress forums. 🙂
Sweet, thanks. I just started using coComment and was beginning to look at implementing the javascript necessary to integrate it with my site when I found this plugin. Worked like a charm. Thanks again.
You are welcome. Three cheers to the open source & free software!! 🙂
Hey Amit, this comes from someone has not bothered to look at all at how the coComment javascript functions, but is there any way the javascript inserted by this plugin could be moved up into head of the document, or better yet into external .js files that are cached and only loaded once? Wouldn’t that be more semantic? Or is there a reason they have to be in the body in the comment form? Just wondering.
Nah, it can’t be moved to the head of the document. The thing is that the Javascript is not static. The plugin passes it some values regarding the post for which its being requested, like post name, permalink, whether the user requesting the post page is logged into WordPress or not, etc. So that (for now) is only possible when putting the thing in the loop. I haven’t found any other way to pass those variables to the Javascript yet(outside the loop).
Though, I do have a workaround to have the Javascript placed in an external file(two ways actually, one is simple & other is a bit complex) but it’s not feasible right now since it might have problems working everywhere alike(needs to be tested which I’ll do). That’s why I’ve withheld it so far, since the current way is the simplest & most effective way of doing it!! 😉
Duh, stupid me. Of course the title and permalink are going to change. Well, that rules out the external files, but it can still be put in the head.
Actually you can get at post content you cant normally get at in wp_head, you just have to pull it from $posts[0] on your own. I did it in my meta keywords plugin. However, I don’t think you even need that.
I just changed:
add_action(‘comment_form’, ‘igCoComment_Integrate’);
to:
add_action(‘wp_head’, ‘igCoComment_Integrate’);
And everything worked fine 🙂
If it’s changing every page, I don’t think it should be in an external file. I know it could be done, but there wouldn’t be much gain. But the javascript definitely belongs in the head 🙂
Off-topic: You made a cocomment plugin but you dont use cocomment? Your replies aren’t showing up in cocomment for me 🙁
yeah, well, I had two reasons for putting it in comments form. Firstly, I was having a bit trouble putting it & getting right values in head, maybe I was just sleepy when I wrote this, in the wee hours. 😉 Secondly, I didn’t want to unnecessarily load Javascript when comments are diabled on a post. This still holds true(haven’t tinkered around to not load it in head when comments are off).
Yeah, but the possible gain that I can see is that the file will be cached for the post if its called again!! Not much(since its just a few lines of JS) but still something!! 😉
I use coComment & I’ve the plugin installed & enabled here as well, its just that I’ve turned off both the auto-enable & track-all comments features as both of them put a switch between the “Post Comment” & “Reset” buttons on my form & screws the layout. I’ll get around to fix it & then I’ll enable it. Though I’ve comment subscription facility so didn’t see any plus in enabling it!! 😉 But my blog is coComment compatible, fully(you can see the JS in page source). 🙂
looks like a nice plugin – but can you offer a link to a working example?
thx
Ah, I didnt consider posts with comments turned off because I never do that on my site. Anyway, I am pretty sure the setting for that must be somewhere in $posts[0] and should be available in the head.
Consider it a feature request for future versions then 🙂 It works fine not in the head, but for semantical yummyness the javascript shouldnt be in the body 🙂
@redjade:
No visual working example that I can provide for this. However, if you look into the source code of this page, you’ll see the script written in there by the plugin. This will be only useful if the commentator on your blog is logged into his/her coComment account.
@Cody:
You should consider it, when writing a generic piece of software that’s supposed to be used by anyone, you should think about all scenarios, saves lots of troubleshooting time!! 😉
Sure enough!! I’ll look into it more when I get time. 🙂
Thank you so much, people like you make wordpress awesome!
Thanks Terry!! 🙂