Commentwitter Plugin Page
DOWNLOAD | Official WordPress Plugin Page
Ultimately my goal is to give the commenter the option of sending their comment to twitter and allowing people to follow that blogs comments both in the blog and in twitter. The main reason for this is to generate a buzz and encourage commenting on peoples blogs. It will also improve the quality and value of people’s tweets revolving around blog posts.
Features
- Ajax “Send To Twitter” interface integrates seamlessly
- Commenters can Tweet their comments
- Links back to comments are shortened with bit.ly
- Blog author can Tweet all new comments
- A prefix can be added to the tweet
Installation
1) Upload the “commentwitter” folder to the “/wp-content/plugins/” directory
2) Go into the WordPress admin interface and activate the plugin
(The following step is not needed if you are using the Thesis theme)
3) Now click on “Appearance” in your wordpress administration panel and click “Editor”. Locate “Comments” on the right and insert the following PHP function where you would like the login prompt and text for the plugin:
<? get_commentwitter_input(); ?>
Note: This is usually right before:
<p><input name=”submit” type=”submit” id=”submit” tabindex=”5″ value=”Submit Comment” />
Demo
View a live demo in the comment form below. Just click “Send To Twitter“, input your credentials and submit your comment.
Help a Developer Out
CommenTwitter, blogging and developing other blogging plugins and themes takes up a lot of my time. As much as I love doing it, development slows down when I start taking in side work to pay the bills. If you like CommenTwitter or anything else you see on JonBishop.org, please feel free to donate the amount of your choice to help keep me running.
Download CommenTwitter
Note: Wordpress does not save your Twitter Username or Password however you should always use caution when giving away your twitter credentials. Always be sure you trust the website before you give away any private/personal information.























