dgac/mattermostmodule 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

screenshot

Installation

composer require dgac/mattermostmodule

Configuration

  • Add module in your application modules

  • Use mattermostmessenger.local.php.dist to 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');

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2018-05-16