https://github.com/dgac/mattermostmodule
Mattermost Module for Zend Framework and Bootstrap
https://github.com/dgac/mattermostmodule
bootstrap chatclient chatroom laminas laminas-module laminas-mvc mattermost php zend-framework zend-module
Last synced: 2 months ago
JSON representation
Mattermost Module for Zend Framework and Bootstrap
- Host: GitHub
- URL: https://github.com/dgac/mattermostmodule
- Owner: DGAC
- License: gpl-3.0
- Created: 2018-01-25T08:08:06.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-04-19T21:10:57.000Z (about 2 years ago)
- Last Synced: 2024-11-23T10:44:31.601Z (5 months ago)
- Topics: bootstrap, chatclient, chatroom, laminas, laminas-module, laminas-mvc, mattermost, php, zend-framework, zend-module
- Language: JavaScript
- Homepage:
- Size: 2.1 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Chat module for Laminas and Bootstrap 3
**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.dist``` to add your configuration
## Usage
* Add CSS files to your view.
- Bootstrap 3
- Font Awesome 5Example :
```php
echo $this->headLink()
->appendStylesheet($this->basePath() . '//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-cookieExample :
```php
echo $this->headScript()
->appendFile($this->basePath() . '//jquery.min.js')
->appendFile($this->basePath() . '//jquery-ui.min.js')
->appendFile($this->basePath() . '//bootstrap.min.js')
->appendFile($this->basePath() . '//moment.min.js')
->appendFile($this->basePath() . '//list.min.js')
->appendFile($this->basePath() . '//marked.min.js')
->appendFile($this->basePath() . '//js-cookie.js')
->appendFile($this->basePath() . '/assets/js/mattermostchat.js');
```
* Use view helper :
```html
mattermost();?>
```* And finally configure the Jquery UI Widget :
```javascript
$('.chat-container').mattermost({
baseUrl: 'basePath(); ?>',
userName: 'mattermost['login'];?>',
teamName: 'mattermost['team_id'];?>',
channelId: 'mattermost['defaultchannelid'];?>',
token: 'mattermost['token'];?>',
serverUrl: 'mattermost['server_url'];?>'
});
```