|
Overview What is GTChat? GTChat is a fast and comfortable webchat application. Due to use of server push technology and working without a database like mySQL it uses only little server resources, which of course won't affect the performance. Some users have problems with server push because of their proxy servers. For those users there is also a client pull mode. What does GTChat cost? GTChat is freeware, it may be used for free on non-commercial websites. However changing the program code (besides JavaScript) is not permitted. For more read license.txt. How can I install GTChat? If you can read this file you've probably already decompressed the program files. Next steps you have to do:
|
System requirements Requirements on the server's side:
|
First installation Create a subdirectory gtchat in you HTML directory. Copy the contents of the directory www into that directory with you FTP client. Also create a subdirectory gtchat in your CGI directory and copy the contents of the directory cgi-bin there. Set the execution permissions of install.pl with your FTP client and start it with your browser. The program will adjust directory settings and file permisions. With some server configurations it is not possible to adjust permissions automatically, follow the instructions of the program then. |
Updating older version You should save your chat directory before doing an update. Following files have to been updated:
|
Changing forwarding address First of all, why forwarding? I recommend to make the chat link show to index.html in your GTChat HTML directory. This file forwards the user to the chat script using JavaScript then. This is a check if the user has his JavaScripts activated. If he doesn't he stays on index.html and gets the error message on the screen. The user should be forwarded to chat.pl in the CGI directory. You should ajust this link in the JavaScript part and in the message. |
Changing colors and fonts GTChat allows to do all the modifications in colors and fonts in the file style.css. Here is the list of the CSS-classes and their functions: |
A A:active A:hover |
Definitions for the links inside the tables (active - active link, hover - Link underneath the mouse pointer). Non defined attributes will be taken from the context of the link. A:visited could be defined as well, but in a chat this is is of no use, right? | |
#stdlink A#stdlink:active A#stdlink:hover |
These definitions are for the links outside the
tables (active - active link, hover - Link
underneath the mouse pointer). When changing a
template, you should add the tag id=stdlink to
all links outside the tables like this: <a href="file.html" id=stdlink> If you don't need to distinct these links from the normal ones, then you can erase these classes. Non defined attributes will be taken from context of the link. |
|
TD #normaltext |
Standard settings for text inside of tables. #normaltext should be the same as TD, it will be used to force formatting of the text in the same way if it doesn't happen automatically. | |
#smalltext | Smaller version of TD, for example used to display the dates in the list of IP-bans. Not defined attributes are taken from TD. | |
TH | Defines text and background color of table headers. | |
#table1 | Defines the background color of table cells which have to be accentuated like for example the room names at the login-page of the chat. | |
#table2 | Default background color for the table cells. | |
#lines | Border color for the tables. Pay attention, the attribute that has to be set is not color but background-color! | |
#body | Here the standard settings for fonts and colors are stored. For example all the chat messages are displayed in this color. The background color is used for the complete chat. It works only if you have id=body in all BODY tags. | |
#headertext | Default style for the text outside the tables. If you change the templates and add text outside the tables, enclose it with <div id=headertext> </div>. | |
#bigheadertext | Bigger version of #headertext used for example in the chat-help file. |
Modifying templates The chat templates are plain HTML files, but they contain certain tags which are replaced by the chat. Four tags are universal and can be used in every template: |
{CHATNAME} | Will be replaced by the name of the chat defined by $chatname in Settings.dat (or General Setting in the Administrator funktions), usually used as a title of the HTML-file. | |
{CGI} |
Will be replaced by the URL of chat.pl, where the
parameter id is allready included. If other parameters
should added, you have to write it like this: {CGI}&action=allusers | |
{HTMLURL} |
Will be replaced by $htmlurl from Directories.dat. This
tag is used in almost all templates to define the base
address like this: <base href="{HTMLURL}"> Therefore you don't need to give the complete path to an HTML file when using it in a template. | |
{PULLMODE} | Will be replaced by 1 if the user is using client pull mode or by 0 if the user has chosen server push mode. |
All other tags will only be used in certain templates. Warning: Every but the universal tags must be written in their own line, without a space in front or behind the tag. If you install the chat, you should modify the templates login.html and register.html (logo, welcome message and so on). If you adjust the frames in chat.html, you should keep the names of the frames. A detailed description of all templates and tags used there should be avalable soon, for up to date information please visit http://www.gtchat.de. |
JavaScript options At the start of chat.js there are following variables defined: |
roomlistdelay Default: 10000 |
Delay (in milliseconds) for the room list to appear. The default templates of GTChat show the chat logo in the meantime. If you don't have any logo or want to use an extra frame for it, set this one to 0. | |
scrolldelay Default: 150 |
Interval (in milliseconds) for the text frame to scroll down (if not disabled by the user). | |
aliveinterval Default: 50000 |
Only relevant for the server push mode. Interval (in milliseconds) for sending the /alive command to show that the user is still in the chat. If the server doesn't receive anything from the user for $alive_test_rate seconds, a broken connection is supposed and the user is removed from the chat. | |
refreshdelay Default: 6000 |
Only relevant for the client pull mode. Sets
interval (also in milliseconds) to check for new
messages. If the server doesn't receive anything
from the user for $alive_test_rate_push seconds,
a broken connection is supposed and the user is
removed from the chat. Remark: New messages will also be retrieved when the user sends some text. | |
logoutpage Default: "" |
If set it defines the URL of the page to be shown on logout instead of the login page. | |
autokick Default: 0 |
If not zero it defines the number of milliseconds the user is allowed to be idle. After this time the user is automatically kicked out of the chat. | |
send_blocking_timeout Default: 15000 |
To prevent the texts from being lost the chat blocks sending from start to the end of the transfer (new texts are written to a buffer instead of being sent). Sometimes a browser error causes the send blocking to remain, for this reason the blocking is always released after this interval (in milliseconds). | |
flooding_*** Default: ..._maxnum: 5 ..._interval: 5000 ..._warnings: 1 ..._expireinterval: 600000 |
Flooding protection: everytime when a user sends flooding_maxnum texts in flooding_interval milliseconds, he gets a warning. After flooding_warnings warnings he is thrown out of the chat. After the time flooding_expireinterval (in milliseconds) the warnings counter is reset to 0. flooding_maxnum=0 or flooding_interval=0 deactivates the flooding protection, flooding_expireinterval=0 deactivates the reset of the warning counter. |
The correct chat function is vitally dependent on the
correct functioning of it's JavaScript part. That is why you should
only make changes on the JavaScript if you know exactly what you are
doing. I most likely won't support any problems caused by wrong
modification. A detailed description of the JavaScript functions
will available soon, for up to date information please visit
http://www.gtchat.de. |