How to Install or Update a Plugin in Mibew
The recently released Mibew 2 introduces a powerful plugin framework which makes it possible to expand Mibew’s functionality in a myriad of ways only limited by the imagination of third party developers. With events and hooks, developers can expand the live chat service by providing richer client-side experiences, or even backend functionality such as shopping cart or ticketing system integrations. Given that Mibew is a self-hosted solution, website admins will be responsible for acquiring these plugins and installing it on their chat servers.
This guide shows how to install a plugin, using the Wurrd client interface plugin and its dependency as an example. The section for updating a plugin is at the bottom of the page. Wurrd is an app that provides a native interface on top of Mibew for operators to interact with website visitors.
- Install Mibew 2.1 or above
- Download the Wurrd plugin files:
- Wurrd Authentication Plugin
- Wurrd Client Interface Plugin
- Sample config.yml file.
- Extract the Wurrd Authentication zip file.
- Copy the files to the <mibew installation>/plugins folder. Once you are done, your directory structure should look like figure this:
- Edit your config.yml file. (Note: Some plugins require that some properties be supplied before they can be initialized. Look at the documentation of the plugin for such information. The Wurrd Auth plugin requires that a client_id be provided)
Scenario 1: Installing the first plugin that requires properties.
If this is the first plugin you are installing that requires properties, the plugins section will look like this.
# Plugins plugins: 
Modify it to pass the properties that are required. For the Wurrd Auth plugin, the plugins section should look like this. Note that the number of spaces before each line is important.
# Plugins plugins: "Wurrd:AuthAPI": client_id: TEST_CLIENT_ID
Scenario 2: Adding to a previous plugin that requires properties.
Here there was another plugin that requires properties. You are adding a new plugin entry for its properties. The plugin section should look lie this
# Plugins plugins: "Acme:BouncingBall": color: Green radius: 3 "Wurrd:AuthAPI": client_id: TEST_CLIENT_ID
- Login to the Mibew admin panel and navigate to the plugins configuration page. If the Mibew admin panel is blank, there was an issue when modifying the config.yml file. This is most likely because of indentation of each line wasn’t properly followed.
- Once on the plugin config page, you will see the plugin with a link to enable the plugin. Click on the link
- Upon success it should say “Working”
- If it says “Not initialized” then the config.yml plugin properties were not set properly
At this stage, your plugin has been successfully installed and it should provide the added functionality to your website.
If you are following these instructions to install the plugins for the Wurrd app, follow the same steps above for to install the Wurrd Client Interface plugin.
- Wurrd Client Interface does not require any plugin properties, so you wouldn’t be modifying the config.yml file.
- This plugin depends on the Wurrd Auth API plugin, so you must install that one first before installing this.
Once complete, your plugins configuration page should look like this
- The last step is to clear your cache. If in your config.yml file you are set to use the filesystem for your cache, delete the stash folder in /cache. There are some instances when even after a successful installation of the plugin, some of its components don’t work because the cache has not been refreshed. This bug describes the issue.
Updating a Plugin
For demonstration purposes let’s say we are upgrading the Wurrd Client Interface plugin from version 1.0.2 to 1.0.3
- Download and extract the latest version of the plugin
- On your server, make a copy of the old version of the plugin if you need to go back to it. i.e <mibew installation>/plugins/Wurrd/Mibew/Plugin/ClientInterface. Do not make a copy inside the Plugin folder e.g. ClientInterface.backup. Place the copy in outside of <Mibew root> because Mibew scans the Plugin folder for plugins and the backup will cause an error.
- Copy the entire directory structure to the <mibew installation>/plugins folder
- Login to the Mibew admin panel and navigate to the plugins configuration page.
- Once on the plugin config page, the plugin status will say “needs update”, with a link to update the plugin. Click on the link
- Upon success it should say “Working”
- The last step is to clear your cache. If in your config.yml file you are set to use the filesystem for your cache, delete the stash folder in /cache. There is a bug in the Mibew core where after an update the cache is not refreshed.
Test your installation
We have put together a little script to test your plugin installation located at http://wurrdapp.com/diagnostics/testwurrd.php.
We do not save your account credentials, but if you are the paranoid type you can get the script (testwurrd.php) from GitHub and run it from your web server.
If the plugin install only works with the “Force use of POST” option, it means your server blocks other HTTP verbs like PUT and DELETE (Issue 3). To workaround this, add the following to the plugins section of your config.yml:
"Wurrd:ClientInterface": use_http_post: true
Sometimes it may be necessary for us to test/debug your server from our test devices. To provide the best support, please be prepared to provide us with access to a test Mibew server. In extreme cases, we have also requested ftp and db access to the test Mibew server. We sometimes have to do this given that Mibew is a self-hosted solution and every environment is slightly different.
The Mibew documentation also gives instructions on how to install and update a plugin. Check it out if the steps here are not clear.