31/03
2015
Wallogit.com
2017 © Pedro Peláez
A simple web based chat
Download phpfreechat-2.1.1.zip and unzip it in the root folder of your Web server., (*2)
JQuery should be included in your html <head> before the phpfreechat code:, (*3)
<script src="/phpfreechat-2.1.1/client/lib/jquery-1.8.2.min.js" type="text/javascript"></script>
Include the phpfreechat plugin in your html <head>:, (*4)
<link rel="stylesheet" type="text/css" href="/phpfreechat-2.1.1/client/themes/default/pfc.min.css" /> <script src="/phpfreechat-2.1.1/client/pfc.min.js" type="text/javascript"></script>
Add this piece of HTML in your <body> where you want the chat to be displayed:, (*5)
... <div id="mychat"><a href="http://www.phpfreechat.net">Creating chat rooms everywhere - phpFreeChat</a></div> ...
Then add this piece of code just after (it will hook the chat on the page):, (*6)
<script type="text/javascript">
$('#mychat').phpfreechat({ serverUrl: '/phpfreechat-2.1.1/server' });
</script>
phpfreechat is released with few themes. You can choose which one you want to use:, (*7)
defaultcarbongamerphpfreechatphpfreechat-miniTo select the theme, you only have to change one line in your html <head>. To use the default theme:, (*8)
<link rel="stylesheet" type="text/css" href="/phpfreechat-2.1.1/client/themes/default/pfc.min.css" />
or this code for carbon theme:, (*9)
<link rel="stylesheet" type="text/css" href="/phpfreechat-2.1.1/client/themes/carbon/pfc.min.css" />