News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Modify reply/quick reply text box size?

Started by Gryzor, December 23, 2008, 11:24:08 AM

Previous topic - Next topic

Gryzor

Exactly as asked in subject: how do I make the text box bigger? I bet it's simple but I must be missing something...

Using 2.0b4. Thanks so much for the wonderful software - and merry Christmas!!!

Oldiesmann

For the main reply box:

Sources/Post.php

Find
Code (Lines 1039-1048) Select
// Now create the editor.
$editorOptions = array(
'id' => 'message',
'value' => $context['message'],
'labels' => array(
'post_button' => $context['submit_label'],
),
// We do XML preview here.
'preview_type' => 2,
);


Replace
// Now create the editor.
$editorOptions = array(
'id' => 'message',
'value' => $context['message'],
'labels' => array(
'post_button' => $context['submit_label'],
),
'columns' => 60,
'rows' => 12,
// We do XML preview here.
'preview_type' => 2,
);


Change the values for columns and rows to your liking.

For the quick reply, you'll need to edit Display.template.php:

Find
Code (Line 638) Select
<textarea cols="75" rows="7" style="width: 95%; height: 100px;" name="message" tabindex="1"></textarea><br />
Michael Eshom
Christian Metal Fans

Gryzor

#2
Ahhh it's a PHP thing. Darn, and I spent so much time looking around in options and stuff :D Thanks lots, appreciate the ultra-fast reply!

Hmmm, neither seems to work...? :(

Oldiesmann

Try clearing the file cache.

Admin -> Maintenance -> Forum Maintenance
Scroll down and click on "Empty the file cache".
Michael Eshom
Christian Metal Fans

Gryzor

Didn't work... How strange! Could it have something to do with Apache serving out old versions of the script? Nah, what am I talking about, Apache gets PHP's output anyway...

SlammedDime

settings rows and columns won't work, you have to set the 'width' and 'height' attributes. (just like rows and columns above, but use 'width' and 'height' instead.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Gryzor

Hmm... I'm trying:

// Now create the editor.
$editorOptions = array(
'id' => 'message',
'value' => $context['message'],
'labels' => array(
'post_button' => $context['submit_label'],
),
'width' => 120,
'height' => 80,
// We do XML preview here.
'preview_type' => 2,
);
create_control_richedit($editorOptions);


I take it 'width' defines columns, 'height' is rows. I've also tried other, less extreme figures, but it still doesn't work...

Oldiesmann

You need to specify the unit for the width and height.

The default width is 150px and the default height is 70%.

Doing this would make the box twice as wide and 25% higher:

   // Now create the editor.
   $editorOptions = array(
      'id' => 'message',
      'value' => $context['message'],
      'labels' => array(
         'post_button' => $context['submit_label'],
      ),
      'width' => '300px',
      'height' => '95%',
      // We do XML preview here.
      'preview_type' => 2,
   );
   create_control_richedit($editorOptions);


Just play with those values til you find something you like.
Michael Eshom
Christian Metal Fans

Gryzor

Ah, and I suspected it might be something like that (not the % thing though, but px is easy to guess). However, I seem to be hitting some kind of hard limit. Right now, for instance, I have set it up to 1000px, 1000%. And it still won't go over 12 lines deep (which is my main concern). If I lower the values it does become smaller, but not bigger.

Maybe look someplace else as well?

Oldiesmann

Once you hit 100% height, it's displaying all the rows, so you'll need to increase the number of rows at that point.
Michael Eshom
Christian Metal Fans

Gryzor

Wait - so I have to set the height to 100% and THEN the number of rows to whatever I need it to be?

SlammedDime

Set the width in percent, set the height in pixels.  Don't even worry about rows and columns.  When you set width and height with CSS, they become pointless.  Right now oldies is directing you backwards on it. :)
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Gryzor

#12
Width in %, height in px, not the opposite as described above in the quoted code. Ok, will try it and report...

[edit]Yup! That did it. Thanks guys :)

Advertisement: