Emoticons Plugin for ChatZilla
Developed for ChatZilla 0.964f with full expectation of compatibility with future versions.
Author: John J Foerch
License: General Public License (GPL).  Please read the LICENSE file that was included in the archive for information about the GPL.

This plugin gives ChatZilla the ability to use Gaim format emoticon themes.  You can download themes from gaim.sourceforge.net or you can write your own theme with a text editor.

A simple theme is included with this plugin to get you up and running.


INSTALLING:
Method 1:
Extract the archive somewhere. Windows users may find it easier if the plugin exists in a path without spaces.
In ChatZilla, bring up the preferences dialog (Edit->ChatZilla Preferences)
In Global->Startup, add the init.js from this plugin to your startup scripts.
Reload ChatZilla.
If all is well there will be a message about the emoticons plugin in your client tab (/client) and a basic theme will be loaded.



COMMANDS:
/emoticons
	Displays a chart of the current theme.

/emoticons /local_path_to_theme
	Looks in the given file path for a theme.  Provide only the name of the directory that contains the theme.  The plugin will look for the file 'theme' in that directory.

/emoticons http://www.any.url/path_to_theme
	You can provide an http, ftp, or file url.  In the case of http or ftp, the plugin will make a request for (for example) http://www.any.url/path_to_theme/theme

/pref emoticons.url -
	Reset the theme to default, which is the theme packaged with this plugin.

/list-plugins emoticons
	This command will provide you with some basic information about the plugin, as well as its index in client.plugins, should you need to do any troubleshooting.

/disable-plugin emoticons
	Disables the plugin from replacing emoticons with images.  This does not unload the plugin.
	
/enable-plugin emoticons
	Complement of /disable-plugin emoticons.

/help emoticons
	Basic information about the /emoticons command.


	
	
TROUBLESHOOTING

Paths under Windows
Some problems have been reported relating to local pathnames under Windows.  Those pesky forward slashes, spaces, and colons!  One beta tester reported that it was easiest for him to navigate to the directory he wanted in Mozilla, and then copy the file:/// url from the address bar.  Yet the syntax should be simple enough to remember.
1. Backslashes get changed to forward slashes.
2. Spaces get replaced with %20
3. The colon after the drive letter is changed to a pipe character. (|)


Theme Errors
If a theme file is not found in the location provided, a flag variable will be set, and the plugin will not work.  This error flag is State.error within the scope of the plugin.  So if the plugin is loaded to plugin index 0, you could find out the state of the error flag by entering the following line.

/eval client.plugins[0].scope.State.error

You can find out other information useful for troubleshooting by doing:

/eval dumpObject(client.plugins[0].scope.State)




BETA TESTERS
Thanks to Fur, KushiSambo, and toul in irc://moznet/#chatzilla for trying this plugin in its early manifestations.  And to toul for raising the idea of a ChatZilla plugin for Gaim emoticon themes.  Thanks to rginda, Silver, and others for fielding many questions.



REVISIONS
I have not been assiduous in tracking every bit of progress with this plugin, but I'll write a few historical notes here, because that's the sort of things programmers put in README files.
2004-08-18	version 0.1
	the plugin is named Smilies, the code is a mess,
	but it basically works if you happen to be the person who wrote it.
2004-08-20	version 0.3
	Significant rewrite.
	More compatible with Windows file paths.
	Remote request of themes.
	changed emoticon chart from a series of display() calls to a dom structure.
	added sample theme
2004-08-21	version 0.4
	override the builtin face munger, instead of adding a new entry.
	fixed a bug in emoticon chart display, related to message collapsing.
	removed unused function makeFilledTable
	added full text of GPL
	added attributes to the emoticon chart and description to facilitate styling.
2004-08-22	version 0.42
	bugfix: reset State.error when a new theme is loaded.
2004-08-22	version 0.45
	bugfix: created a pref observer to ensure that /pref emoticons.url -
	does indeed load the default theme.
	Basic support for precedence of Sections within themes.
	Added README file.
2004-08-23	version 0.46
	One onehundredth better.
	Rewrote emoticons.url Observer and urlSetter so that the setter validates and the observer loads the theme, instead of the setter doing everything.
	New exciting improved.. title attribute.

