MCEngine – The micro-comment engine

MCEngine is a plugin for wordpress that adds paragraph (and more) level comments to your blog post.  It also allows users to share snippets of your post so they can (micro)comment on your comments elsewhere.

It’s great for:

  • Leaving corrections and clarifications on any blog post or page.
  • On a news site or blog you can let your users suggest other areas of interest and investigation or just be more selective about what they comment on.
  • Document annotation – each post could be a chapter of a book or document.

Features:

  • Jquery based integration of the comment form which slides in and out of view
  • Limit MCEngine by category.
  • A printer friendly version of the page that shows MCEngine comments
  • An HTML option to hard code links in to your code so that comments are not lost when you edit copy
  • Select who can see comments and who can comment on posts or pages
  • Respects blog and post level comment settings
  • A select and share option that allows users to select text on screen and share it using email, Facebook or twitter or to email you, quoting the text they select.
  • A winerlinks mode.

You can download the latest beta version (0.5) and give it a try

Instructions are available in English

Not just paragraphs.

MCEngine will add a comment link to the following tags *

  • Paragraph tags: <p>
  • Lists:<ul>, <ol> and <dl>
  • Tables: <table>

You can also use the custom [shorcode] mode to add a comment form where you want it.

What is this HTML mode?

In basic mode, MCEngine, will dynamically add comment links to your post when it’s displayed. It counts each tag and then adds the link. So your first paragraph would be MCE comment form one, the next MCE comment form 2 etc. That’s fine for static content. But what if your users add comments and then, one day you decide to edit the post? If you delete the first paragraph the relationship between comments and content is lost.

MCEngines html mode adds unique, custom classes to your content when you save the post. This ‘hard codes’ the comment hooks in to your content. No matter what changes you make the comments and content stay together.

Html mode also offers a custom class, MCE_no, which you can use to turn comments on or off in your editor.

Select and share?

Often your users will see a line of text or quote and want to share that with their friends or followers. They may even want to ask you about it. MCEngine has a select and share option that displays a little pop-up window next to any selected text with options to share. They can tweet (complete with a link to the post), share on Facebook, email the selected text to a friend or email you with a question.  It uses a nifty Jquery plugin by Aakash Chakravarthy **.

Oh, and if you select text and then open the comment for that paragraph MCEngine will pop your text in the comment box for you as well.

Winerlinks?***

Winerlinks are paragraph level permalinks. Named after Dave Winer who implemented them on his blog.

By adding a link to the end of each paragraph MCEngine has a kind of winerlinks functionality by default – each link is a permalink. But MCEngine allows you to turn off the comment part of the system whilst leaving the links in place. If you use HTML mode to create your posts the the links will be proper permalinks.

Why MCEngine?

A few years ago I wrote a little plugin called Feedback by Paragraph (feedbackBP). It added a little link at the end of each paragraph in a post which, when clicked, popped up a comment box so you could comment on parts of a post not just the end. Why?

This plugin was written to help me feedback comments on blog posts to my journalism students who use wordpress as a base for their online publications.

It was based on an idea I saw at http://newsmixer.us which allows users to comment or ask questions on a particular paragraph. The creators of newsmixer are looking to turn the thing in to an API with a wordpress plugin which would be cool but seems a little way off.

