Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-12-18 17:09:05

hongster
New Member
Registered: 2008-12-01
Posts: 7

How to customize comment preview?

In the Admin->Preferences tab, i have set “Automatically append comments to articles?” to “no”. I wanted customization.

This is my comment_form form:
<p> <label for=“name”>Name</label><br /> <txp:comment_name_input />
</p>
<p> <label for=“email”>Email</label><br /> <txp:comment_email_input />
</p>
<p> <label for=“web”>Website</label><br /> <txp:comment_web_input />
</p>
<p> <label for=“message”>Message</label><br /> <txp:comment_message_input /><br /> <txp:comments_help />
</p>
<p id=“publish”> <txp:comment_preview />&nbsp;<txp:comment_submit />
</p>

Although I did not use <txp:comments_preview /> tag, the comment preview will automatically appeared on top of the comment form. Is it normal? The comment preview uses comments form as its template. I want to change the way comment preview look, how do i do that? My intention is to make my comment preview looks different from the normal comment.

Offline

#2 2008-12-18 17:16:52

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: How to customize comment preview?


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#3 2008-12-18 17:45:52

hongster
New Member
Registered: 2008-12-01
Posts: 7

Re: How to customize comment preview?

I think i found the answer to my question. It seems like comment review will automatically be added in front of the comment form. By default, it will use comments form as template. To customize comment preview, you have to add <txp:comments_preview form=“you_own_form” /> to the page. Adding <txp:comments_preview form=“you_own_form” /> in form (e.g. comments_form) does not help.

Offline

#4 2008-12-18 21:48:59

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: How to customize comment preview?

FAQ :)

Offline

#5 2008-12-20 09:53:35

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

Re: How to customize comment preview?

And let us not forget the use of the “comments_display” form which can be added to the bottom of any article form with something similar to:-

<txp:if_individual_article>
<txp:output_form form="comments_display" />
</txp:if_individual_article>

You can also use ^if_section” tags so that it will only display for certain sections. This can add a lot more flexibility to the display of your comments and comments_preview than simply trying to modify your article forms directly.

Last edited by thebombsite (2008-12-20 09:54:20)


Stuart

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

Offline

Board footer

Powered by FluxBB