Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-04-24 15:08:29

kitto
Member
From: Leicester, England
Registered: 2006-02-22
Posts: 10
Website

Use paragraphs within comments instead of line breaks?

Comments are now wrapped in <code><p></p></code> tags, which is great, but I’m wondering if there’s a way to use <code><p></code> tags within comments rather than the <code><br /></code> tag?

Basically, I need a way to have Textpattern insert <code></p><p></code> instead of <code><br /></code> each time someone hits enter in a comment, like so;

<code>
<p>
First line of comment
</p>
<p>
Second line of comment
</p>
</code>

Rather than;

<code>
<p>
First line of comment
<br />
Second line of comment
</p>
</code>

Any way to do that, hack or otherwise?

Offline

#2 2006-05-18 19:58:10

mercury
Member
Registered: 2006-05-12
Posts: 26

Re: Use paragraphs within comments instead of line breaks?

kitto wrote:

Comments are now wrapped in <code><p></p></code> tags, which is great

why it’s great?
why don’t just leave in template <code><p><txp:message /></p></code> and not in each comment (in db)

Last edited by mercury (2006-05-19 01:02:52)

Offline

#3 2006-05-18 22:25:46

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

Re: Use paragraphs within comments instead of line breaks?

If you hit enter twice, as you have to do in Textile for writing articles, then you’ll end up with

<code>
<p>
First line of comment
</p>
<p>
Second line of comment
</p>
</code>

Offline

#4 2006-05-19 07:48:55

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

Re: Use paragraphs within comments instead of line breaks?

I just left a “test” comment and the two lines were properly wrapped in p-tags.

btw: You should place the tag for error-messages in your comment-form, otherwise the page just reloads, without any hint that a name/email is missing. (Also see this article and the 4.0.3 release notes )

Offline

Board footer

Powered by FluxBB