Textpattern plugin : ajw_comment_alt

09 March 2005 @ early morning | Comments (5)

Plugin Details

Download:
ajw_comment_alt
Version:
0.3
Forum:
Read discussion
Status on this site:
Active

Please use forum for all bug reports and questions

Summary

Alternates output based on even- or odd-numbered comments. Intended usage is from within default comment form. Another plugin solution (much more powerful) would also be to use zem_nth. This functionality was previously accomplished through Jon Hicks’ tricks.

Attributes

even (optional)
Some other text to be output instead of ‘even’.
odd (optional)
Some other text to be output instead of ‘odd’.

Usage

Ideally, this is meant to be used in your default comment form. While it is possible to use this plugin with the default <ol> formatting of comments, you’ll be able to do much more fun things if you switch off numbered list formatting in admin->preferences.

Example 1

<div class="<txp:ajw_comment_alt />"> 
    ...other comment form stuff... 
 </div>
<div class="odd"> 
    ...other comment form stuff... 
 </div>

Example 2

<div class="<txp:ajw_comment_alt even="foo" odd="bar" />"> 
    ...other comment form stuff... 
 </div>
<div class="foo"> 
    ...other comment form stuff... 
 </div> 
 <div class="bar"> 
    ...your txp comment tags would go here... 
 </div>

Revision History

v0.3

  • Now able to be used multiple times in the same comment form without buggy behavior

v0.2

  • Fixed bug caused by careless global variable usage. D’oh. This is a necessary update if you are using this plugin in combination with ajw_comment_num.

5 comments

1

Love this one too! Thanks!

Jon Hicks → hicksdesign.co.uk
2

That’s pretty fantastic. Many thanks for this plug-in. Works great.

Mandelbrot
3 Great plugin! Have been searching a long time for such a plugin! Thanks a lot!
stefan → grenzstein.com
5

This plugin is sexy. Works great. ;)

Corey Csuhta → aubray1741.deltaanime.net

Comments are closed for this article.

Previously