Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-11-01 22:02:45

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

write "The basics of comments in TXP" and win... well... some respect!

Hi,
I’m having some troubles (and headaches) trying to figure out some “how to“s related to comments.
So, I want to ask a little favor this wonderful community:

Can any of you, Masters of TXP, who know the art and the secrets of using comments in TXP, write a very little and basic tutorial about comments in TXP and post it in Tag Examples ?

If possible, this basic introduction/tutorial explain the following:

  1. How do I display comments invite in article list only for articles with comments turned on…?
    • and avoidi empty mark-up if comments are off?
    • and avoidi empty mark-up if we are in an individual article page?
  2. the basics of comments form
  3. the basics of comments display
  4. How are all the comments forms (that comes by default in TXP) interconnected?
  5. anything you think it’s related to the basics of comments.

This doesnt mean that just one person must answer/write all this questions.
Please, share any knowledge about comments in TXP!
Anyone can open a new thread in Tag Example with just one example. Then, others will come and post in the same thread, and we will have “The Very Basics of comments in TXP

Please, include tag examples, and snippets, and whatever you think will drop some light over the darkness of comments.

Thanks all.

“Why dont you write it, you, so-called Moderator of Tag Examples?” may you ask.
I must admit, ashamed, that I know very little about using comments functionalities in TXP.

Last edited by maniqui (2005-11-01 22:06:41)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#2 2005-11-01 22:22:44

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: write "The basics of comments in TXP" and win... well... some respect!

No 1. is a bug (see other topic you opened) which only appears when you use the wraptag attribute.

The Rest: Ok, I’ll explain it, but you will have to write the documentation for it once you “get it”. ;)
There are three forms that have “comments” in their name and the first time you look at it, it maybe a bit of a “huh”. But it does make sense (at least when you keep in mind, that we were not “allowed” to break backwardscompatibility).

  • comments (comment): This is the analog to your article form, only it displays the comments. Much like article-form it contains tags for body, name etc.
  • comment_form (comment): This is the html-form that is displayed for users to enter new comments.
  • comments_display (article): This is relatively new and was introduced when we made the comments overhaul. There used to be a time, when you coudln’t customize comments display any more, than with the above. The comments were always below an article, and the form always below the comments. But some people wanted to move everything whereever they wanted. Manfre provided a patch for it, unfortunately there was a tricky issue for the people that would upgrade. How can we retain the old behaviour and still allow customization? Hence the preference auto-append comments was born. This emulates the old behaviour with the help of comments_display. This form contains <txp:comments /> which outputs the list of comments (it takes form as an argument; again analog to txp:article), then it shows the comments_form if comments are still allowed on the entry. What auto-append comments does is really lame in reality: When it sees that this is an individual article, then it takes the contents of comments_display and sticks it at the end of your existing article-form.

Offline

#3 2005-11-01 22:57:26

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: write "The basics of comments in TXP" and win... well... some respect!

I’ve done a tag example for the new “if_comments_preview” tag and there are a couple of others in there as well.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

Board footer

Powered by FluxBB