diff options
author | Frug <frugen@gmail.com> | 2014-07-01 13:12:07 -0400 |
---|---|---|
committer | Frug <frugen@gmail.com> | 2014-07-01 13:12:07 -0400 |
commit | 2b94a84c38f1cc920ec32e168ad5668e2f64a625 (patch) | |
tree | aec109718d498fa7bf1bdc361b461db62a24403d | |
parent | fb2024c2eba72ed7f21524733947e4631f1b9639 (diff) | |
download | AJAX-Chat-2b94a84c38f1cc920ec32e168ad5668e2f64a625.zip AJAX-Chat-2b94a84c38f1cc920ec32e168ad5668e2f64a625.tar.gz AJAX-Chat-2b94a84c38f1cc920ec32e168ad5668e2f64a625.tar.bz2 |
new readme file
-rw-r--r-- | chat/readme.html | 259 |
1 files changed, 146 insertions, 113 deletions
diff --git a/chat/readme.html b/chat/readme.html index 145e188..e6137ab 100644 --- a/chat/readme.html +++ b/chat/readme.html @@ -6,128 +6,146 @@ <style type="text/css">
body,td,th { font-family: Arial, Helvetica, sans-serif; line-height:1.6em; color:#000; font-size: inherit; }
- body{background:#E7E7E7;margin:0; font-size: 0.8em;}
- pre {font-size: 1.2em}
- #wrap{max-width:1200px;background:#fff;margin:0.5em auto;padding:1.5em;box-shadow:2px 2px 4px #555;}
+ body{background:#FFFFFF;margin:0;font-size: 0.8em;}
+ pre{font-size: 1.2em}
+ .container{max-width:1200px;margin:0 auto;padding:1.5em;}
.subsection{border:1px solid #006;padding:0.8em 1.6em; background:#F2F5F9;}
.subsection .subsection{border:0}
- a:link{color:#036;text-decoration:none}
- a:visited{color:#03F;text-decoration:none}
- td{padding:.5em}
+ a{color:#036;text-decoration:none}
.filename{color:#060}
- .note{font-style:italic;background-color:#FFFFa9;border-radius:10px;padding:1em 1.2em}
+ .note{font-style:italic;font-family:trebuchet ms,sans-serif;background-color:#5B62E6;color:white;border-radius:10px;padding:1em 1.2em;margin:1em;}
+ .note h3{background:transparent;border-radius:0;color:white;padding-top:0;font-family:trebuchet ms,sans-serif;}
+ .note a {color: #F0F0FF;}
a:hover{color:#03F;text-decoration:underline}
a:active{color:#03F;text-decoration:none;text-align:center}
h1,h2,h3,h4,h5,h6{font-weight:400;line-height:100%;margin:0; font-family: Verdana, Geneva, sans-serif;}
- h1{font-size:1.8em;color:#E3E3FB;margin:-0.7em -0.7em 0.5em -0.7em;padding:0.8em; background: #2F2E8B; font-weight: 700;}
- h2{font-size:1.3em;color:#FFF;background-color:#2F2E8B;clear:both;border-radius:5px 5px 0 0;margin:2em 0 0;padding:.5em}
+ h2{font-size:1.3em;color:#FFF;background-color:#2F2E8B;border-radius:5px 5px 0 0;margin:2em 0 0;padding:.5em}
h2:target{background-color:#6854E4;}
+ header{color:#E3E3FB; background: #2F2E8B; font-weight: 700;}
.version { font-size: 0.6em; font-weight: bold; line-height: 150%; display: block; }
.version a { color:#e4e4e4; text-decoration: underline;}
- #toc{color:#000;background-color:#EBEBEB;display:block;float:right;width:20em;line-height:170%;border-radius:5px;border-color:#FFF;margin:0 0 1em 1em;padding:1.2em}
- #toc h2{background:#333;color:#FFF;margin:-1em -1em 0.5em;padding:0.5em}
- #toc ol{margin:0}
ol li{margin-bottom:1em}
h3{color:#000;background-color:#CED2DD;padding:.5em; font-weight: bold;border-radius:5px;}
code{display:block;background-color:#DDD;margin:1em;padding:1em; font-family: Consolas,"Liberation Mono",Courier,monospace;}
table{border:0}
+ td{padding:.2em}
th{font-weight:bold;vertical-align:middle;text-align:left;padding:.2em; }
p{margin:.5em 0}
- #toc ol li,#toc p{margin:0;padding:0}
+ #toc{color:#000;background:#F9E7E7;display:block;float:right;width:22em;line-height:170%;border-radius:6px;border:1px solid #EB5B56;margin:0 0 1em 1em;padding:15px}
+ #toc h2{background:#EB5B56;color:#FFF;margin:-15px -15px 0.8em;padding:0.5em}
+ #toc ol{margin:0; padding: 0 0 0 2em;font-size:1.2em;}
+ #toc ol li{margin:0;padding:0}
</style>
</head>
<body>
-<div id="wrap">
+<header>
+ <div class="container">
+ <h1>
+ AJAX Chat
+ <span class="version">
+ v 0.8.8 standalone ( <a href="https://blueimp.net/ajax/">blueimp.net/ajax/</a> )
+ </span>
+ </h1>
+ </div>
+</header>
-<h1 id="top">AJAX Chat
- <span class="version">
- v 0.8.7 standalone ( <a href="https://blueimp.net/ajax/">blueimp.net/ajax/</a> )
- </span>
-</h1>
+<div class="container">
<div id="toc">
<h2>Table of Contents</h2>
- <p><a href="#requirements">Requirements</a></p>
- <p><a href="#installation">Installation</a></p>
- <p><a href="#configuring">Configuring and Customizing</a></p>
- <p><a href="#logs">Logs</a></p>
- <p><a href="#shoutbox">Shoutbox</a></p>
- <p><a href="#socket">Socket Server</a></p>
- <p><a href="#support">Support</a></p>
- <p><a href="#donate">Donate</a></p>
- <p><a href="#license">License</a></p>
+ <ol>
+ <li><a href="#requirements">Requirements</a></li>
+ <li><a href="#installation">Installation</a></li>
+ <li><a href="#configuring">Configuring and Customizing</a></li>
+ <li><a href="#logs">Logs</a></li>
+ <li><a href="#shoutbox">Shoutbox</a></li>
+ <li><a href="#socket">Socket Server</a></li>
+ <li><a href="#support">Support</a></li>
+ <li><a href="#donate">Donate</a></li>
+ <li><a href="#license">License</a></li>
+ </ol>
</div>
-<p style="margin:1.5em">This is the <strong>standalone</strong> version of blueimp's AJAX Chat designed to run on its own, without another web application.<br>
-If you want to integrate AJAX Chat with one of the forums we support, go back and choose the right version. <br>
-This version is good for customizing your own integration, or using on its own.</p>
+<div style="margin-right: 28em;">
+ <h2 style="margin-top:0;">Version Information</h2>
+ <div class="subsection">
+ This is the <strong>standalone</strong> version of blueimp's AJAX Chat designed to run on its own, without another web application.<br>
+ If you want to integrate AJAX Chat with one of the forums we support, go back and choose the right version. <br>
+ This version is good for customizing your own integration, or using on its own.</p>
-<p class="note" style="margin-right: 30em;">
- AJAX stands for "Asynchronous JavaScript and XML".<br>
- The AJAX Chat client (your browser) uses JavaScript to query the web server for updates.<br>
- Instead of delivering a complete HTML page only updated data is sent in XML format.<br>
- By using JavaScript the chat page can be updated without having to reload the whole page.<br>
- PHP is used to communicate with the database and authenticate users.
-</p>
+ <p class="note">
+ AJAX stands for "Asynchronous JavaScript and XML".<br>
+ The AJAX Chat client (your browser) uses JavaScript to query the web server for updates.<br>
+ Instead of delivering a complete HTML page only updated data is sent in XML format.<br>
+ By using JavaScript the chat page can be updated without having to reload the whole page.<br>
+ PHP is used to communicate with the database and authenticate users.
+ </p>
+ </div>
+</div>
-<h2 id="requirements">Requirements</h2>
+<h2 id="requirements">1. Requirements</h2>
<div class="subsection">
- <table style="width: 550px;" summary="Requirements for running AJAX Chat.">
- <tr>
- <th width="275" scope="col">Server-Side</th>
- <th width="275" scope="col">Client-Side</th>
- </tr>
- <tr>
- <td>
- PHP >= 5<br>
- MySQL >= 4<br>
- Ruby >= 1.8 (optional)
- </td>
- <td>
- Enabled JavaScript<br>
- Enabled Cookies<br>
- Flash Plugin >= 9 (optional)
- </td>
- </tr>
- </table>
+ <table style="width: 550px;" summary="Requirements for running AJAX Chat.">
+ <tr>
+ <th width="275" scope="col">Server-Side</th>
+ <th width="275" scope="col">Client-Side</th>
+ </tr>
+ <tr>
+ <td>
+ PHP >= 5<br>
+ MySQL >= 4<br>
+ Ruby >= 1.8 (optional)
+ </td>
+ <td>
+ Enabled JavaScript<br>
+ Enabled Cookies<br>
+ Flash Plugin >= 9 (optional)
+ </td>
+ </tr>
+ </table>
</div>
-<h2 id="installation">Installation</h2>
+<h2 id="installation">2. Installation</h2>
<div class="subsection">
<p>Download your preferred version of AJAX Chat and unzip the file on your computer.<br></p>
- <h3>Before You Begin</h3>
- <div class="subsection">
- <p>
- In order to edit PHP files you will need a good text editor. <strong>You should not use Windows notepad, wordpad, or Microsoft Word to edit PHP files.</strong> These programs will add something called a byte-order-mark (BOM) to the files and this may prevent chat from functioning properly.
- We recommend using Notepad ++ ( <a href="http://notepad-plus-plus.org/">http://notepad-plus-plus.org</a> ) for editing all files. It also has the benefit of color-coding your files so you can edit them more easily.<br>
- If you get an error message like "<strong>Cannot modify header information - headers already sent</strong>" it is likely because you have used one of the above programs to edit files.
- </p>
- </div>
+
+ <section class="note">
+ <h3>Use a Proper Text Editor!</h3>
+ In order to edit PHP files you will need a good text editor. <strong>You should not use Windows notepad, wordpad, or Microsoft Word to edit PHP files.</strong> These programs will add something called a byte-order-mark (BOM) to the files and this may prevent chat from functioning properly.
+ We recommend using Notepad ++ ( <a href="http://notepad-plus-plus.org/">http://notepad-plus-plus.org</a> ) for editing all files. It also has the benefit of color-coding your files so you can edit them more easily.<br>
+ If you get an error message like "<strong>Cannot modify header information - headers already sent</strong>" it is likely because you have used one of the above programs to edit files.
+ </section>
<h3>Configure Database Settings</h3>
<div class="subsection">
- <p>
- The first and most important thing you need to do is tell AJAX Chat how to connect to your database. This, and all core settings must be located inside the file <span class="filename">lib/config.php</span>. <br>
- <strong>You need to create this file.</strong> <br>
- An example <span class="filename">config.php</span> file can be found in <span class="filename">lib/config.php.example</span> that shipped with chat.<br>
- Duplicate this file and save it as config.php (or just delete .example from the end of the file name) and then fill out at least the following four fields in the file:</p>
- <p>
- <code>$config['dbConnection']['host'] = '<em>your_database_hostname</em>';<br>
- $config['dbConnection']['user'] = '<em>your_database_username</em>';<br>
- $config['dbConnection']['pass'] = '<em>your_database_password</em>';<br>
- $config['dbConnection']['name'] = '<em>your_database_name</em>';</code>
- </p>
- <p>Sufficed to say you need this information. Talk to your hosting provider if you don't know. </p>
- <p>In most cases, chat will function with only these fields filled out and you can proceed to the next step.<br>
- </p>
- <p class="note">If your host does not use mysqli you will need to change the connection type field:<br>
- $config['dbConnection']['type'] = null;<br>
- If this is set to "null" it defaults to "mysqli" if existing, else to "mysql". In most cases this field can be left as null.<br>
- <br>
- You can reference an existing database connection link or object by changing:<br>
- $config['dbConnection']['link'] = null;<br>
- If this is set to null, a new database connection is created.</p>
+ <p>
+ The first and most important thing you need to do is tell AJAX Chat how to connect to your database. This, and all core settings must be located inside the file <span class="filename">lib/config.php</span>. <br>
+ <strong>You need to create this file.</strong> <br>
+ An example <span class="filename">config.php</span> file can be found in <span class="filename">lib/config.php.example</span> that shipped with chat.<br>
+ Duplicate this file and save it as config.php (or just delete .example from the end of the file name) and then fill out at least the following four fields in the file:
+ </p>
+ <p>
+ <code>
+ $config['dbConnection']['host'] = '<em>your_database_hostname</em>';<br>
+ $config['dbConnection']['user'] = '<em>your_database_username</em>';<br>
+ $config['dbConnection']['pass'] = '<em>your_database_password</em>';<br>
+ $config['dbConnection']['name'] = '<em>your_database_name</em>';
+ </code>
+ </p>
+ <p>Sufficed to say you need this information. Talk to your hosting provider if you don't know.</p>
+ <p>
+ In most cases, chat will function with only these fields filled out and you can proceed to the next step.<br>
+ </p>
+ <p class="note">
+ If your host does not use mysqli you will need to change the connection type field:<br>
+ $config['dbConnection']['type'] = null;<br>
+ If this is set to "null" it defaults to "mysqli" if existing, else to "mysql". In most cases this field can be left as null.<br>
+ <br>
+ You can reference an existing database connection link or object by changing:<br>
+ $config['dbConnection']['link'] = null;<br>
+ If this is set to null, a new database connection is created.
+ </p>
</div>
<h3>Choose Your Channel Settings</h3>
@@ -143,19 +161,25 @@ This version is good for customizing your own integration, or using on its own.< <h3>Add Your Users</h3>
<div class="subsection">
- <p> Edit users in <span class="filename">lib/data/users.php</span>.<br>
- Users follow the following format:
- </p>
- <p><code>$users[<em>user id</em>] = array();<br>
- $users[<em>user id</em>]['userRole'] = <em>AJAX_CHAT_ROLE</em>;<br>
- $users[<em>user id</em>]['userName'] = '<em>user name</em>';<br>
- $users[<em>user id</em>]['password'] = '<em>user password</em>';<br>
- $users[<em>user id</em>]['channels'] = array(<em>allowed channel ids</em>);</code><br>
- Each user must have a unique user id number and a unique name.<br>
- The first user in the list (user id 0) is used for the guest user settings. All guest users will have access to the channels set for this user and the user role AJAX_CHAT_GUEST.<br>
- Registered users can have the user roles AJAX_CHAT_USER, AJAX_CHAT_MODERATOR or AJAX_CHAT_ADMIN. (this is case sensitive, type it exactly)<br>
- The list of channels a user has access to can be set for each user individually. Channel id's are separated by commas. eg: array(0,1,23); allows channels 0, 1 and 23.<br>
- Whitespace in the user names will be converted to the underscore "_".</p>
+ <p class="note">
+ The Standalone version of chat uses a php file to store users and rooms while the database is used for chat messages, invites and bans.<br>
+ The integration versions typically make use of a database for users and rooms. If you desire a way to manage users without having to edit a php file, consider using an integration version.
+ </p>
+ <p>
+ Edit users in <span class="filename">lib/data/users.php</span>.<br>
+ Users follow the following format:
+ </p>
+ <p><code>$users[<em>user id</em>] = array();<br>
+ $users[<em>user id</em>]['userRole'] = <em>AJAX_CHAT_ROLE</em>;<br>
+ $users[<em>user id</em>]['userName'] = '<em>user name</em>';<br>
+ $users[<em>user id</em>]['password'] = '<em>user password</em>';<br>
+ $users[<em>user id</em>]['channels'] = array(<em>allowed channel ids</em>);</code><br>
+ Each user must have a unique user id number and a unique name.<br>
+ The first user in the list (user id 0) is used for the guest user settings. All guest users will have access to the channels set for this user and the user role AJAX_CHAT_GUEST.<br>
+ Registered users can have the user roles AJAX_CHAT_USER, AJAX_CHAT_MODERATOR or AJAX_CHAT_ADMIN. (this is case sensitive, type it exactly)<br>
+ The list of channels a user has access to can be set for each user individually. Channel id's are separated by commas. eg: array(0,1,23); allows channels 0, 1 and 23.<br>
+ Whitespace in the user names will be converted to the underscore "_".
+ </p>
</div>
<h3>Upload to Your Server</h3>
@@ -167,10 +191,13 @@ This version is good for customizing your own integration, or using on its own.< <div class="subsection">
<p>There are two options available to you to create the database. The first, and usually the easiest option, is to run the installation script included with AJAX Chat. Alternatively, you may use a database tool like PHPMyAdmin to manually create the tables.</p>
<ol>
- <li> To use the installation script, visit the following URL in your browser:<br>
- <span class="filename">http://example.org/path/to/chat/install.php</span><br>
- Where
- "http://example.org/path/to/chat/" is the real URL to your chat directory.</li>
+ <li>
+ To use the installation script, visit the following URL in your browser:<br>
+ <span class="filename">http://example.org/path/to/chat/install.php</span><br>
+ Where
+ "http://example.org/path/to/chat/" is the real URL to your chat directory.<br>
+ Be sure to delete the install.php file after you have completed this step!
+ </li>
<li>To install it manually using PHPMyAdmin or a similar tool, copy the contents of the <span class="filename">chat.sql</span> file and run it as a query.</li>
</ol>
<p>Either of these methods will create the tables your database needs to store chat messages and other information.</p>
@@ -188,7 +215,7 @@ This version is good for customizing your own integration, or using on its own.< </div>
</div>
-<h2 id="configuring">Configuring and Customizing</h2>
+<h2 id="configuring">3. Configuring and Customizing</h2>
<div class="subsection">
<h3>Configuration Files</h3>
<div class="subsection">
@@ -259,7 +286,7 @@ This version is good for customizing your own integration, or using on its own.< </div>
-<h2 id="logs">Logs</h2>
+<h2 id="logs">4. Logs</h2>
<div class="subsection">
<h3>Accessing the Logs</h3>
<div class="subsection">
@@ -275,7 +302,7 @@ This version is good for customizing your own integration, or using on its own.< </div>
</div>
-<h2 id="shoutbox">Shoutbox</h2>
+<h2 id="shoutbox">5. Shoutbox</h2>
<div class="subsection">
<p>AJAX Chat is also usable as shoutbox - this is a short guide on how to set it up:</p>
@@ -332,8 +359,15 @@ return null; </div>
</div>
-<h2 id="socket">Socket Server</h2>
+<h2 id="socket">6. Socket Server</h2>
<div class="subsection">
+ <p class="note">
+ This part of the setup is OPTIONAL and meant for experienced users only.<br>
+ The Socket Server is no longer actively supported and may not function correctly out of the box.
+ Later versions of AJAX Chat may have this socket server implementation replaced with something else.<br>
+ Please do not report bugs regarding the socket server - you're on your own with this one!
+ </p>
+
<p>Using the AJAX technology alone the chat clients have to permanently pull updates from the server.<br>
This is due to AJAX being a web technology and HTTP being a stateless protocol.<br>
Events pushed from server-side need a permanent or long-lasting socket connection between clients and server.<br>
@@ -341,7 +375,6 @@ return null; <p>AJAX Chat uses a JavaScript-to-Flash bridge to establish a permanent socket connection from client side.<br>
The JavaScript-to-Flash bridge requires a Flash plugin >= 9 installed on the user browser.<br>
Clients without this requirement will fall back to pull the server for updates.</p>
- <p class="note">This part of the setup is OPTIONAL and meant for experienced users only.</p>
<h3>Installation</h3>
<div class="subsection">
<p>The socket server coming with AJAX Chat is implemented in Ruby.<br>
@@ -399,7 +432,7 @@ return null; <p> </p>
</div>
-<h2 id="support">Support</h2>
+<h2 id="support">7. Support</h2>
<div class="subsection">
<p>
<b>Please do not email the devs with support questions.</b><br>
@@ -409,7 +442,7 @@ return null; </p>
</div>
-<h2 id="donate">Donate</h2>
+<h2 id="donate">8. Donate</h2>
<div class="subsection">
<p>
Your donations contribute to the growth and development of this project and are always appreciated.<br>
@@ -423,7 +456,7 @@ return null; </p>
</div>
-<h2 id="license">License</h2>
+<h2 id="license">9. License</h2>
<div class="subsection">
<p>Bluimp's AJAX Chat is released under a Modified MIT License.</p>
<p>You should also find this license included with your download of this project.</p>
@@ -433,4 +466,4 @@ return null; </div>
</body>
-</html>
+</html>
\ No newline at end of file |