The closest plugin I could find is one called marginalia (http://marginalia.cc/) which looks very nice but doesn’t seem to play well with WordPress 2.8. So I’ve written Feedback by Paragraph to fill the gap.

One of the great things about developing a plugin is that you get the occasional reference in your logs as people install them. I’ve seen a number of interesting sites as a result. But the best feedback comes from comments and from trackbacks for the occasional mention the plugin gets.

I had a bit of free time and thought it was time to dust of feedbackBP and see if I could tweak it. One thing lead to another and the result…MCEngine.

I hope you find it useful and if you spot any problems then please let me know.

* “what about <img> or <blockquote> tags andy?” WordPress wraps this content in <p> tags anyway. With MCEngine a user can comment on each paragraph of a quote by default

**Aakash’s jquery plugin is also available as a stand alone wordpress plugin. So if you just want that pop-up functionality then it’s worth a look.

***Like the sound of Winerlinks? Try Daniel Bachhuber’s cool Winer links plugin . It will work with MCEngine but if you only want winerlinks you might want to use it instead.

30 thoughts on “MCEngine – The micro-comment engine”

  1. Thank you!

    However, I wish I could change the note”There are no comments yet…”, and translate “Leave your comment for the highlighted section” into Chinese. May you add some opinions to change those messages conveniently?

    And I like to display the micro-comments among the normal comments either Then vistors could see all the comments directly then find the relevant paragraph from a comment. Can you provide an opinion to do-not-hide?

    I have an extravagant hope that the plugin might use ajax so that we needn’t refresh the whole page while adding a new comment. Then we could read&comment smoothly.

    The function of “Print this with visible MCE comments” is quite good. But we generally like to print just the content without the sidebar.

    Anyway, your plugin is wonderful! Thank you very much

    1. I was attacked by SQL Injection with “feedbackBP”. It adds spam comments continuously, even if I had deleted the post and forbided anyone to cmment. My database was continually added new items that their “comment_post_ID ” was always the same(185), and “comment_type” was always “feedbackbypar0″.

      I stoped the old plugin “feedbackBP” and applied “MCEngine”. But the injection was not stop. Akismet or other Anti-spam plugin are all useless. The attack ended while I stoped “MCEngine” too.

      1. Hi Yilin

        I’m not sure that would have been an SQL injection with MCEngine or why it would appear as soon as you activated MCEngine. But I have made a few changes to the plugin and it now handles comments in a slightly different way. In the first release it used a semi-custom comment form and a custom comment type. Now it uses a custom form but exactly the same processing as any other wordpress comment. An MCEngine comment has some extra meta added but apart from that, they are indistinguishable from standard comments. I also added an option to allow you to show MCE comments in the main comment list.

        1. Nice~ Thank you! The injection stopped. But a new problem appeard. If I use another plugin which would automatically attach something to the commentform, “Custom Smilies” for example, it would lead to a conflict. Of course I can choose another plugin or rewrite some codes to fix the conflict. But I think maybe you can do something to make your plugin more compatible?

        2. And when I open a post-edit page in dashboard. In the bottom of the page:

          Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘MCE_AndyDickinsonPlugins::tiny_mce_version’ was given in [……]/wp-includes/plugin.php on line 166

    2. There is a way to NOT have comments on Images?

      The images that i load on my posts have comments too.

      Any help?

  2. Thank you so much for making this. Though it doesn’t look like much, I want to retain my original comments and then have these miniature comments for just the long-form content written on my site — and this allows for that, without hiccups.

    I tried another plug-in for something similar and after usurping the look and feel of my whole site, I decided to uninstall it. Doing that tore down the rest of the site and no amount of re-uploading or importing the database would save it.

    This is nice, this is simple, this is clean. Just what I was after. Do you have a Donate button somewhere?

    1. Hi Vincent.

      Glad you found the plugin useful. No donate button. All the work is based on information I found on the web so I figure it’s only fair to share!

      Let me know how it works out

      1. I should’ve worded that more carefully. When I said “Though it doesn’t look like much,” I meant my chosen combination of both types of comments. Your plugin looks great.

        Any changes I make to restrict the engine turning on by category don’t seem to change anything, is the only problem I’ve run into. It doesn’t matter if that option is ticked or not, or which categories are selected (I even tried child and parent situations) if it is. I even went into the code and kept it from looking in the database options and just -told- it explicitly which categories to use and no dice.

        Still a great piece of work either way. I’m sure it’s something I’m missing, I just can’t put my finger on what that might be.

  3. If another plugin, such as “Comment Reply Notification” , had automatically added something behind the “comment_form do_action”, they would repeatedly appeared on the top of the content of a post.

    And I think if your plugin could have AJAX, it will be perfect?

  4. Thanks for making this plugin Andy. I was hopeful it would work with my BuddyPress based site, but unfortunately it seems to mangle the page layout. I’m using current release versions WordPress 3.3.1 and BuddyPress 1.5.2 with the BuddyPress Default 1.5.2 theme, which is a two-column layout, with content in a main wide column and widgets in the right-hand column. When I enable MCEngine, the righthand column is pushed to the end of the page, below the main column. I also noticed that enabling MCEngine seems to disable to ability to nest comments (reply to replies) so all comments end up at the same level.

  5. Hi

    I’m trying to implement this great plug-in on my site and everything seems to work except for the commenting operation itself. When the user clicks “submit comment”, he is taken to a blank wp-comments-post.php page and the comment isn’t registered. I’m using the latest version of WP with the Roots theme, if that helps…

    Thanks!

  6. Hi Andy

    Thanks a lot for sharing this plugin. It is exactly what I’m looking for. I changed the comment system to jQuery/Ajax to provide a better reading experience for visitors. I’ll share the code later.

  7. Using your plugin with great results. After updating from feedbackBP to MCengine the compatibility issue with the BP-docs (Boone) simply vanished. Meaning I can now have paragraph comments within a buddypress group. Great work! I have just one question, albeit a simple one; what on earth is the [shortcode] for the plugin?

    1. Hi Dacai.

      That’s great news. The update to MCEngine really did move the plugin on as the comments show there are several people out there who have already worked out how to improve my shoddy coding :)

      It’s nice to hear that it works with buddypress too.

      As for a shortcode. Ahh, good point. There are some shortcodes used to display the comment count etc. That’s a hole in the documentation i need to patch. Thanks.

      1. Hi Andy,

        I just thought I’d put a small explanation in regards to using your plugin (latest version MCengine) with buddypress docs. In general it works well together out of the box, but because wordpress has a habbit of inserting tags automaticaly, you will likely end up with comment sections for paragraps that are to short to warrant one (or even paragraph titels)/ I found that the easiest way to work around this is to embed the text you DO NOT want to have paragrap comments within tags. It takes a little extra time, but I feel the added functionality of your plugin is more then worth the effort. The result (in buddypress) would look something like this;

        http://i-academics.com/courses/creative-writing-fundamental-principles/lectures/the-end-position

        (buddypress group doc with 8! comment sections)

      2. Thanks for this plugin, it seems to work really well. Ditto on the shortcode question, as I’d like to be able to specify which paragraphs the comments apply to. Also, I’m getting a “Print this with visible MCEngine” link at the bottom of the page – is there a way to turn this off?

  8. Great plugin, but I’m missing one thing: it’d be awesome if it was possible for logged-in users to write comments only for themselves, I mean if a logged-in user writes a comment he or she is the only person who can see that comment. That way I could turn pages into kind of a notepad for the users.

  9. Dear Andy!

    You did a pretty good job with MCE, thank you!

    I’m here today to remind you of some small bugs I and some other commenters encountered above – and to give you a little feedback for impreovement. After all, I want to encourage you to invest a little of your time, to fix these things – since they prevent this great little plugin from unfolding its potential which lies within it.

    Here we go: some things on the options page just do not do what they say:

    1. Allow post and page level override.
    When this checkbox is set, an additional widget appears in the edit posts view, where one can set (via a checkbox) whether MCE should be enabled in this post (or page). But the checkbox doesn’t care whether it is checked or not – meaning, is is alway unchecked, but the feature is enabled all the time – and it say all the time: “Enabled for this entry”. → Well, behavior not what it’s supposed to be. (At least it doesn’t lie …)

    2. Limit MCEngine to post category.
    Have you ever tested this yourself? It just doesn’t work – but would be a useful feature if it would. Additional buggy behavior: the dropdown list, where to select the desired category only shows categories that have at least one post in them. Why? Just list all categories and let the user select. Anyway: instead of a drodown list, a multiple select box would be even more preferable. Why limit it to just one category?

    3. For improving performance:
    Could you PLEASE make sure, that the stylesheet for MCE is ONLY linked in the header, when MCE is enabled for a specific page? We don’t need the MCE stylesheet on all of our pages on a site. Saves one expensive http-request. → Priceless!

    4. Print link
    Would be great if there where an option to turn off that “Print this with visible MCEngine” link. I believe its simple to implement this option once for all, instead of “forcing” all people to comment it out or hide it via CSS if not needed. → Would be nice of you. ;)

    5. In general:
    It would be pretty cool, if all these option could be set on a post/pages specific level, not in one general options page. … just thinking …

    So…
    might I be so bold to ask you to please make a new bugfixed version? This really would be awesome! One could come up with a lot of great ideas and big time feature requests for this mighty little thingy – I’m not asking for that. Just the small bugfixes, to make it work correctly. Please, please, please! ;)

    Btw: I use WordPress 3.5.1 – maybe some parts of the plugin are now rendered incompatible with a newer version of WordPress? Could you please check this and bring it up to date?

    Thanks in advance in the name of all your (future) plugin-users!

    Bye
    Darkwing!

  10. imagesYour comment is awaiting moderation.
    There is a way to NOT have comments on Images?

    The images that i load on my posts have comments too.

    Any help?

  11. Hi there, Andy,

    I quite like this plugin. I’ve been trying to find the best way to simulate annotations and the comments feature in Word, and the MCEngine is really excellent. (I really admire Medium.com’s commenting interface, and am looking to do something similar, in fact.)

    You must be terribly busy, so I suspect I know the answer… In any case, I’m wondering: Would you consider customizing your plugin for an agreed-upon rate? There are small tweaks I’d like to make to how the MCEngine comments display, but my coding ability isn’t particularly advanced.

    If this is something you’d consider, please do be in touch by email. Feel free to let me know what rate you have in mind. If you prefer, I can specify what sort of tweaks I am hoping for, and you can determine whether the work’s scope would be acceptable.

    And if not, I wish you all the best and thank you for this really elegant plugin.

  12. Hi Andy,

    Haven’t seen you reply to any comments anymore. Is this plugin still in active development (will it ever get out of beta)? I ask because your plugin is still one of a kind (and a brilliant idea). Some other plugins on the wordpress repository are now attempting to do the same, but they reply on either a specific theme, or off-site storing. None come close to your attempts, which is why i would hate to see you abandon it. If you are still out there, please give us fans a sign of life (and perhaps a status update on the plugin).

Leave a Reply