Quote Comments Plugin For Wordpress [Updated March 2010]
This plugin adds a tiny link that says “Quote” on each comment on your posts. Click it, and the contents of the comment is copied to the comment area, wrapped in blockquote tags.
This plugin is now active on this website, so you can test just below in the comment area (provided that there are comments, of course).
Download
Download the plugin from Wordpress.org
Donate
If you like this plugin, feel free to buy me a beer:
Languages
The plugin is fully translatable using the built in Wordpress system for that (involves “PO” files). It’s currently available in:
- English
- Danish
- German
Features
- Quote Comments is compatible with MCEComments.
- In the options page, you can type in your own title for the quote link.
- There’s an option to choose to insert the quote link after the comment text (compatible with the most themes) or right next to the comment timestamp (remember to check HTML validation, some funky stuff is being done here).
How To Replace The “Quote” Text With An Icon
Add this CSS to your stylesheet:
a.comment_quote_link { margin: 0; height: 0; display: block; overflow: hidden; width: 12px; height: 12px; text-indent: -9999px; background: url(images/icon_quote_comment.gif) no-repeat right top; }
How To Move The “Quote” Text To The Top Right Corner Of The Comment
In addition to the above CSS, add the following to your stylesheet:
.commentlist li { position: relative; } a.comment_quote_link { position: absolute; right: 20px; top: 20px; z-index: 1; }
Updates
- October 2009, v. 1.9.1: Fixed a problem with the quote link not appearing on some setups. You can now pick the plugin hook in an options page.
- November 2009, v. 1.9.3: Added a feature that makes the commentform jump to the comment whose quote button you pushed. Also fixed a problem where the quotelink would be quoted when using get_comment_text for insertion.
- December 2009, v. 1.9.4: Microscopic bump, no new features. Changed default plugin hook to “get_comment_text” because “get_comment_time” caused a lot of people trouble. You can still pick get_comment_time in the options page.
- March 2010, v.1.9.8: Tiny bugfix for when you’re quoting names that contain apostrophes.
- Comment Live Preview For Wordpress
- Quote Comments Plugin For Wordpress [Updated March 2010]
- Subscribed Commenters Plugin for Wordpress [Update]
- It's A Threaded Comment Nightmare (Of The Good Kind)
Yes I did. Just as you instructed at the top of the page.
Ay caramba! That sounds complicated. I’m looking at my theme’s “comments.php” file right now and (not being a code-head) it looks like a big incomprehensible jumble to me!
I’ll see what I can figure out and report back here in 10 minutes.
Ugh. I sent you an email so as not to clutter up this thread with a bunch of code, so maybe you can quickly find the classname. All I can come up with on my own, searching through my theme’s comments.php file, is:
ol id=”commentlist”
Does that make any sense, or is it useful in any way? I’m such a dolt, I don’t know what I’m looking for.
OK, I took your emailed suggestion, replacing
…with…
.
…and it worked!
Sorta.
What worked is that the quotation-mark gif now finally appears next to each comment. Thanks!
HOWEVER, it now appears at the bottom-right of each comment, instead of the top right as desired.
Considering that your fix worked at restoring the gif-on-every-comment aspect, is there now some way to adjust it to get the quote-gif to be back at the top of each comment? (That is, without re-breaking the code.)
While I’m at it, I’d also like to ask three optional questions if you have the gumption to answer them:
1. Where I really want the gif to be is not at the bottom right or even at the top right, but actually just to the right of the commenter’s name and datestamp, on the top line. Any way to do that?
2. The quote-function grabs the person’s user name and the text of the comment — but leaves out the comment number. Any way to grab the nuimber too?
3. The paragraph breaks disappear in the quoted text. Any way to retain them?
No need to answer those last three if it’s too much of a bother. Just trying to crawl toward perfection!
That’s a lot of work. I’m afraid I’m at the end of my rope here.
Since we’re beyond the functionality of the plugin only here, and in HTML, CSS and PHP land, could you possibly find some programmer friend nearby who’s able to help you? You’re welcome to post your solution here if you find one.
Sorry.
I updated the plug-in to 1.9 and now the “quote” link no longer exists in my template. I have deactivated the plug-in and re-activated it. I have also reinstalled.. It still does not show up.
The Quote icon has been moved from being inserted after the comment, to be inserted right next to the comment time.
That of course presents a problem if your theme doesn’t use the comment_time feature.
Can you give me a link to your website? Maybe I can give it a short look see.
The ‘quote’ link appears to me as text, but when I insert the code to the css so as to show the icon, it never appears…
The CSS to change the text to an icon has changed in 1.9.
Try and replace “.quote a” with “a.comment_quote_link”, let me know if it works.
Hmm it appears, but on the line under the time… Should I play with the variables as to appear on the same line?
I updated on another blog and the comment quote is there. The site that has the issue is running the Vigilance Theme (http://themes.jestro.com/vigilance/). If you are requiring comment_time I will look into adding to the comment, right now it only displays the date.
I’ll let you know what happens.
Hmm. If you have the last positioning part of the CSS code it should be in the top right corner of the comment. If it’s not there any way, I’m unsure what to do.
Right, I see it doesn’t use the “comment_time” feature. If you wanted to, you could hack the plugin and replace “comment_time” with “comment_date”. This is off the top of my head so I’m not entirely sure that’ll work.
Upgrading to 1.9 broke the plugin. How do I get the previous version? I can’t find it anywhere.
I’ve just today released an update to the plugin. The default setup should still give you trouble, but there’s now an options page. Picking “get_comment_text” in the plugin options page should fix things for you.
Alas, still no luck on 1.92 and using “get_comment_text”.
Oh. Now it’s working. Thanks!
right,
i’ve installed the 1.9.1 version but didn’t like it very much so i want to return to 1.9 but unistalled it and can’t find it anywhere on the internetz. where can i get it from?
got a copy of it, mate?
I don’t have the old versions lying around, no.
What specifically don’t you like about 1.9.1?
it doesn’t seem to work with ie (which most of my readers use) plus it highlights the post as a clickable link (which does not look good). also, i’m not able to personalize it as i want to which wasn’t a problem with the previous version.
shame you don’t have the old version anymore. i’ll still look for it because i think it’s the best one for me but in the meantime i’m just gonna switch it off.
cheers.
I still don’t hear any precise problems. Fact is, 1.9.1 works exactly like 1.9, except you can pick in the options page where to insert the quote link.
What do you mean it “highlights the post as a clickable link”?
Are you using the latest version of Wordpress?
Have you tried going to the options page, “Settings > Quote Comments” and picking “get_comment_text”?
Hello there. I really apreciate your plugin. Great job.
Can you help me with a problem? If I activate your plugin, I cannot read the comments on the wp-admin.
http://img265.imageshack.us/img265/314/commentsd.jpg
I can’t moderate the comments properly without it.
That happened only with the newest version. Do you know why? If no, can you send me an older version of the plugin? That would be really nice.
Thank you Leon
Lol, sorry about the Leon. Joen, of course. And I just read that you don’t have an older version of it. I hope you can help me with my problem.
Kai
Thanks for the bugreport. I’m gonna try and see if I can fix.
I’ve updated to 1.9.2.
Let me know if that fixes it for you.
Great job Joen. You fixed the bug. Thanks.
Hello there,
I’ve just installed 1.9.4 and I have a small problem: When I press the Quote link, the text area with the cited comment appears, but I can’t change line so as to write my comment. If I press the enter key, my comment will still be part of the cited (previous) comment. Is there a solution on this?
I tried to find the previous version so as to eliminate the problem but can’t find it anywhere. At WP plugins there is only the latest 1.9.4 version. Where can I find the older versions?
Thank you!
That’s a problem with TinyMCE Comments, and not specifically Quote Comments. I haven’t yet found a way to fix this, only a workaround.
Before you click the quote button, add a few linebreaks to the commentbox. Place the text cursor at the top of the commentfield, then click the quote button. Not elegant, but you should now be able to go to the end of the commentbox.
Or you could use the HTML editor.
If you are indeed using TinyMCEComments (like I am), then this issue has existed also with older versions of quote comments.
I made a fix to the plugin, now v. 1.9.5. I’m not sure it’ll work, but it may now be easier to insert quotes with MCE comments.
Fixed! Thank you! :-)
This is weird. *All* my reader’s comments looked like links (underlined, etc), yet mousing over them coughed up some weird “Javascript void” nonsense.
Oddly, this didn’t appear to me when I was logged into the site, but one of my readers mentioned it. I logged out, and sure enough, there it was.
I deactivated QuoteComments and all is well. I’d love to figure this one out – your plugin is hugely useful.
Details:
Theme: These 1.5X (haven’t installed 1.6 yet)
Plugin: 1.9.5
Latest version of WordPress (2.8.6?)
Any ideas?
I get a feeling this is due to where the “quote” link is inserted by default.
Try going to the Quote Comments options page, and choose “get_comment_text” instead of “get_comment_time”.
I have a site which only allows comments from logged in people. Would it be possible to modify the plugin to only activate the plugin/load the scripts into the HEAD, if people are logged in, because if they’re not logged in on my site it’s redundant. Thanks.
Are you running the latest version of the plugin? I believe I have made a few tweaks for “logged in” situations.
What exactly isn’t working?
I swear it was showing on the page for non-logged in people when I first installed it, but now it isn’t, I’m sorry.
There is still the calls to the css and javascript in the HEAD, I don’t see the point of them if people not logged in can’t comment.
Also, not sure if this is your plugin but if I’ve got Quote to appear beneath the comment the code is like this
Sefa, the image is from Alexa.com, I’m sure the next time I update the list your listing will have the correct image.
Regards,
Patung
(Quote)
I don’t understand why there is an opening ‘p’ tag and then the ‘a’ tag is closed after it?
That’s a good point. I’ll add this in.
I’ve recently made some tweaks where you can select if the quote link comes after the comment or next to the comment date. Sometimes either is incompatible. I’ll look into it.
Ah, my html doesn’t show. Here it is http://www.indonesiamatters.com/h.txt
This pluggin seems to be exactly what I am looking for but I am experiencing a problem.
I currently have my theme set up to only allow people who are logged in to leave comments.
When logged in, the quote link appears (perfect!).
If someone has already quoted a comment, their comment as well as the quoted message have links (problem).
When logged out, if you return to a comment that was quoted, the quote link still appears (problem). In that scenario, if you click on the quote link a error message comes up saying “Quote Comments plugin is having some trouble! It could possibly be a problem with your Wordpress theme. Does it work if you use the default theme? Does it work if you disable all other plugins? If you look in the HTML source of a page with comments, can you find where [id] is the ID of the comment?”
What I need is when logged in for the quote link to appear but only on comments. Also for it not to appear on comments when not logged in.
Please help.
Hi,
So I think I understand what the problem is. If I’m right, the problem probably is a combination of a bad Wordpress API and your theme.
The way Quote Comments works is, that when you click the icon, it copies everything from that comment — author, possibly apparently even the quote link — to the comments box. It then uses JavaScript to “clean this up”, so only the comment remains. Which is when it apparently fails to clean up the quote link in your case.
Why does it have to do this? Because the Wordpress “wp-list-commenst” function doesn’t wrap _only_ the plugin in a div, so it’s impossible to easily separate out what’s comment and what’s cruft. Which is a pain in the ass.
Question: does your theme have the ability to do threaded comments? If so, please send me a link.
If it doesn’t, I would suggest you try and upgrade to a theme that does have the ability to do threaded comments. This should fix the problem. You can also try and activate the default theme, see if that works.
Hello mister! Fantastic plugin, but I have a problem after the last update!
The author name who did the commentary is not showing when you click in quote. Do you know what is the problem?
Thank you a million!
From which version did you upgrade? Did you use the most recent version, where it worked? Or did you upgrade from an even older version?
It was a good option when you wanted to do multi-quotes.
No problem. I’ll wait till then.
Thanks.
Here’s the 1.9.7 release of Quote Comments, for those of you that can’t wait for the next version:
http://noscope.com/downloads/quote-comments_1.9.7.zip
thank you
I’m using the last version, 1.9.8. Before that everything was working right! Thank you for the fast reply dude, you’re the man.
Which version did you upgrade from?
Actually I dont know. But I got the plugin in Wordpress Database, so I think it was the last version before 1.9.8.
The reason I ask is because I think I removed that feature a while back because I considered it “clutter”.
I got it.
There is anyway to put in there the author names before the comments in quote? Or else one place to get an older version of your plugin that have this feature?
I really need it :(
I was searching how to change your code, but im quite newbie in php or js. :-D
I’ll see what I can do.
Awesome! Waiting your reply and thanks again.
I have the same problem with the new version.
I’ll wait to a solution too.
Thank you!
Alright, I’ll acknowledge this bug and put it on the list.
I will build an option as to whether you want to include names or not.
No date for this, however, as I’m exceedingly busy making the rent.