Skip to content

Commit

Permalink
redmin
Browse files Browse the repository at this point in the history
  • Loading branch information
abuzer committed Jul 31, 2014
1 parent 35fca55 commit 66dd547
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,32 @@ CREATE TABLE IF NOT EXISTS `chat` (
How to use?
------------
Set the session variable:

```
@session_start();
if( !isset( $_SESSION['chatusername'] ) || !isset( $_SESSION['username'] ) ){
$_SESSION['chatusername'] = 'User 2';
$_SESSION['username'] = '2';
}
```

Add the following CSS to your page template
```
<link type="text/css" rel="stylesheet" media="all" href="css/chat/chat.css" />
<link type="text/css" rel="stylesheet" media="all" href="css/chat/screen.css" />

```

Add the following scripts to your page template
```
<script type="text/javascript" src="js/chat/jquery.js"></script>
<script type="text/javascript" src="js/chat/chat.js"></script>

And in the view
<span onclick="javascript:chatWith('2','User 2' )">chat with User 2</span>

```

Features
---------
1. Gmail style bottom right display of chat boxes
2. Keeps chat boxes open and stores state (data) even when pages are browsed/refreshed similar to Facebook
3. Displays “Sent at…” after 3 minutes of inactivity
Expand Down

0 comments on commit 66dd547

Please sign in to comment.