venkatesanchinna/yii2-livechat
最新稳定版本:v1.0.6
Composer 安装命令:
composer require venkatesanchinna/yii2-livechat
包简介
Online chat in the system
关键字:
README 文档
README
Online user chat for Yii
Features
- Easy text chat with system user
- Integrated with Yii2-livechat - flexible user online chat module
- Sample url : http://host/pathtoproject/backend/web/index.php?r=chat/livechat/view
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist venkatesanchinna/yii2-livechat "*"
or run
composer require venkatesanchinna/yii2-livechat
or add
"venkatesanchinna/yii2-livechat": "*"
to the require section of your composer.json file.
Usage
-
Let 's add into modules config in your main config file
'modules' => [ 'chat' => [ 'class' => 'venkatesanchinna\yii2livechat\Module' ] ]Next, update the database schema
$ php yii migrate/up --migrationPath=@vendor/venkatesanchinna/yii2-livechat/migrationsOk. That's done. Avaiable route now:
- /chat/livechat/view
-
To register chat module configuration avaible:
use venkatesanchinna\yii2livechat\assets\LivechatAsset; LivechatAsset::register($this);
-
To load the chat view in your website
Add in view <div class="book_appointment ui-lc-viewers plus-minus"> <div class="book_head " style="bottom: 0px; opacity: 1; width: 322px;"> <span class="header_content book_app txtcap"></span> <span class=" fa fa-plus plus "></span> <div class="clear"></div> </div> <div class="book_form " > <div class="ui-container" style="bottom: -280px; opacity: 1;"></div> </div> </div> -
To Call the chat
$this->registerJs(' $().juichat({\'display_viewers\': true});');
-
Demo Users
Username : user1 & user2 Password : user1 & user2 -
Note
+ This will work after login to the site so check the condition where loading the chat ui and script
License
MIT
统计信息
- 总下载量: 2.84k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-08-11