File: /home/asjudine/public_html/chat/doc/config-applet.html
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<TITLE>Morevil Web Chat 4.23 : <Applet> tag</TITLE>
<LINK rel="stylesheet" href="styles.css" type="text/css">
</HEAD>
<BODY>
<A HREF="http://www.morevil.com"><IMG SRC="images/logo.gif" width="117" height="39" ALT="Morevil" border=0></A>
<TABLE><TR>
<TD class=c1>
<A HREF="config.html"><IMG src="images/left.gif" width="25" height="25" border="0" alt="Previous"></A>
<A HREF="config.html"><IMG src="images/up.gif" width="25" height="25" border="0" alt="Parent"></A>
<A HREF="config-client.html"><IMG src="images/right.gif" width="25" height="25" border="0" alt="Next"></A>
</TD>
<TD valign=middle> <A HREF="index.html">Contents</A></TD>
</TR></TABLE>
<SPAN class=c1>3.1. <Applet> tag</SPAN>
<HR SIZE=3>
<BLOCKQUOTE>
To add the chat applet in your web page,
you have to insert the following code in the HTML page:
<BR><BR>
<TABLE cellpadding=20 bgcolor=#DDDDDD><TR><TD>
<APPLET <B>codebase</B>="." <B>archive</B>="chat.jar" <B>code</B>="Chat" <B>width</B>=85% <B>height</B>=80%>
<BR>
<BR><<B>param</B> name="<B>config</B>" value="config.txt">
<BR><<B>param</B> name="<B>smiles</B>" value="on">
<BR><<B>param</B> name="<B>multi-rooms</B>" value="on">
<BR>
<BR><<B>param</B> name="<B>auto-login</B>" value=" ">
<BR><<B>param</B> name="<B>profile</B>" value="http://www.your_site.com/profile.php?user=">
<BR>
<BR><<B>param</B> name="<B>fgColor</B>" value="#000000">
<BR><<B>param</B> name="<B>bgColor</B>" value="#DDDDDD">
<BR><BR>
Your browser is NOT Java enabled
<BR><BR></APPLET>
</TD></TR></TABLE>
<BR><BR>The required attributes are code, archive, width, and height.
<BR><BR>
The <B>code</B> attribute specifies the main CLASS of the chat applet.
<BR><BR>
The <B>archive</B> attribute specifies the archive containing classes of the chat applet
<BR><BR>
The value <B>width</B> and <B>height</B> may be either a pixel;
or a percentage of the available horizontal or vertical space.
Thus, the value "50%" means half of the available space.
<BR><BR>
The <B>codebase</B> optional attribute specifies the location of the chat applet archive (the .jar file).
The given directory is relative to the directory of the HTML document that
contains the reference to the applet.
If this attribute is missing, the Web browser will look for the applet's
file in the same directory as the HTML document.
<BR><BR>
You can provide alternate content for non-Java browsers.
You do this by placing standard HTML script commands for
the alternate content right before the ending </applet> tag.
<BR><BR>
The <B><param></B> tag's two parts are NAME, which specifies the parameter's name,
and VALUE, which associates a value with the parameter.
The parameters let you customize the chat applet.
<BR><BR>
<TABLE border=0 cellpadding=5 cellspacing=0>
<TR><TD valign=top nowrap><B> </B></TD><TD> <B>Description of the parameters.</B><BR><BR></TD></TR>
<TR><TD valign=top nowrap><B>config</B></TD><TD> The name of the text file that contains the configuration directives. The file must reside in the same directory as the chat applet archive <CODE>chat.jar</CODE>.<BR><BR></TD></TR>
<TR><TD valign=top nowrap><B>smiles</B></TD><TD> Whether or not to display smiles. Values - "On" | "Off". Default - "On". <BR>The file <CODE>smiles.gif</CODE> with smiles must be placed in the same directory as the chat applet archive <CODE>chat.jar</CODE>.<BR><BR></TD></TR>
<TR><TD valign=top nowrap><B>multi-rooms</B></TD><TD> If "On" the chat run in multi-rooms mode. Values - "On" | "Off". Default - "On". The file <CODE>rooms.txt</CODE> with names of the rooms must be placed in the same directory as the chat applet archive <CODE>chat.jar</CODE>.<BR><BR></TD></TR>
<TR><TD valign=top nowrap><B>auto-login</B></TD><TD> If you use DB authentication on your site you can pass user name to the chat applet. This parameter can be generated dynamically on the server-side (Perl, PHP, ASP, JSP...) or printed inside HTML page by javascript.<BR><BR></TD></TR>
<TR><TD valign=top nowrap><B>profile</B></TD><TD> If this parameter is present button "profile" appears at top of the userlist. <BR>e.g. if value of this parameter set as <B>http://www.your_site.com/profile.php?user=</B> <BR>at press the button "profile" in a new browser window the page <B>http://www.your_site.com/profile.php?user=some_user</B> will be opened. <BR> You can develop the script <B>profile.php</B> to extract users profile from your database.<BR><BR></TD></TR>
<TR><TD valign=top nowrap><B>fgColor</B></TD><TD> Foreground color of the applet(text labels and buttons labels). Must be specified as #RRGGBB. Default #000000.<BR><BR></TD></TR>
<TR><TD valign=top nowrap><B>bgColor</B></TD><TD> Background color of the applet. Must be specified as #RRGGBB. Default #DDDDDD.<BR><BR></TD></TR>
</TABLE></BLOCKQUOTE>
<HR SIZE=3>
<TABLE><TR>
<TD class=c1>
<A HREF="config.html"><IMG src="images/left.gif" width="25" height="25" border="0" alt="Previous"></A>
<A HREF="config.html"><IMG src="images/up.gif" width="25" height="25" border="0" alt="Parent"></A>
<A HREF="config-client.html"><IMG src="images/right.gif" width="25" height="25" border="0" alt="Next"></A>
</TD>
<TD valign=middle> <A HREF="index.html">Contents</A></TD>
</TR></TABLE>
</BODY>
</HTML>