Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Moving Comments & Site Wide Enabled Comments
If I enable comments, they are displayed BELOW the Related Articles section, but I need them to sit above the related articles section or to be moved to perhaps a sidebar? So in this case, If I had a second column, could I move the comments to it, and move the entire thing into it?
Secondly I’m trying to enable site wide comments, and was told I need a mysql query to do this, can anyone explain what this query might be?
I don’t know how to do this, and it’s confusing the monkey out of me. I hope someone understands what I mean and can point me in the right direction.
Thanks in advance
Offline
#2 2006-07-19 14:14:56
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Moving Comments & Site Wide Enabled Comments
First question: yes :)
Offline
Re: Moving Comments & Site Wide Enabled Comments
I can’t understand that, I mean, it explains what x, y z is, but it doesn’t provide any workable examples of how to do it. When I first used textpattern there was a plugin that let you stick the comments to a column to the right or wherever. This doesn’t make sense to me, to be honest. So it’s possible, but there’s no example of how?
Thanks Els
Offline
Re: Moving Comments & Site Wide Enabled Comments
I think it was explained a few times in the forums, but nobody went ahead and expanded on that.
The main thing is to turn of “auto append comments” in the prefs. Then to go ahead and place the relevant comment tags manually where you want comments to appear.
Then you’ll also want to make sure you get the errors reported in the correct place:
http://textpattern.com/weblog/153/fine-tuning-the-next-release
And then you’ll also want to make sure you mnually place the previews, or else things could seem to “jump around”:
http://textpattern.com/weblog/127/customizing-previews-for-commenting-in-the-upcoming-402
I have said this several times before (everytime I mention those links), if somebody would write a more complete explanation with examples, that would be a great thing, that I am sure many people would appreciate.
Offline
Re: Moving Comments & Site Wide Enabled Comments
OK, here’s what I use with some HTML comments. Hopefully this explains it decently! As sencer said, turn off auto append comments (admin). You’ll need to insert txp:output_form form="comments_display" in your article form. EX:
form: article
Using an article form:
<pre>
<h2><txp:title /></h2>
<txp:body />
<txp:output_form form="comments_display" />
</pre>
form: comments_display
<pre>
<txp:if_comments>
<!—if comments are present—>
<h3>Comments</h3>
<dl id="comments">
<txp:comments break="" wraptag="" />
<!—this will output the comments, which use the [comments] form—>
</dl>
</txp:if_comments>
<txp:if_comments_allowed>
<!—if comments are allowed—>
<txp:if_comments_preview>
<!—if someone is previewing a comment, it’ll load in it’s own definition list—>
<dl id="cpreview">
<dt><strong>The following is a comment preview &#8595;</strong></dt>
<txp:comments_preview />
</dl>
<txp:comments_form preview="1" />
<txp:else />
<!—if they have not previewed their comment, than display the comment form (and anything else)—>
<txp:comments_form />
</txp:if_comments_preview>
<txp:else />
<!—"commenting closed message"—>
<p>Comments are closed</p>
</txp:if_comments_allowed>
</pre>
form: comments
This is the form the actual comment uses.
<pre>
<dt id="<txp:comment_id />"><txp:comment_name /> said the following <txp:comment_permlink><txp:comment_time /></txp:comment_permlink></a></dt>
<dd><txp:comment_message /></dd>
</pre>
form: comment_form
Just the comment form. Here’s an example:
<pre>
<fieldset>
<legend>Comment</legend>
<txp:comments_error break="li" wraptag="ul" class="warning" />
<label for="name">Name</label>
<txp:comment_name_input />
<label for="email">Valid Email (hidden)</label>
<txp:comment_email_input />
<label for="web">http://</label>
<txp:comment_web_input />
<label for="message">Message (<a href="http://www.textpattern.com/help/?item=textile_comments" title="Comment Formatting">Textile</a>)</label>
<txp:comment_message_input />
<p><txp:comment_remember /></p>
<p><txp:comment_preview /><txp:comment_submit /></p>
</fieldset>
</pre>
Hope that helps.
Last edited by deldindesign (2006-07-19 17:11:22)
Offline
Re: Moving Comments & Site Wide Enabled Comments
I set up an example for styling comments here too. It’s ugly, but the selectors are in place. I didn’t style a form, since that takes way too much time.
Offline
#7 2006-08-16 03:06:07
- deronsizemore
- Member

- From: Kentucky
- Registered: 2005-11-02
- Posts: 324
Re: Moving Comments & Site Wide Enabled Comments
deldindesign: GREAT, GREAT example. I’ve been wondering how to do this and beating my head against the wall trying to do it, with no luck.
One thing I’m confused on is, I go to Admin and down at the bottom where it says “Automatically append comments to articles?” if I have “YES” clicked, everything works perfectly. If I have “NO” bubble clicked, as you said I should in your post, none of the comments show. Is there something I’m leaving out there that you could think of?
EDIT: I seem to have it working now as you described in your post. Again thanks so much for posting this! This makes me want to use txp again, because I was having such a hard time with commets that I didn’t know what to do.
Last edited by deronsizemore (2006-08-16 03:36:17)
Offline