TinyPortal

General => Chit chat => Topic started by: iowamf on February 22, 2006, 07:55:27 AM

Title: increasing the size of the edit window for posting to the forum
Post by: iowamf on February 22, 2006, 07:55:27 AM
Yes - I know I should post this at SMF as it is not a TP specific question, but since this is the "chit-chat" forum perhaps you'll spare me.

I'd like to know how to increase the width/height of this window I'm typing in right now?

When a post is over about 12 lines - scroll bars start to show up.

As I write this - there is a bunch of wasted space below and to the left forcing me to type this post (on a giant monitor) into a window that isn't much bigger than a business card - arrghh.

Real Estate is too valuable to be wasted on scroll bars.
Title: Re: increasing the size of the edit window for posting to the forum
Post by: G6Cad on February 22, 2006, 08:43:13 AM
It must be something wrong with your files or something.
I dont have scrollbars show even if i open this forum or any other SMF forum on my laptop that have 15" and 800x600 resolution or my 19" on 1600x1200.

It stretch on auto and look the same in both, just that it looks a bit bigger in the laptop, but no scrollbars.

The only thing i can think of is if you have set your forum to a fixed widht and not to 100% but i think that setting came with TinyPortal and not with SMF ?  ???
Title: Re: increasing the size of the edit window for posting to the forum
Post by: iowamf on February 22, 2006, 10:22:48 AM
It cannot be "my" files - I am using tinyportal.co.uk resources to make this post - none of my files.

Example, there are presently no scroll bars to the right while I am typing this:

posters try doing this in your edit window to find out when the scrollbar shows up:


one (no scroll bar)
two
three
four
five
six
seven
eight (SCROLL BAR SHOWS UP!).

My question stands - how can I change the height and width of the window I am typing into right now to keep the scroll bar from showing up so fast?
Title: Re: increasing the size of the edit window for posting to the forum
Post by: feline on February 22, 2006, 11:23:43 AM
In Subs-Post.php yo can change the nbr of cols and rows ..


// Allow for things to be overridden.
if (!isset($context['post_box_columns']))
$context['post_box_columns'] = 60;
if (!isset($context['post_box_rows']))
$context['post_box_rows'] = 12;


Fel
Title: Re: increasing the size of the edit window for posting to the forum
Post by: iowamf on February 22, 2006, 05:01:07 PM
Thanks - that looks like the ticket!

I wonder what the logic is behind the 60chars x 12row defaults?

Quote from: feline on February 22, 2006, 11:23:43 AM
In Subs-Post.php yo can change the nbr of cols and rows ..


// Allow for things to be overridden.
if (!isset($context['post_box_columns']))
$context['post_box_columns'] = 60;
if (!isset($context['post_box_rows']))
$context['post_box_rows'] = 12;


Fel
Title: Re: increasing the size of the edit window for posting to the forum
Post by: iowamf on February 23, 2006, 02:34:19 AM
increasing the height (the rows) worked like a champ.

increasing the width (the columns) pushes things to the right (wish it would have been centered or left justified) so I don't recommend changing the default columns to anyone.

thanks again for the reference to the code.
Title: Re: increasing the size of the edit window for posting to the forum
Post by: feline on February 23, 2006, 09:07:56 AM
You can change that in Post.template.php


// Finally the most important bit - the actual text box to write in!
echo '
<tr>
<td valign="top" align="right"></td>
<td>
<textarea class="editor" name="', $context['post_box_name'], '" rows="', $context['post_box_rows'], '" cols="', $context['post_box_columns'], '" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="', $context['tabindex']++, '"', isset($context['post_error']['no_message']) || isset($context['post_error']['long_message']) ? ' style="border: 1px solid red;"' : '', '>', $message, '</textarea>
</td>
</tr>';


change "right" to "left" align.

Fel