|
|||||||||
|
|||||||||
|
Customizing chat appletsThe Java chat applet has many customizable options -- you can change size, colors, fonts, and much more. This guide will help you create a unique chat applet for your site that matches your site's atmosphere.
Our code generator uses JavaScript to set various options for the
chat environment. By changing this script, you can easily set parameters on how the applet looks
and works. This is done by specifying the name of the parameter to customize, and a new value for
that parameter. For example, the parameter with name To set an option, edit the HTML source of your chat page. In the code, you will find a section marked "customizable" that looks like the following: (Please note that this code is abridged. To generate full code, please visit our code generator)
// *** begin customizable section *** // *** for more information, see www.liveharmony.org *** ['simple', 'false'], ['width', '500'], ['height', '350'], ['fg', '000000'], ['bg', 'FFFFFF'], // *** end customizable section *** ['__blank', 'blank']
The above code shows a few parameters already set with example values --
['name', 'value'],
Each parameter should be on its own line, somewhere between the "
['ticker1', 'Welcome to Fred\'s Chat Room!'],
Common parametersThese are some of the settings you can change for your applet:Changing fontsTo change the font that the applet uses, modify thefont and size parameters.
Java supports three basic fonts: serif, sans serif, and monospace. Serif fonts have extra strokes at
the ends of lines that make them easier to read; sans serif fonts do not have these and may look "cleaner"
but less readable. Monospace fonts will look like the output of a typewriter, where each letter takes
the same amount of space, regardless of its actual width. A font's size is specified in points (equal
to 1/72 in.); 12 to 14 points is generally an optimal size for most web users. Note that the parameter
value for a sans serif font is To set a serif font, use the following code: ['font', 'serif'],To set the font size to 11, use the following code: ['size', '11'], Changing colorsYou can set the foreground color of your applet with thefg parameter:
['fg', '000000'],Similarly, you can set the background color with the bg parameter:
['bg', 'FFFFFF'],These parameters use HTML-style color codes (without the leading #), which you can copy from your page's
HTML code to preserve a uniform color scheme. You can also generate HTML color codes with any HTML editor, or
reference a chart online. You can
fine-tune your applet's colors with other parameters not listed here (see "Changing other settings" below).
Disabling soundsBy default, users can select actions from a drop-down menu to send a line of text and play a sound. To disable this, change theplaysounds and sounds parameters:
['playsounds', 'false'], ['sounds', 'Not available;null'],
To reenable sounds, set ['playsounds', 'true'],
Enabling the button panelThe button panel is a set of buttons displayed above the interface that allows access to session options and a rooms list. To enable it, setshowbuttonpanel to true:
['showbuttonpanel', 'true'],
To disable it, set ['showbuttonpanel', 'false'],
Changing other settingsOur software provider, WebMaster, has compiled an extensive list of customizable parameters (opens in a new window). They also have an addendum with detailed guicolors options.
|
||||||||
| Contact us |
Learn about chat room safety © 2002-2008 liveHarmony. Portions of this work are licensed under a Creative Commons license |
||||||||