Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-05-24 00:09:14

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Test cases: comments

The dev team could really use some templates and forms demonstrating specific tricky situations with comments. In particular, cases where two (or more?) separate <txp:article /> tags are used to place the article body and the comments and comment input stuff in separate columns or parts of the page. Also, anything else that’s fairly commonly requested but not simple, like moving the comments preview elsewhere on the page.

Anyone who’d like to help out, please post template code in this thread (use pastebin.com). We’ll use it for testing, and as example code in the FAQ and/or docs.

No need to worry about the layout; minimal HTML and no CSS is fine, we’re mainly concerned with the txp tags.

If you have something that doesn’t quite work, post it anyway – it might help us identify bugs or misfeatures.

(nb: similarly, we could use sample template code for other tricky situations like image galleries, photoblogs etc. Open a separate thread in the Testing forum if you’d like to contribute samples of these)


Alex

Offline

#2 2006-05-24 00:38:30

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

Re: Test cases: comments

This is a comments form:
comments form

This is a comments_display form:
comment_display form

This is a comments_form form:
comments_form form

This is the snippet I use to call a comments form from an article form:
snippet

zem wrote:

In particular, cases where two (or more?) separate <txp:article /> tags are used to place the article body and the comments and comment input stuff in separate columns or parts of the page. Also, anything else that’s fairly commonly requested but not simple, like moving the comments preview elsewhere on the page.

Sorry, placing comments in separate columns is not my case, but I hope the snippets help you because I think they are a bit “advanced” (not that much).

But I have played with some things in the comment preview, like this:

  • if there are errors (empty fields) in the comment, I keep the preview and submit buttons at the end of the comment form.
  • if there are no errors in the comment, the preview and submit buttons are showed first, and then (below) the comments fields.

That’s a my “method” to force visitors to see the form again if there are errors. If no errors, they just can simple push the submit button. The form fields are still there, but below the buttons.

Last edited by maniqui (2006-05-24 00:38:59)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB