poprigun/chat

poprigun-chat

Maintainers

Details

github.com/poprigun/chat

Source

Issues

Installs: 324

Dependents: 0

Suggesters: 0

Security: 0

Stars: 4

Watchers: 4

Forks: 2

Open Issues: 1

Language:JavaScript

Type:yii2-extension

v0.3 2015-09-04 14:31 UTC

This package is auto-updated.

Last update: 2024-10-26 01:47:05 UTC


README

poprigun-chat

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require poprigun/chat "*"

or add

"poprigun/chat": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

php

'path', 'node => true, 'options' => [ 'dialogTime' => 0, 'messageTime' => 0, 'form' => '#poprigun-chat-send-form', ], ]);?> [ 'receiver_id' => $user->id, 'text' => 'Message', ], ] )?>

js

$(window).ready(function(){ poprigunChat.loadDialogs(); poprigunChat.listenServerDialog(); });

Template

Templates build with Handlebars

Migration

yii migrate --migrationPath=@vendor/poprigun/chat/migrations

Main config

'modules' => [ 'poprigun_chat' => [ 'class' => \poprigun\chat\PChatModule::className(), 'params' => [ 'pchat-settings' => [ 'userModel' => \frontend\models\User::className(), 'userAvatarMethod' => [ 'class' =>\frontend\models\User::className(), 'method' =>'avatar', ], 'userNameMethod' => [ 'class' =>\frontend\models\Profile::className(), 'method' =>'fullName', 'relation' => 'profile', ], ], ], ], ],