Quote 2.0 is a plugin for Movable Type 4.0 that easily allows commentators to quote a previous comment. There is an unreleased, older version that works with MT 3.


There are several possible ways to implement a quote comment feature on Movable Type blogs with static pages. One could write a javascript that looks at the HTML of a comment in a static page and copies it to the comment box. However, in many instances the HTML of the comment that the file contains would not be appropriate for the comment box. What commenters expect to get is the original comment text.

The second option would be to embed in the static file the original comment text as well as the rendered HTML. However, this will cause archive pages to become bloated with quotable text that will never be used. Other options, like limiting quotability to the last dozen comments, limit usability.

The solution I implement is an AJAX/JSON backend that dynamically returns requested quote text. Javascript, embedded along with the comments, retrieves the quoted text from the backend and enters it into the text entry.


Download version 2.0.


To install extract the distribution in your plugins directory e.g.

cd /usr/local/www/cgi-bin/mt/plugins && tar xvzf ~/quote-2.0.tar.gz

To configure your blog to use Quote, you need install the Prototype javascript framework. Upload prototype.js to your server and modify your Header template, adding the javascript below the stylesheet line (or other suitable place) e.g.

<link rel="stylesheet" href="<$MTLink template="styles"$>" type="text/css" />
<script type="text/javascript" src="/prototype.js"></script>
<MTIf name="main_template">

Now edit your Javascript template and add the following template tag at the end: <$MTQuoteScript$>. This adds a javascript function to the template, which Quote uses to communicate between the browser and the backend.

Finally edit your Comment Detail template and add the <$MTQuoteLink$> tag in an appropriate place, like after the permalink hyperlink.

Rebuild your site and you are ready to go.


Currently, these tags do not support the PHP interface. I don’t know PHP, but will include corresponding code if someone wants to write it.

MTQuoteLink: argument ‘inner’ allows you to specify the hyperlinked text or other html, e.g.

<$MTQuoteLink inner="Q"$>

It defaults to ‘Quote Comment’.

MTQuoteScript: argument ‘wrap’ causes the javascript to be wrapped by script tags. e.g.

<$MTQuoteScript wrap="1"$>

It defaults to ‘0’. Useful when not embedding the script in a javascript file.


Quote comes with a built-in template for the quote text:


<$MTCommentBody autolink="0" sanitize="0" convert_breaks="0"$>

This template can be overridden by specifying a module template called “Quote Comment”. You can change the name of the template that Quote looks for by specifying a ‘QuoteTemplate’ option in mt-config.cgi.


If you are like me and run two blogs on different domains with the MT install being on a third domain, then you need to make sure that the cgi scripts (or at least mt-comments.cgi) can be accessed via each domain on which you want to use Quote. This can be done by setting up aliases or symlinks on the blog domains to the cgi-bin directory of the MT-running domain. This issue occurs because the plugin uses AJAX/JSON to transmit information and browser security settings require backend to be on the same domain as the blog using it.

If you fine that the quote is taking too long to load, try running your blog under FastCGI.

About this Archive

Find recent content on the main index or look in the archives to find all content.


Powered by Movable Type 4.37