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:else now works
  • v0.2
    • Fixed bug that would cause repeated output
    • Now plugin can be used in any of the default comment forms

4 comments

1

Nice plugin – even if i don’t need it. :)

But i was trying to find a list of plugins on your site here – and didn’t. Are there no categories for something like this? Do i really have to use the search?

btw: the hurrican map is really nice!

Dirk → dirksteins.de
2

Good works with this plugin. Thank you

Ivorius → textpattern.ivorius.com
3

do you know how to prevent a comment to be hauled off on top of the article when on the preview page?

tobey → wordgasm.com
4

I believe what you’re looking for is the <txp:comments_preview /> tag in your default comments form.

Andrew → compooter.org

Comments are closed for this article.

Previously