Today I sent in some proposed changes to the comments forms of a Textpattern base install.
In case you are new to Textpattern, forms are Textpattern-speak for snippets or includes – essentially a means of including chunks or blocks of content. The main use for forms is repeating content – headers, footers, sidebars and the like.
In a clean install (as of TXP version 4.2), Textpattern offers an in-built mechanism for the control and display of comments. This is very helpful but the markup is a little out of date. In addition, I believe it would be helpful to include more conditional arguments – arguably one of the most impressive of the Textpattern feature-set.
Here is the proposed changeset and printed below.
This proposed changeset does not address the any possible future changes to the comments system
Let me know what you think!
comments_display form
<txp:if_comments> <h3 id="comment"><txp:comments_invite textonly="1" showalways="1" showcount="0" /></h3> </txp:if_comments><txp:comments /><txp:if_comments_preview> <div id="cpreview"> <h3>This is a preview of your comment. Press "Submit" in order to post it.</h3> <txp:comments_preview form="comments_preview" /> </div> </txp:if_comments_preview><txp:if_comments_allowed> <div id="comments-form" class="clearfix"> <txp:if_comments> <txp:else /> <h3 id="comment" />">Leave a comment:</h3> </txp:if_comments> <txp:comments_form /> </div> </txp:if_comments_allowed>
comments form
<txp:comment_anchor />
<div class="comment_post">
<div class="comment_meta">
<txp:comment_name /> <txp:comment_permlink>#</txp:comment_permlink>
</div>
<div class="comment_details">
<txp:comment_message />
</div>
</div>
comment_form form
<txp:if_comments_error> <txp:comments_error break="li" wraptag="ul" /> </txp:if_comments_error><fieldset> <legend>Comment form</legend> <ol> <li><label for="name"><txp:text item="Name" /></label><br /><txp:comment_name_input /></li> <li><label for="email"><txp:text item="Email - required but not displayed" /></label><br /><txp:comment_email_input /></li> <li><label for="web"><txp:text item="Website" /></label><br /><txp:comment_web_input /></li> <li><label for="message"><txp:text item="Your comments" /></label><br /><txp:comment_message_input /></li> <li><txp:comment_remember /></li> <li>Style your comments with <txp:comments_help />.</li> <li><txp:comment_preview /> <txp:comment_submit /></li> </ol> </fieldset>



Comments [2]
# 30 January 2012, 12:25
This was a actually incredibly good submit. In theory I??™d prefer to write like this also – getting time and actual effort to make a fantastic piece of writing??¦ but what can I say??¦ I procrastinate alot and by no means appear to obtain a little something done. dd1
# 3 February 2012, 18:18
Great blog! I am loving it!! Will be back later to read some more. I am taking your feeds also