Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-12-05 21:40:24

typeshige
Member
From: USA
Registered: 2005-08-11
Posts: 151
Website

Modifying rows and cols in comments textarea

I tried the search (and Google) but didn’t find the answer.

I have a comments section and I want to change the rows and cols settings for the text area.

I see that txp:comment_message doesn’t take any parameters. I want to change to 7 rows and 48 columns which shouldn’t be a big deal..

I normally wouldn’t mind changing the code, but I’m constantly downloading the latest development version, so if there’s a better way, I’m all ears.

Thanks,
Shige

Offline

#2 2007-12-05 22:01:40

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

Re: Modifying rows and cols in comments textarea

Just use CSS:

#txpCommentInputForm textarea {
    width: xpx;
    height: xpx;
}

Offline

#3 2007-12-05 22:21:00

pompilos
Member
From: Spain
Registered: 2005-06-07
Posts: 114
Website

Re: Modifying rows and cols in comments textarea

In my site (txp version 0.4.5) it works fine the “width” parameter, but not the “hight”. I have used “width:100%”.
Thanks.

Last edited by pompilos (2007-12-05 22:25:12)

Offline

#4 2007-12-05 22:29:05

typeshige
Member
From: USA
Registered: 2005-08-11
Posts: 151
Website

Re: Modifying rows and cols in comments textarea

Thanks. Does the fact that textpattern hard codes a value for rows and columns interfere with the pixels set for width and height in the CSS?

Offline

#5 2007-12-05 22:47:31

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

Re: Modifying rows and cols in comments textarea

No, it doesn’t affect it.

pompilos, the correct attribute is height, not hight. Was that just a typo here or in your CSS? Ensure you have a semicolon after width:100% too.

Last edited by jm (2007-12-05 22:48:43)

Offline

#6 2007-12-05 22:57:06

typeshige
Member
From: USA
Registered: 2005-08-11
Posts: 151
Website

Re: Modifying rows and cols in comments textarea

Oh wow.. thanks! This worked perfectly. I was worried that the rows/cols settings wouldn’t play nice with the height/width settings, but I guess CSS overrides it.

This would be nice for the docs or on TextBook.

Offline

#7 2007-12-06 01:42:27

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Modifying rows and cols in comments textarea

Also, you can use some attributes on txp:comments_form.

<txp:comments_form isize="30" msgrows="7" msgcols="55" />

That way, the textarea has some size not only when CSS is on, but also when CSS is disabled.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#8 2007-12-06 15:32:26

typeshige
Member
From: USA
Registered: 2005-08-11
Posts: 151
Website

Re: Modifying rows and cols in comments textarea

Thanks. I didn’t see that there. Somehow it doesn’t make as much sense to have those parameters in the txp:comments_form, but I’m glad its possible to chage the size of the textarea somehow.

Offline

Board footer

Powered by FluxBB