Quote Comments Plugin For WordPress [Updated February 2011]

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

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.
  • Late March 2010, v. 2.0: Buncha fixes. Mostly to the comment author issue that 1.9.8 tried and failed to fix.
  • New feature: Reply. It’s a simple link that takes you to the commentform, and copies the name of the comment on which you clicked “reply”. This is disabled by default, and is best used by people who don’t like the threaded comments of WordPress.
  • February 2011: Added support for WordPress 3.0.5.
  • Late February 2011: Fixed problems with smileys and paragraphsl. Tested on 3.1.

Responses to “Quote Comments Plugin For WordPress [Updated February 2011]”

  1. Joen says:

    As a little service update to WordPress 3.0.5 users experiencing emoticon issues with Quote Comments.

    I’m completely busy with work these days, and won’t have time to build a fix anytime soon. If you’d like this issue fixed, you’ll either have to wait, or one of you will have to fix it and send the fixed code to me, and I’ll push it out.

    The issue is that WordPress 3.0.5 security hardens the comment list system, which makes it very difficult to insert the “hook” tags which quote comments uses to know what to quote. The fix so far has been to set the priority of the hook tag function call to very high; it seem the function that converts comments to emoticon is lower priority. It might be as simple as adjusting the priority of the hook tag function to be high enough to insert the tags, yet low enough to not oust the emoticon filter.

    Let me know if any of you steps up.

  2. Gabi says:

    to solve the problem with missing paragraphs, I transformed the action add_quote_button into a filter.
    Basically, I replaced (twice)
    echo ($output . $button);
    with
    return ($output . $button);
    in the definition of function add_quote_button.
    I also replaced
    add_action(‘get_comment_text’, ‘add_quote_button’);
    with
    add_filter(‘get_comment_text’, ‘add_quote_button’);
    All these changes were done in the file quote-comments.php
    Everything seems to work fine now.

    • Winter says:

      Gabi, Your fix seems to have worked for me as well (FYI I’m on WordPress 3.0.1 still). Thanks!

      EDIT: Just saw that 3.1 released today. Any one know if this plugin will work fine with this WP release? Either with or without Gabi’s fix?

    • Joen says:

      to solve the problem with missing paragraphs, I transformed the action add_quote_button into a filter. Basically, I replaced (twice) echo ($output . $button); with return ($output . $button); in the definition of function add_quote_button. I also replaced add_action(‘get_comment_text’, ‘add_quote_button’); with add_filter(‘get_comment_text’, ‘add_quote_button’); All these changes were done in the file quote-comments.php Everything seems to work fine now.

      Thanks for this. I’ll try and add it tomorrow, and if it works for me, I’ll push an update to the repository and credit you.

  3. Joen says:
  4. Joen says:

    I’ve tested Gabis fix, also on WordPress 3.1, and I’ve pushed out a new version which should show up in the repository soon. Thanks so much, Gabi, for fixing this! Credit in the readme file.

  5. Manuel says:

    Hi,

    is it possible to load the plugin files just on pages with comments and not allways on the index page?

    Regards,
    Manuel

  6. chris says:

    Hello love the plug in but it does not work TinyMCEComments.

    I have only this plugin and the TinyMCEComments. I have zbench theme http://wordpress.org/extend/themes/zbench

    Please Help have my site just how I want it and this will be the icing on the cake

  7. Artem says:

    When the page is being loaded I can see the quote and reply links in comments, but once it has been loaded, the links turn into large pieces of code. I can send you a screenshot. What sould I do? Thank you

  8. Artem says:
  9. Great plugin, BUT sorry to say this doesn’t work with TinyMCE comments at all in Chrome and fails miserably in FF :( . Am Idoing something wrong?

  10. Anthony says:

    I used the code To Replace The “Quote” Text With An Icon and i do not see the icon I tried the code To Move The “Quote” Text To The Top Right Corner Of The Comment and that worked. Please help.. I also tried it with a different image and i see nothing

    • Anthony says:

      Anthony,

      I got it to work but i would like it to be at the bottom of every comment. I was working with this code:

      .commentlist li {
      position: relative;
      }
      a.comment_quote_link {
      position: absolute;
      right: 20px;
      top: 30px;
      z-index: 1;
      }

      i get it to the bottom but since the position is absolute it ends up in the middle of some of the longer comments any help?

  11. design says:

    Wooo.. A Plugin which i am searching for a long time.. thank you for the post.. I just have a check over this plugin and come back soon…

  12. Juliawan says:

    thanks for this plugin I am very like it

Leave a Reply