Textpattern Plugin : ajw_if_preview
01 October 2005 @ early morning | Comments (4)
Plugin Details
- Download:
- ajw_if_preview
- Version:
- 0.3
- Forum:
- Read discussion
- Status on this site:
- Active
Please use forum for all bug reports and questions
Update: 01 Nov 2005 -› The functionality of this plugin can now be achieved with txp:if_comments_preview.
Summary
Textpattern forces a comment “preview” as an important step in spam prevention. This plugin allows for conditional output of code or text, based on whether or not the user is previewing a submitted comment.
The main benefit of this plugin is achieved by using text or styles that differentiate the initial comment submission from the previewed submission. It’s just about supplying a subtle visual cue to minimize your website visitor’s disorientation during this intermediary step. You can see the plugin in use on this site by previewing a comment below.
Usage
<txp:ajw_if_preview><h3 id="post-comment" class="preview">Comment Preview</h3><txp:else /><h3 id="post-comment">Post your comment</h3></txp:ajw_if_preview>
Patch
Due to the simplicity of this plugin, I anticipate its functionality to be brought into the core of Textpattern. So rather than wait around for that to take place, I’ve taken the liberty to create a patch file. Have at it!
Revision History
- v0.3
txp:elsenow works
- v0.2
- Fixed bug that would cause repeated output
- Now plugin can be used in any of the default comment forms
4 comments