root/trunk/CommentAuthorContext/README.txt

Revision 1520, 1.3 kB (checked in by bsmith, 11 months ago)

initial commit

Line 
1# CommentAuthorContext
2# Authors: Brad Choate, Mark Paschal, Beau Smith
3# Copyright 2008 Six Apart, Ltd.
4# License: Artistic, licensed under the same terms as Perl itself
5
6# Overview
7
8In the context of a comment, all `<$mt:AuthorSOMETHING$>` function tags refer to the author of the entry or page where the comments were left. This default behavior in Movable Type (as of MT4.25) creates a situation where it is never possible to output author data for a commenter.
9
10# Description
11
12The CommentAuthorContext plugin creates a block tag called `<mt:CommentAuthorContext>` in which `<$mt:AuthorSOMETHING$>` function tags will refer to the author of the comment.
13
14# Usage
15
161. Create a "user" CustomField. We'll use `<$mt:AuthorDataTwitter$>` for this example.
172. Place the `<mt:CommentAuthorContext>` block tag inside the `<mt:Comments>` tag block (typically in the entry or page detail template).
183. Place your "user" CustomFields inside the `<mt:CommentAuthorContext>` tag block.
19
20Final code might look something like this:
21
22    <mt:Comments>
23        <mt:CommentAuthorContext>
24            <a href="http://twitter.com/<$mt:AuthorDataTwitter$>/"><$mt:AuthorDataTwitter$></a>
25        <mt:Else>
26            I'm an anonymous commenter
27        </mt:CommentAuthorContext>
28    </mt:Comments>
Note: See TracBrowser for help on using the browser.