Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-07-19 10:58:45

sekhu
Member
Registered: 2005-05-12
Posts: 428
Website

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

#3 2006-07-19 14:21:20

sekhu
Member
Registered: 2005-05-12
Posts: 428
Website

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

#4 2006-07-19 15:28:33

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

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

#5 2006-07-19 17:08:39

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

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>
&lt;h2&gt;&lt;txp:title /&gt;&lt;/h2&gt; &lt;txp:body /&gt; &lt;txp:output_form form=&quot;comments_display&quot; /&gt;
</pre>

form: comments_display

<pre>
&lt;txp:if_comments&gt;
&lt;!—if comments are present—&gt; &lt;h3&gt;Comments&lt;/h3&gt; &lt;dl id=&quot;comments&quot;&gt; &lt;txp:comments break=&quot;&quot; wraptag=&quot;&quot; /&gt; &lt;!—this will output the comments, which use the [comments] form—&gt; &lt;/dl&gt;
&lt;/txp:if_comments&gt;
&lt;txp:if_comments_allowed&gt;
&lt;!—if comments are allowed—&gt; &lt;txp:if_comments_preview&gt; &lt;!—if someone is previewing a comment, it’ll load in it’s own definition list—&gt; &lt;dl id=&quot;cpreview&quot;&gt; &lt;dt&gt;&lt;strong&gt;The following is a comment preview &amp;#8595;&lt;/strong&gt;&lt;/dt&gt; &lt;txp:comments_preview /&gt; &lt;/dl&gt; &lt;txp:comments_form preview=&quot;1&quot; /&gt; &lt;txp:else /&gt; &lt;!—if they have not previewed their comment, than display the comment form (and anything else)—&gt; &lt;txp:comments_form /&gt; &lt;/txp:if_comments_preview&gt;
&lt;txp:else /&gt;
&lt;!—&quot;commenting closed message&quot;—&gt; &lt;p&gt;Comments are closed&lt;/p&gt;
&lt;/txp:if_comments_allowed&gt;
</pre>

form: comments

This is the form the actual comment uses.

<pre> &lt;dt id=&quot;&lt;txp:comment_id /&gt;&quot;&gt;&lt;txp:comment_name /&gt; said the following &lt;txp:comment_permlink&gt;&lt;txp:comment_time /&gt;&lt;/txp:comment_permlink&gt;&lt;/a&gt;&lt;/dt&gt; &lt;dd&gt;&lt;txp:comment_message /&gt;&lt;/dd&gt;
</pre>

form: comment_form

Just the comment form. Here’s an example:

<pre>
&lt;fieldset&gt; &lt;legend&gt;Comment&lt;/legend&gt; &lt;txp:comments_error break=&quot;li&quot; wraptag=&quot;ul&quot; class=&quot;warning&quot; /&gt; &lt;label for=&quot;name&quot;&gt;Name&lt;/label&gt; &lt;txp:comment_name_input /&gt; &lt;label for=&quot;email&quot;&gt;Valid Email (hidden)&lt;/label&gt; &lt;txp:comment_email_input /&gt; &lt;label for=&quot;web&quot;&gt;http://&lt;/label&gt; &lt;txp:comment_web_input /&gt; &lt;label for=&quot;message&quot;&gt;Message (&lt;a href=&quot;http://www.textpattern.com/help/?item=textile_comments&quot; title=&quot;Comment Formatting&quot;&gt;Textile&lt;/a&gt;)&lt;/label&gt; &lt;txp:comment_message_input /&gt; &lt;p&gt;&lt;txp:comment_remember /&gt;&lt;/p&gt; &lt;p&gt;&lt;txp:comment_preview /&gt;&lt;txp:comment_submit /&gt;&lt;/p&gt;
&lt;/fieldset&gt;
</pre>

Hope that helps.

Last edited by deldindesign (2006-07-19 17:11:22)

Offline

#6 2006-07-19 17:48:04

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

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

Board footer

Powered by FluxBB