Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-06-14 09:46:14
- teuteuguy
- New Member
- Registered: 2006-06-07
- Posts: 3
Help with comments showing when not wanting them
Hi all,
i’m in the learning curve of textpattern. Like it a lot.
I’m trying to set up a gallery system, DO IT MYSELF kind of gallery hihi.
My initial problem, is maybe from misunderstanding the “structure” behind textpattern.
What I have done:
- created a section “gallery” and use page “gallery”
- created an article “test” bound to section “gallery”
- created a copy of “default” page and named it “gallery”
- created a copy of the “default” form
My “gallery” page has this in the “content” part of it: (copy from default except for the form bit, because I dont know exactly what all this does yet) (excuse the missing < for pasting purposes)
div id=“content”>
txp:article form=“gallery” />
txp:if_individual_article>
p>
txp:link_to_prev><txp:prev_title /></txp:link_to_prev>
txp:link_to_next><txp:next_title /></txp:link_to_next>
/p>
/txp:if_individual_article>
txp:if_article_list>
p>
txp:older>Previous</txp:older>
txp:newer>Next</txp:newer>
/p>
/txp:if_article_list>
Now my form, “gallery” is a copy from the default form. Without the end part of it.
h3>
txp:permlink> <txp:title /> </txp:permlink> ·
txp:posted /> by <txp:author />
/h3>
txp:body />
when typing url: website/gallery
- it takes me to the gallery section, GREAT
- displays gallery page, GREAT
- displays my test article (that was bound to the gallery section) GREAT
When I click on the “test” link for that gallery article, I get a “single” view for that article.
My problem, is that I cant seem to understand where in my “gallery” form it is specified to show the comments for that article ???
A comments form shows up under my aricle, and I cant get rid of it.
I must not be understanding something.
Help please ?
Thanks
Tim
Last edited by teuteuguy (2006-06-14 10:08:34)
Offline
#2 2006-06-14 10:38:38
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Help with comments showing when not wanting them
If you don’t want comments for this article, set ‘Comments’ to ‘off’ (in the write screen). If you don’t want comments at all, set ‘Accept comments’ to ‘no’ (admin > preferences). If you want comments for some articles only, you can set ‘Accept comments’ to ‘yes’ and ‘On by default’ to ‘no’, and for the individual articles you want comments for, set ‘Comments’ to ‘yes’.
Also if you intend to use comments, read this FAQ.
Offline
#3 2006-06-30 12:39:26
- tameboy
- Plugin Author

- Registered: 2006-06-29
- Posts: 48
Re: Help with comments showing when not wanting them
Is there any way to get rid of the text “commenting closed for this article” when you don’t need it. I have some gallery sections too, I don’t want comments there and I would rather not have this text added in at the bottom of each article. Is there a way to affect this default behaviour?
Help gratefully received!
Offline
#4 2006-06-30 12:59:19
- tameboy
- Plugin Author

- Registered: 2006-06-29
- Posts: 48
Re: Help with comments showing when not wanting them
Just worked one way of doing this for myself. You need to edit the default comments form (comments_display) and remove any text between the last part of the form:
<code>
…
<txp:else /> REMOVE TEXT FROM HERE
</txp:if_comments_allowed>
…
</code>
The only problem with this solution is that it then removes these comments from the whole of the site. It would be nice to be able to just remove them from one particular section (in my case, my gallery section).
(edited to show the code. -Els)
Last edited by els (2006-06-30 19:03:31)
Offline
Re: Help with comments showing when not wanting them
<blockquote>It would be nice to be able to just remove them from one particular section (in my case, my gallery section).</blockquote>
Couldn’t you make a copy of the comments_display form and alter it so that it has the code you want, and then call it using the <code>form</code> attribute and some conditionals? For example:
<code><txp:if_section name=“gallery”>
<txp:comments form=“comments_display_gallery” />
<txp:else />
<txp:comments form=“comments_display” />
</txp:if_section></code>
or whatever?
Last edited by Elenita (2006-06-30 14:27:30)
Offline