Compose Extras plugin for SquirrelMail
======================================
Ver 0.6, 2008/06/12


Copyright (c) 2003 Bruce Richardson <itsbruce@uklinux.net>
Copyright (c) 2003-2004 Justus Pendleton <justus@ryoohki.net>
Copyright (c) 2005-2008 Paul Lesniewski <paul@squirrelmail.org>



Description
===========

This plugin addresses some usability issues with the SquirrelMail
compose screen: the tab order can be changed so that the user
does not have to tab through all the buttons between the subject
line and the message body, the user can choose to have a few blank
lines inserted at the top of the message body for replies and
forwards, the user can be prevented from clicking the "Send"
button more than once, and the user can choose to have buttons on
the compose screen that remove reply citations and rewrap the
message body text.



License
=======

This plugin is released under the GNU General Public
License (see COPYING for details).



Donations
=========

If you or your company make regular use of this software, please
consider supporting Open Source development by donating to the authors
or inquire about hiring them to consult on other projects.  Donation/
wish list links for the author(s) are as follows:

Paul Lesniewski: https://sourceforge.net/donate/index.php?user_id=508228



Requirements
============

  * SquirrelMail version 1.4.0

  * Compatibility plugin version 2.0.7 or above



Troubleshooting
===============

  * If none of the enhancements seem to be working on the
    compose screen, make sure JavaScript is enabled in the
    browser and verify that the user has not disabled
    the "Use Javascript" setting under Options->Display
    Preferences.

  * If changes to the configuration file don't seem to be showing
    in the user interface, ensure that you are editing the correct
    configuration file.  If one is located in the main SquirrelMail
    config directory (named "config_compose_extras.php"), it will
    always be used.  Otherwise, "config.php" in the compose_extras
    plugin directory will be used.



Help Requests
=============

Before looking for help elsewhere, please try to help yourself:

  * Read the Troubleshooting section herein.

  * Look to see if others have already asked about the same issue.
    There are tips and links for the best places to do this in
    the SquirrelMail mailing list posting guidelines:
    http://squirrelmail.org/wiki/MailingListPostingGuidelines
    You should also try Google or some other search engine.

  * If you cannot find any information about your issue, please
    first mail your help request to the squirrelmail-plugins
    mailing list.  Information about it can be found here:
    http://lists.sourceforge.net/mailman/listinfo/squirrelmail-plugins
    You MUST read the mailing list posting guidelines (see above)
    and include as much information about your issue (and your
    system) as possible.  Including configtest output, any debug
    output, the plugin configuration settings you've made and
    anything else you can think of to make it easier to diagnose
    your problem will get you the most useful responses.  Inquiries
    that do not comply with the posting guidelines are liable to
    be ignored.

  * If you don't get any replies on the mailing list, you are
    welcome to send a help request to the authors' personal
    address(es), but please be patient with the mailing list.



TODO
====

  * Rewrap only text that has been selected by the user.

  * Make rewrap work with HTML Mail? (Or at least disable when
    composing in HTML?)

  * Verify that the add lines to message body for replies 
    functionality works with HTML Mail - it very well might
    work as is... if not, consider making it work (or at
    least disable when composing in HTML)

  * Right now the rewrap column is determined by the width
    of the compose text area.  Maybe make this a separate
    configuration variable?

  * Had the neat idea of when the user clicks on any button 
    that submits the compose form (Send, Add Attachment, 
    Signature, etc.), all such buttons are disabled, preventing 
    further clicks.  This code is in the plugin and works great,
    but is commented out because any button that is disabled is
    also excluded from the form's POST variables.  SM checks for
    which button was clicked by name, so this code is not usable
    without serious restructuring of the compose page to use
    more JavaScript-enabled buttons (which ain't gonna happen
    at least until templated SM comes of age), or without being
    able to add a clever onclick handler to each of those buttons
    or some other JavaScript solution that I am not thinking of.
    Contributions welcome.
    UPDATE for v0.4: Decided to use a new approach of counting
    submit clicks, but only in the <form>'s onsubmit handler, 
    so this may or may not work depending on what browser is 
    being used and how the other submit buttons submit their 
    data.  Also, the hook used to implement this will conflict
    with any other plugins that define an onsubmit handler for
    the compose form (the GPG plugin, for example), and in such
    cases, behavior may become unreliable.  This might be fixed
    in SquirrelMail 1.5.x, depending on a lot of other factors.
    This functionality can be turned off in the plugin 
    configuration file.
    UPDATE for v0.5: The conflicting onsubmit handler issue
    has been resolved, but it relies upon having SquirrelMail
    1.5.1 (as of 2005-11-15 or later) and other plugins must
    also be fixed to work with the changes made in the 
    SquirrelMail core.



Change Log
==========

  v0.6  2008/06/12  Paul Lesniewski <paul@squirrelmail.org>
    * Integrated "Rewrap" plugin functionality
    * Updated for compatibility with SquirrelMail 1.5.2
    * Changed directory name where this plugin gets installed from
      "compose_fix" to "compose_extras".  If upgrading, please
      deactivate "compose_fix" and delete its directory.

  v0.5  2005/11/15  Paul Lesniewski <paul@squirrelmail.org>
    * New way to build onsubmit handler code that plays nice with
      other plugins (only works with 1.5.1 (it will auto-detect this))

  v0.4  2005/08/11  Paul Lesniewski <paul@squirrelmail.org>
    * Added ability to stop user from clicking "Send" more than once.
      (not compatible with plugins such as GPG that also define
      an onsubmit handler for the compose screen)

  v0.3  2005/04/14  Paul Lesniewski <paul@squirrelmail.org>
    * Removed focus "fixes"; they are part of SquirrelMail core now
    * Brought plugin up to spec
    * Miscellaneous cleanup, i18n fixes, better wording in interface
    * Renamed plugin to "Compose Extras"
    * Added blank line insertion at top of message body for replies/forwards

  v0.2  2003/05/28   Bruce Richardson <itsbruce@uklinux.net>
    * Reply focus fix

  v0.1  2003/05/27  Bruce Richardson <itsbruce@uklinux.net>
    * Initial release  
    * Tabindex fix

