Advertisement:

Author Topic: Modify reply/quick reply text box size?  (Read 4716 times)

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 788
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Modify reply/quick reply text box size?
« on: December 23, 2008, 11:24:08 AM »
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!!!

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,892
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • https://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Modify reply/quick reply text box size?
« Reply #1 on: December 23, 2008, 11:37:36 AM »
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
Code: [Select]
// 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
Cincy Space - now open!

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 788
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Modify reply/quick reply text box size?
« Reply #2 on: December 23, 2008, 12:04:20 PM »
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...? :(
« Last Edit: December 23, 2008, 12:25:05 PM by Gryzor »

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,892
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • https://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Modify reply/quick reply text box size?
« Reply #3 on: December 23, 2008, 12:33:15 PM »
Try clearing the file cache.

Admin -> Maintenance -> Forum Maintenance
Scroll down and click on "Empty the file cache".
Michael Eshom
Cincy Space - now open!

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 788
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Modify reply/quick reply text box size?
« Reply #4 on: December 23, 2008, 12:38:54 PM »
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...

Offline SlammedDime

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,280
  • School of Air Ride
    • matt.zuba on Facebook
    • @mattzuba on Twitter
Re: Modify reply/quick reply text box size?
« Reply #5 on: December 23, 2008, 12:39:33 PM »
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...
                     

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 788
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Modify reply/quick reply text box size?
« Reply #6 on: December 23, 2008, 12:51:00 PM »
Hmm... I'm trying:

Code: [Select]
// 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...

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,892
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • https://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Modify reply/quick reply text box size?
« Reply #7 on: December 23, 2008, 01:01:57 PM »
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:

Code: [Select]
   // 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
Cincy Space - now open!

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 788
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Modify reply/quick reply text box size?
« Reply #8 on: December 23, 2008, 01:15:23 PM »
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?

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,892
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • https://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Modify reply/quick reply text box size?
« Reply #9 on: December 23, 2008, 01:40:29 PM »
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
Cincy Space - now open!

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 788
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Modify reply/quick reply text box size?
« Reply #10 on: December 23, 2008, 02:22:30 PM »
Wait - so I have to set the height to 100% and THEN the number of rows to whatever I need it to be?

Offline SlammedDime

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,280
  • School of Air Ride
    • matt.zuba on Facebook
    • @mattzuba on Twitter
Re: Modify reply/quick reply text box size?
« Reply #11 on: December 23, 2008, 02:30:54 PM »
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...
                     

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 788
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Modify reply/quick reply text box size?
« Reply #12 on: December 23, 2008, 02:37:35 PM »
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 :)
« Last Edit: December 23, 2008, 02:44:12 PM by Gryzor »