
Folder Synch Plugin
By Jay Guerette <JayGuerette@pobox.com>
v0.5 (c) 2002 (GNU GPL - see ../../COPYING)

I personally could not live without this plugin.

This plugin uses javascript to synchronize the folder list and message display.
It should be compatible with all 1.x versions of SquirrelMail, and is known to
work with Opera 5.x, NS 4.x+, and IE 5.x+. Please let me know if it doesn't
work for you. Heck, let me know if it DOES work for you.

If you are using IE 5+, NS 6+, or some other Mozilla 4+ Gecko-based browser,
an enhanced new-mail detection routine will kick in, to almost eliminate 
unnecessary screen refreshes of the message list display. It will typically
only refresh the message list when the unread mail counts in the folder list
change.

Note: These extra screen refreshes will increase the traffic generated by each
session, and marginally increase the load on the server. It's a great feature on
a LAN, but may be annoying on a slow PC or connection.

Under 'Options - Display Preferences', there are three checkboxes to enable the
plugins behaviors:

Folder Synchronization: [ ] Folder list update forces message list update  
                        [ ] Message list update forces folder list update 
                        [ ] Message body read forces folder list update

The first option will cause the currently displayed message list to update
whenever the folder list is reloaded; i.e. when you click on 'refresh', or it
automatically refreshes after a timed interval. When the folder list updates,
and you see you have a new message in your INBOX, you don't have to click the
folder to update the display to see the new message; it does it automatically.

The second option will cause the folder list to update whenever the message list
is loaded; i.e. after you read/move/delete a message and return to the message
list. When you delete a new message in your INBOX, you will notice the unseen
message count will decrement, and the purge prompt will appear next to your
Trash folder. That's cool.

The third option will cause the folder list to update whenever a message is
read. When you read a message, and click on next/previous to move through new
messages in your INBOX, you will notice the unseen message count will decrement.

As an added bonus, whenever the 'Options' page is loaded, it will refresh the
folder list. This is handy to see an immediate update to your folder display
options. You will still have to click the 'Refresh Page' link when you change
the folder list width or location.

Please contact me with any questions or problems. There are occasional extra
refreshes caused by pure luck and timing coincidences; please try to filter
those out when reporting problems/annoyances to me.


History
----

v0.1
Initial public release.


v0.2
Barton Hodges experienced problems with the folder list refresh. He figured out
the use of an absolute instead of relative URL fixed it. We updated the routine
to use an absolute URL, and added some code to do sanity checking on the URL.
The double-refresh of the folder list on login annoyed me enough that I put in
code to check to see if it new login. No more double refresh.
Added the 'Message body read forces folder list update' feature for people that
tend to hit 'Next' instead of returning to the message list.


v0.3
All double refreshes have been removed, at login and forever after. Yay!
Added NULL checking in javascript to eliminate errors when a frame is opened by
itself in a new window.
Rewrote the configuration code to remove features from the hook chain when
disabled.

v0.4
Extensively tested by a small group of beta-testers, but never released.

v0.5
Much code tweaking and optimization from experiences with the 0.4 version.
Fixed duplicate no_synch_flag's in URLs, and made Daniel Drucker happy.
Has enhanced javascript routines to dramatically reduce refreshes in supported
browsers. Really cool.
