Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2005-12-29 22:17:27

dada78
Member
From: New York
Registered: 2005-10-27
Posts: 138
Website

Re: Extra Div Out Of Nowhere...

There is an easy way to do what you want:
Replace:
<txp:comments />
with
<txp:comments break="" wraptag="" />

<strong>Thanks Sencer, this got rid of the extra div tag in there. (Thank god!)
However, why on earth is the first comment (TXP default comment by Donald Swain) displayed correctly like this:</strong>
<code>
<p>I enjoy your site very much.<br />
<a href=“http://example.com” title=“example.com” rel=“nofollow”>Donald Swain</a>Jul 22, 02:11 PM</p>
</code>

<strong>and the new comment that I just added fromatted like this???:</strong>
<code>
<p><p>test</p><br />
<a href=“http://test” title=“test” rel=“nofollow”>carina</a>Dec 29, 05:01 PM</p>
</code>

In my “comments” form I have:

<code>
<p><txp:message /><br />
<txp:comment_name /><txp:comment_time /></p>
</code>

<strong> I tried removing the p tags but then the formatting was lost of course.</strong>

Uhh what a headache…

Last edited by dada78 (2005-12-29 22:19:24)

Offline

#14 2005-12-29 22:46:31

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

Re: Extra Div Out Of Nowhere...

dada78, do you know textile? do you how it works and what it does? I think it’s important to have that clear, before going on with this discussion.

Offline

#15 2005-12-29 23:15:12

dada78
Member
From: New York
Registered: 2005-10-27
Posts: 138
Website

Re: Extra Div Out Of Nowhere...

Yes, I believe I understand that textile formats plain text into markup and I know that textile wraps p tags around articles and inserts line breaks.

But what hasn’t become clear yet is how I can turn textile off for comments?

I know that I can turn it off under the admin tab and for specific articles, but what about comments?

Well, it seems I am the only one here who has a problem with this,
maybe I just have to play around with the styles a bit more to make it work for me…

Thank you

Offline

#16 2005-12-29 23:30:31

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

Re: Extra Div Out Of Nowhere...

Yes, I believe I understand that textile formats plain text into markup and I know that textile wraps p tags around articles and inserts line breaks.

Yes, almost. It doesn’t wrap p around articles, it wraps them around text which it recognizes to be a paragraph (According to a few simple rules, e.g. double-linebreaks etc.). Usually an article as well as a comment will consist of multiple paragraphs. Getting rid of paragraphs means having to use lots and lots of br-tags. In fact that is what earlier versions of textpattern were doing (which is why the default comment by Swain does not have any paragraphs), but due to popular requests comments now do recognize paragraphs as well. You cannot turn textile off for comments without changing the php-code. (Search for function markup_comment in txplib_misc.php).

If you want to remove the padding of paragraphs in comments you can use descendant selectors (or child-selectors though they are not that widely supported):

.comments p p {margin:0; padding 0}

will apply the rules to a p inside a p inside an element that has a class of “comments”.

Maybe you are better off asking precise questions in the layout/css forum. Provide a link to your html and css and describe which borders/paddings are bothering you. I am sure there is a solution without having to mess with the code.

Offline

#17 2005-12-29 23:40:05

dada78
Member
From: New York
Registered: 2005-10-27
Posts: 138
Website

Re: Extra Div Out Of Nowhere...

Thanks for all your support.

I have it working right now, now I just have to figure out how to circumvent the p style issue…
I will play around with it for a while and then consult the CSS forum.

Offline

Board footer

Powered by FluxBB