dgac/mattermostmodule
最新稳定版本:v0.4.1
Composer 安装命令:
composer require dgac/mattermostmodule
包简介
Module to use Mattermost in a Zend Framework and Bootstrap application
README 文档
README
WIP : This module is usable but it needs more love :)
** 0.2.x version are for ZF2 ; 0.3.x and further for ZF3/Laminas **
Mandatory screenshot
Installation
composer require dgac/mattermostmodule
Configuration
-
Add module in your application modules
-
Use
mattermostmessenger.local.php.distto add your configuration
Usage
-
Add CSS files to your view.
- Bootstrap 3
- Font Awesome 5
Example :
echo $this->headLink() ->appendStylesheet($this->basePath() . '/<path to your bootstrap>/bootstrap.min.css') ->appendStylesheet($this->basePath() . '/assets/css/font-awesome.all.min.css') ->appendStylesheet($this->basePath() . '/assets/css/mattermostchat.css');
-
Add javascript dependencies (see bower.json)
- JQuery
- JQuery-UI
- Bootstrap 3
- Moment.js : http://momentjs.com/
- List.js : http://listjs.com/
- Marked : https://github.com/chjj/marked
- JS Cookie : https://github.com/js-cookie/js-cookie
Example :
echo $this->headScript() ->appendFile($this->basePath() . '/<path to your jquery>/jquery.min.js') ->appendFile($this->basePath() . '/<path to your jquery-ui>/jquery-ui.min.js') ->appendFile($this->basePath() . '/<path to your bootstrap>/bootstrap.min.js') ->appendFile($this->basePath() . '/<path to your momentjs>/moment.min.js') ->appendFile($this->basePath() . '/<path to your list.js>/list.min.js') ->appendFile($this->basePath() . '/<path to your marked.js>/marked.min.js') ->appendFile($this->basePath() . '/<path to your js-cookie>/js-cookie.js') ->appendFile($this->basePath() . '/assets/js/mattermostchat.js');
- Use view helper :
<div class="chat-container"> <?php echo $this->mattermost();?> </div>
- And finally configure the Jquery UI Widget :
$('.chat-container').mattermost({ baseUrl: '<?php echo $this->basePath(); ?>', userName: '<?php echo $this->mattermost['login'];?>', teamName: '<?php echo $this->mattermost['team_id'];?>', channelId: '<?php echo $this->mattermost['defaultchannelid'];?>', token: '<?php echo $this->mattermost['token'];?>', serverUrl: '<?php echo $this->mattermost['server_url'];?>' });
统计信息
- 总下载量: 3.75k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2018-05-16
