Introducing Textpattern comment tags

admin-ajax

Textpattern CMS has the ability to accept comments on published articles. It’s a useful feature if you want to gather feedback on some or all articles. For some people, Textpattern is used as a blogging engine and nothing more. Some bloggers like comments, some don’t. For others, Textpattern is a content management system that is entirely under their control and doesn’t need any kind of commenting functionality at all. In each case, commenting can be globally enabled or disabled across the site, so everyone’s happy. As an extension to this, if commenting is enabled in a given Textpattern site, it can be disabled on a per-article basis. This is useful for when feedback is not relevant, or not wanted.

There are a bunch of Textpattern commenting tags available to use:

  • comment_anchor
  • comment_email
  • comment_email_input
  • comment_id
  • comment_message
  • comment_message_input
  • comment_name
  • comment_name_input
  • comment_permlink
  • comment_preview
  • comment_remember
  • comment_submit
  • comment_time
  • comment_web
  • comment_web_input
  • comments
  • comments_count
  • comments_error
  • comments_form
  • comments_help
  • comments_invite
  • comments_preview
  • if_comments
  • if_comments_allowed
  • if_comments_disallowed
  • if_comments_error
  • if_comments_preview
  • recent_comments

Some tags relate to the comment form itself:

  • comment_email
  • comment_email_input
  • comment_message
  • comment_message_input
  • comment_name
  • comment_name_input
  • comment_web
  • comment_web_input
  • comment_preview
  • comment_remember
  • comment_submit
  • comments_error
  • comments_help

These tags relate to handling published/moderated and work-in-progress comments, plus some other page scaffolding:

  • comment_anchor
  • comment_id
  • comment_permlink
  • comment_time
  • comments
  • comments_count
  • comments_form
  • comments_invite
  • comments_preview
  • recent_comments

…and there are a small handful of conditional comment tags:

  • if_comments
  • if_comments_allowed
  • if_comments_disallowed
  • if_comments_error
  • if_comments_preview

I’ll be explaining the three types of comment tags in the following three articles, but before that it’s important to understand what commenting can and can’t do. In an ideal world, everything would be possible and take up a minimum overhead – even on Planet Textpattern that’s not the case. Frankly, if you consider yourself in the camp of people who don’t want commenting at all, and there’s a school of thought that if you just want to use Textpattern as a pure, personal publishing tool to hone your craft of writing words, then you don’t need to have comments on at all. It’s perhaps a controversial thing, especially since many other blog-esque systems are very focussed on commenting and third-party commentary.

Here’s the bottom line: Textpattern has linear, non-threaded comment functionality available in its core. A reader can read your article (or completely ignore it, actually) and leave a comment, should that be an option as defined by the author or site manager, along with their name, their website address (if they have one) and email address. You can style the input boxes, and also the output, so it can look as pretty or ugly as you wish. Comments need to be previewed before they can be submitted. There are plugins that can bypass this measure, but in real-world tests the preview-first-then-submit approach stops lots and lots of spam.

There is no functionality for threaded comments in the Textpattern core. That is to say, the comments are flat/linear – comment authors can, of course, refer to existing comments further up or down the list, but will not be able to reply to it directly with an indented block. If you’re looking for that kind of feature, there are third-party services like Disqus that offer a much richer comment experience if that’s important to you. Integrating Disqus with Textpattern is pretty easy, too: check out the guide at TXP Tips for a complete walkthrough.

Next time: comment form components. It’ll be fun, you should come back and see. No, really – it will be. See you there.

Looking for quality Textpattern Hosting? Look no further than Arvixe Web Hosting and use coupon TEXTPATTERN for 20% off your first invoice!

Tags: , , , , , , , , , , , , | Posted under Textpattern | RSS 2.0

Author Spotlight

Pete Cooper

Pete Cooper has been using Textpattern since 2005. Textpattern is his preferred CMS weapon of choice. Its logical and flexible approach to content management makes Pete happy, as does its lightweight core and helpful user community. Pete's website - petecooper.org - runs on top of Textpattern and chronicles his day-to-day experiences from his home near the Atlantic in north Cornwall, United Kingdom.

Leave a Reply

Your email address will not be published. Required fields are marked *