{ 25 trackbacks }
{ 90 comments… read them below or add one }
I wish OAuth for Twitter was ready so I could use that instead of asking for passwords
So I’m thinking I’ll create an options page that allows you to switch between the API and opening Twitter via some kind of Lightbox/javascript thing.
I also want to make it so the urls in the Tweets link to the comment rather than the post.
So I got rid of slashes and was able to link directly to comments. I’ll work on it some more later.
Now that’s an interesting concept you have there! Currently, I’m also developing such kind of a plugin but with a different approach, but since yours is looking promising (and, I must admit, better) already, I’ll give and leave it up to you. But if you need some help or assistance, feel free to drop me a line.
I try Commentwitter Plugin Page :)
I try Commentwitter Plugin Page again :)
any last minute thoughts on Commentwitter before I potentially release it?
I integrated cli.gs API support so people with cli.gs accounts can keep track of tweeted comments. Now i’m trying to figure out a way to let people tweet their comments without using the Twitter API. This is turning out to be a larger problem than I originally thought.
Cleaned up the plugin a bit and getting ready for release.
Awesome idea. Now to mash it up with a post your comment to twitter bribe kind of reward system…
Nice idea. Testing out Commentwitter plugin.
One observation…
It’s a little… disconcerting to send your comment off to twitter, only to discover that your comment is actually in moderation and no one who clicks through will actually see the full, in context, comment.
Not sure exactly how you resolve something like that to a high level of satisfaction for both user experience and blog safety, but there is surely some approach that would allow bypassing moderation for real people who are also tweeting the comment.
@danemorgan as it stands you only have to be approved once before you can post without moderation. Other than that I guess if you really trusted whatever spam filtering service you were using you could just turn off moderation.
@jon – I thought that this was actually defined in the admin options – for example every comment has to be approved on my blog, even for those who have commented before.
I was thinking about writing this plugin myself, so did a quick search and found this plugin. There are a few things that I’ve found having tested it, and a few ideas I have as to what I would like to see.
- if you use an @ reply in your comment to target the reply at a comment, this becomes an @reply on twitter – and the user name on twitter isn’t necessarily the same as the commenter’s name on your blog.
- I’d like to see an admin option to change the text ’send to twitter’
- The option to change whether the comment itself is sent, or just something like “I’ve just commented on Post Title – check it out. link”
- Bit.ly integration/other url shortening services.
Other than that, it’s a great plugin, thanks!
@epicalex Thanks for the feedback. I’m working on better ways of handling when the tweet gets sent to Twitter so that it only gets posted when you’re approved … or something like that.
I’ve also begun integrating some personalaztion options into the admin panel that I hope to have ready for the next release.
I like some of the other ideas for customization that you had as well and will definitely look into them.
Thanks again man.
Pretty cool, Jon. I plugged it in, gave it my WP API, and edited the “” line of code into the comments.php – I’m using the iNove theme (modded of course) and the section of code I had to put it right after was “” (with a [code] added before and after) and it works like a charm! Thanks
@Suthnautr I’m glad you were able to get it to work
Any ideas on why it won’t work for logged in users? I implemented it by pasting a copy on either side of the else statement testing for logged in / logged out users. When logged in clicking on the link sends me to the top of the page rather than opening the dialog.
Scratch that last comment. I somehow had removed my jquery inclusion from the theme header… [sheepish grin]
Great! This is pretty cool as a concept
hi. Thanks for plugin
perfect.
Regards
I added the new plug like said here but i dont see it on my site. Maybe i did something wrong.
Might give it a go !
An idea for improving commenttwitter. Since we are already asking the reader for their twitter ID, why not insert a small twitter icon linked to their Twitter Profile. It would be a nice thing to do for a reader who took the time to tweet their comment to our post.
@danemorgan I actually want to do that AND grab the persons Twitter avatar. Then I want to make it so you can reply to people by clicking on their name and it will add the @username to the comment so when you tweet it gets sent out as a reply.
I was even thinking about threading the replies.
Updating the plugins on a couple of my wordpress blogs and will be trying out commentwitter.
Awesome idea. I’ll be putting this on my site for sure. Thanks.
Hi
Great plugin, but i wondered if this could be modified for use with Wordpress’ Prologue theme, whereby you could insert the code within the post-form on the home page. I’ve tried this and, expectedly, does not work as it stands but perhaps with some tweaking?
Cheers
I don’t see any “Appearance” tab in my admin. There’s only a Theme Editor not just “Editor” and the “Comments” tab doesn’t allow for any modifications or code input.
Are you talking about editing the actual plugin?
David
Ok, you mean go to your theme editor and plug this piece of code in. Got it.
Thanks
Nice. Especially the fact that this plugin is a work in progress. Hope it evolves towards the ideas you have for it. Want to see what it does after I submitted the comment. Here goes :-)
PS: I wondered what clicking the SEND TO TWITTER link will do – maybe a little radio button could do the trick.
Could you add an option in the admin panel to have all of the comments published to your own twitter? I would like to have my own twitter account updated with comments that are left (preferably after they have been moderated of course). It seems like that should be some simple functionality to add, would just need to capture the site admins twitter un / pw and then pass it through to a second function that would post the twitter message, just as it would if a visitor had entered their own un / pw.
Just a thought.. it may increase your user base for this plugin also.
Thank you.
@gerthough glad you liked commentwitter. i’ve been loving all the feedback i’ve been getting.
@postkarma i like your idea. i’ll look into how hard it might be to integrate that.
Jon
Wondering if this plugin could also be tweaked to allow for Twitter crossposting from the post form in Wordpress’ Prologue or P2 themes?
Thx
Strike that last comment Jon, I googled my php error and found that I needed to enable some features in my php.ini file. Thanks for the sweet plug-in!
thnks for this nice plugin john..gonna use this in my site..looking great..thnks a lot for creating such a nice plugin..
Good news from this plugin ;)
Isn’t this just a cheap rip off of the very cool and innovative TweetMeme button? Only it doesn’t have all the fun stuff that goes with it and the traction… I think I’ll be using the TweetMeme one it doesn’t have anywhere near as many issues as this one appears to have.
Andy: You obviously didn’t read my post or understand what the plugin is about. I’m also curious about these “issues” you say I am having.
Hopefully you’ll give this plugin a second look and reconsider your opinion.
This is by far the best Twitter plugin for WordPress. Awesome Job!
I installed this on a site I’m building, and as a person above stated, it would be a really neat function if the plugin could grab the person’s twitter avatar from their account. While I didn’t have the time to figure out how to do that, I did manage to rig up a little hack that links the commenter’s name to their twitter account:
1. In wp-content > themes > [current theme] > comments.php, search for [value="Submit Comment"] and add [onClick="tweetLink()"] right after that.
2. Copy and paste this code right before that input tag:
function tweetLink() {
document.commentform.url.value = ‘http://www.twitter.com/’ + document.commentform.twittername.value;
}
And as a sidenote, “You can also choose to ad a small note” should be “You can also choose to add a small note”, and “please considor donating a few bucks to support it’s development” should be “please consider donating a few bucks to support its development” (just trying to help).
Drew: Thanks man, that’s really great to hear. I actually really wanted to incorporate the avater/twitter name into the comments but my original method of doing so was squashed when Twitter changed their API so I couldn’t pull Twitter info with an email address.
So now I’m thinking I’ll start saving Usernames (not passwords) of people that use commentwitter. Those people will have their Twitter avatar’s displayed with a little reply button that lets you reply to their Twitter name in the comment form. This way it shows up as a reply on Twitter. Great new way of notifying people of followups to blog post comments.
I’ve been thinking that normal comments should be posted to Twitter as replies to the post author.
I looks like twitter is supporting OAuth now, any chance you can add that to the plugin?
Since installing the plugin I get a validation output error from the W3C validator:
Error Line 63, Column 139: Attribute language not allowed on element script at this point.
…gins/commentwitter/commentwitter.js”>
Seems to be that (js) that causes the problem.
Is there anything I can do bring about validation?
@benwaynet I’ve been looking into ways to integrate OAuth seamlessly into the commenting process. It seemed easier before I actually started implementation. It’s still on my list of to-dos but has been put on the back burner to some other usability changes I need to make,
@johnbakeronline thanks John, I’ll fix that first chance I get.
This’s a good element.
testing comments..
test comment
I’m Testing…
Which I do not make correctly, the PlugIn make no Slide on my blog. It is only static available the twitter-login?
Its Wordpress 2.8
CommenTwitter is a wonderful plugin. Thank you so much for creating it!
This sounds like a cool plugin. I think I would give it a try if it didn’t require the user to type their password. I understand why you need them to do that but it just seems a bit creepy to the user (I don’t think your trying to be creepy. I understand Its just the only way it can work).
Two things:
I am looking to remove the cli.gs link and link directly to the comment or post page using the name of the post at the end of each tweet. Or at least the text read more instead of a meaningless cli.gs URL.
Also can I not remove the posted notification that includes the API links and have that be the name of the commenter?
Unfortunately you can’t hyperlink text in Twitter so you can’t do the “more” thing. I can however make it so it uses your own custom URL.
I could explain to you how to hack the file but then you couldn’t do future updates. I’ll try and work in a feature where you can turn off shortened URLs in the next version. (however this is not wise for most people)
I’m not sure I understand the second part of your question.
I would appreciate if you could send over the updated code that includes a custom linking URL. Basically I just want it to be the exact URL from the rss feed, not tiny URL.
I do have one question with regards to the tiny URL though – is this a part of the character count? If so and I can update the second question instead I would not need to adjust the tiny URL.
With regards to the second question I noticed the following text being added after each post:
9:17 AM Jul 21st from API
Can I make the word API read and link to whatever I want?
Love this for my bridal shows!
I am testing your plug-in
Updated Commentwitter to 1.5.1 and lost my rotating header images in an installation using iThemes’ FlexxPro theme. Deactivated your plugin and now the rotating header images are back where they should be. Wonder what would cause them to disappear upon updating the plugin. Maybe a coincidence, but deactivating Commentwitter did bring back my header images.
Just letting you know in case others may have the same problem.
Thanks, it was a useful plugin.
Thanks for the feedback @tommylinsley … that’s an odd problem you’re having. I tried to recreate it but everything seemed to be working fine. Have you given it a second shot yet?
Jon, thanks for a quick reply.
No, I haven’t given it a second shot yet.
The header images are working now, so I hate to rock the boat, so to speak. I’ll post here if I do try it again.
Gotta love Wordpress. So useful, but so easy to break.
Thank for your work this is exactly what i was looking for
Thanks for building this, Jon. Nice built-in output to Twitter without having to export blogcommenting to Disqus.
A couple of minor suggested tweaks:
- add a border=”0″ in the help icon, as it shows up with an ugly hyperlink square border on some browsers now. (Also suggest including that img in the plugin package, versus hosting it on your site).
- plugin acts a little wonky on comment_popup, although still very functional. AJAX doesn’t work, and it double-tweets the comment: once with the specific comment permalink, and again with the post permalink. I realize almost nobody uses popup comments anymore — but I do :)
Finally, a question: How does CommenTwitter handle Twitter outages/fail whales? The service has been crapping out a lot lately, and I’m concerned that it doesn’t hang my site during Twitter outages.
Installed it and activated it but it doesn’t show up. We have WordPress 2.8.4. Any help?
This seems slick…I wish it would work with the TwitConnect plugin so they would have to enter credentials every time.
I’m Testing…
Looks like cl.gs is shutting down by the end of October:
http://mashable.com/2009/10/04/cli-gs-shut-down/
Hopefully you’re planning on an update to CommenTwitter, replacing cl.gs with bit.ly (or even selectable URL shorteners)?
Well that’s no good. Luckily I stay prepared for this sort of thing. I’ll need to go back and make sure everything is kosher but I should be able to get a new version of commentwitter soon with bit.ly support and possibly is.gd as well
thanks for the plugin mate
You’re quick! I see the plugin’s been updated with bit.ly, good deal. Thanks!
Your plugin breaks javascript for people’s homepages and let me tell you why and what I had to do to fix it on my website.
Line 4 of your commenttwitter.js searches for the element id = “twittername” but id=”twittername”does not exist on my homepage or any page where there are no comments, so it fails and ends up breaking other javascript on the page.
I had to change at the bottom of commenttwitter.php the wp_head to ct_head:
add_action(’ct_head’, ‘Commentwitter_wp_head’);
And then I added the following to my header:
Which disables your commenttwitter.js on pages that are not single pages (which are usually the pages with comments).
So, if you could fix your javascript to not be called when on pages without comments that would be perfect as my solution is not perfect if someone has comments on pages your plugin will not work.
Thanks for giving me a heads up.
I’ll try and rework it this weekend.
Oh.. my code that I put does not show.. the header has something like:
if(is_singular()) do_action(’ct_head’);
Any chance of adding support for su.pr. That would be a great way to combine Twitter and StumbleUpon power in one little link.
I thought I had made it out of your moderation queue.
Sorry about that. I checked my discussion settings and it is set so you should only need to be approved once. That’s very weird. I’ll see if I can;t get that fixed.
But you also just gave me a good idea. I’m thinking I might be able to include an option in CommenTwitter where people can automatically be approved if they input their data and send their comments to Twitter. I think people might feel more inclined to post if they knew it would get posted right away and links in Twitter to your blog from CommenTwitter would always work (where as sometimes comments get stuck in moderation and the links from Twitter won’t go directly to the comment).
I’ll start playing around with it but thought I would just throw it out there.
I ultimately want to create a little script I can use in both my plugins that will give people more URL shortening options. I’ll look more into what it would take to get su.pr in there.
thanks for the plugin mate
COOL PLUGINS!
Testing plugin
Any news on the OAuth functionality? With all the weird hacker link warnings all over Twitter this week, I think everyone’s a little more cautious about using their passwords. Would love this on my site, so I’m willing to wait for news. I’ve subscribed to follow up comments in hopes of an update. Great work on this!
This is a really cool plugin for wp. Thanks
testing this out… looks neat!
wow. it worked. that is sweet!
Outstanding, saved me a ton of work on this… would be even better if we could use our own bit.ly API in order to track links clicked in the twitter posts created.
Also, the ability to tweet comments posted to your blog with a link to the post is what really makes this plugin shine, looked for hours without finding something comparable. If you plan on adding more features, then I would suggest keeping them modular.
Best and happy holidays!
Trying out Commentwitter on jonbishop.com
I’m having a problem with the index page showing an error:
‘document.getElementById(…)’ is null o not an object
Thanks for the plugin!