Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides
https://forum.ivorde.com/

Squirrelmail: increase the size of compose textarea - How to
https://forum.ivorde.com/squirrelmail-increase-the-size-of-compose-textarea-how-to-t35.html
Page 1 of 1

Author:  LaR3 [ Fri Sep 04, 2009 4:53 am ]
Post subject:  Squirrelmail: increase the size of compose textarea - How to

By default, squirrelmail's compose page contains a small textarea to write the body of your email. Here is how to increase it's height or size (number of columns):

First, open the src/compose.php file with your favourite editor and search for textarea:

Code:
    if ($compose_new_win == '1') {
        echo '   <tr >' . "\n" .
            '      <td bgcolor="' . $color[0] . '" colspan="2" align="center">' . "\n" .
            '         <textarea name="body" id="body" rows="' . (int)$editor_height .
            '" cols="' . (int)$editor_size . '" wrap="virtual"' . $onfocus . '>';
    }
    else {
        echo '   <tr >' . "\n" .
            '      <td bgcolor="' . $color[4] . '" colspan="2">' . "\n" .
            '         &nbsp;&nbsp;<textarea name="body" id="body" rows="' . (int)$editor_height .
            '" cols="' . (int)$editor_size . '" wrap="virtual"' . $onfocus . '>';
    }


The height (rows attribute of textarea html tag) and size (cols attribute of the textarea html tag) are given by two parameters: $editor_height and $editor_size.

Now, we open thee include/load_prefs.php file and search for these two lines (usually row 144 and 145 inside the file):
Code:
$editor_size = getPref($data_dir, $username, 'editor_size', 150 );
$editor_height = getPref($data_dir, $username, 'editor_height', 20 );

You can now edit the last fields inside the getPref function and change (in my case) 150 and 20 with your preference. Then save and re-open the compose page in Squirrelmail.

Make sure not to set them too high.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/