2017 © Pedro Peláez
 

library mattermostmodule

Module to use Mattermost in a Zend Framework and Bootstrap application

image

dgac/mattermostmodule

Module to use Mattermost in a Zend Framework and Bootstrap application

  • Wednesday, May 16, 2018
  • by BrunoSpy
  • Repository
  • 1 Watchers
  • 0 Stars
  • 159 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 6 Open issues
  • 3 Versions
  • 184 % Grown

The README.md

Chat module for Laminas and Bootstrap 3

WIP : This module is usable but it needs more love :), (*1)

** 0.2.x version are for ZF2 ; 0.3.x and further for ZF3/Laminas **, (*2)

Mandatory screenshot

screenshot, (*3)

Installation

composer require dgac/mattermostmodule, (*4)

Configuration

  • Add module in your application modules, (*5)

  • Use mattermostmessenger.local.php.dist to add your configuration, (*6)

Usage

  • Add CSS files to your view., (*7)

    • Bootstrap 3
    • Font Awesome 5

Example :, (*8)

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), (*9)

    • 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 :, (*10)

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'];?>'
        });

The Versions

16/05 2018

dev-master

9999999-dev https://github.com/DGAC/MattermostModule

Module to use Mattermost in a Zend Framework and Bootstrap application

  Sources   Download

GPL-3.0-or-later

The Requires

 

by Bruno Spyckerelle

bootstrap zf2 zend framework chat mattermost

16/05 2018

v0.2.0

0.2.0.0 https://github.com/DGACfr/MattermostModule

Module to use Mattermost in a Zend Framework and Bootstrap application

  Sources   Download

GPL-3.0-or-later

The Requires

 

by Bruno Spyckerelle

bootstrap zf2 zend framework chat mattermost

13/02 2018

v0.1.0

0.1.0.0 https://github.com/BrunoSpy/MattermostModule

Module to use Mattermost in a Zend Framework and Bootstrap application

  Sources   Download

GPL-3.0-or-later

The Requires

 

by Bruno Spyckerelle

bootstrap zf2 zend framework chat mattermost