Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-10-08 16:44:56
- hamba
- Member
- Registered: 2006-08-04
- Posts: 22
conditions for comments
Hi
I have 3 conditions for the comments but I can’t figure out how to add the 3rd condition
This is what I’m after
<code><txp:if_section name=“article”>
show comments the normal way
<txp:else>
<txp:if_section name=“about”>
don’t show any comments, forms or comment invite for this section
<txp:else>
show only comment form for the use as an article contact form
</txp:if_section></code>
Does any body have an idea how I can do this?
Cheers
hamba
Last edited by hamba (2006-10-08 16:45:25)
Offline
Re: conditions for comments
Sure. Go to Admin>Preferences>Turn “Auto append comments” to off.
<pre>
<txp:if_section name=“article”>
<txp:if_article_list>
We are on an article list
<txp:article />
<txp:else />
We are on a single article
<txp:article />
<txp:output_form form=“comments_display” />
</txp:if_article_list>
</txp:if_section>
<txp:if_section name=“about”>
<txp:output_form form=“contact” />
</txp:if_section>
</pre>
Use a contact form plugin too. Place that in a form called “contact,” or place it in an article itself.
Last edited by jm (2006-10-08 17:17:23)
Offline
#3 2006-10-08 18:09:02
- hamba
- Member
- Registered: 2006-08-04
- Posts: 22
Re: conditions for comments
Thanks I created two forms for what I wanted
The reason I’m using comments for article emails is so that we can track where the enquiry is comming from. I’m not aware of any contact form plugins that supply this type of function.
I still have to figure out how I can get a comment to be emailed to one centrale email address.
Offline
#4 2006-10-09 03:02:37
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: conditions for comments
You’d probably be better off creating or modifying a plugin for this purpose, but I can tell you that if hacking is what you want to do (which is unsupported, obviously) comment emails are sent in textpattern/publish/comment.php, in the mail_comment() function, starting on line 481.
Offline
Pages: 1