Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mbanusic committed May 7, 2017
1 parent e9036e2 commit 05fc158
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 0 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Rocket.chat LiveChat addon for WHMCS
====================================

### Description

Help customers visiting your website make buying decisions in real-time by adding this live chat app. They can contact your sales agents with one simple click. Personal attention, answers, and receommendations will improve customer satisfaction and increase repeat business.

Build trust and relationship with your customers through immediate feedback and real-time conversations. Investment on interactive custom support via this live chat app can provide an immediate boost in your bottomline.

Rocket.Chat Live Chat plugin allows website visitors to chat with you directly. You can handle multiple incoming chats yourself, or assign them to your sales agents (even work-at-home agents).

Unlike other Wordpress chat plugins, Rocket.Chat Live Chat plugin works with the world's most popular 100% open source chat server - Rocket.Chat. This means you can run and operate your own chat server and never have to pay any monthly fees to have Live Chat on your website. It also means that you are supported by a community of over 40,000 Rocket.Chat servers with hundreds of thousands of users worldwide in over 22 countries.

Rocket.Chat Live Chat plugin also has the following class-leading features:

* works great with visitors on mobile phones or tablets
* works great with on-the-go agents working from phones, tablets, or laptops
* customizable triggers to selectively chat with high sales potential visitors
* support for selective redirect to multiple departments
* management dashboard based monitoring of call flow and chat activities
* form for message when no agent is available
* customization satisfaction survey after chat
* transfer to other agents
* confer with additional agents

There is no comparison, only Rocket.Chat Live Chat plugin offers:

* free, no cost, 100% open source chat server that you can run yourself
* file upload and download for support documents and photos
* live link support for video viewing within the chat
* built in optional geo-location
* knowledge base integration to enhance support services
* transfer to voice and/or video chat
* amazing extension possibilities through the use of intelligent "bots"

Don't wait, try Rocket.Chat Live Chat plugin today; boost your bottomline and get rid of the old stale plugin that costs you dearly every single month.

### Installation

Copy modules folder to your whmcs installation folder and activate the addon by going to Setup -> Addon Modules and activating the Rocket.Chat Livechat addon.

After activation please use Configure to setup the URL to the Rocket.chat instance.

If you do not have a Rocket.chat instace please visit [Rocket.chat](https://rocket.chat) website to get one.
32 changes: 32 additions & 0 deletions modules/addons/rocketchat_livechat/hooks.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Capsule\Manager as Capsule;

add_hook('ClientAreaFooterOutput', 1, function($vars) {
$enable = Capsule::table('tbladdonmodules')->select('value')-> WHERE('module', '=' , 'rocketchat_livechat')->WHERE('setting' , '=', 'rocketchat-enable')->pluck('value');

if (is_array($enable)) {
$enable = current($enable);
}

if ('on' != $enable) {
return;
}

$url = Capsule::table('tbladdonmodules')->select('value')-> WHERE('module', '=' , 'rocketchat_livechat')->WHERE('setting' , '=', 'rocketchat-url')->pluck('value');

if (is_array($url)) {
$url = current($url);
}

return '
<!-- Start of Rocket.Chat Livechat Script -->
<script type="text/javascript">
(function(w, d, s, u) {
w.RocketChat = function(c) { w.RocketChat._.push(c) }; w.RocketChat._ = []; w.RocketChat.url = u;
var h = d.getElementsByTagName(s)[0], j = d.createElement(s);
j.async = true; j.src = "' . $url . '/packages/rocketchat_livechat/assets/rocketchat-livechat.min.js";
h.parentNode.insertBefore(j, h);
})(window, document, "script", "' . $url . '/livechat");
</script>
<!-- End of Rocket.Chat Livechat Script -->';
});
Binary file added modules/addons/rocketchat_livechat/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions modules/addons/rocketchat_livechat/rocketchat_livechat.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php


if (!defined("WHMCS")) {
die("This file cannot be accessed directly");
}

function rocketchat_livechat_config()
{
return array(
'name' => 'Rocket.Chat LiveChat',
'description' => 'This module provides the basic LiveChat capability for support',
'author' => 'Marko Banušić',
'language' => 'english',
'version' => '1.0',
'fields' => array(
'rocketchat-url' => array(
'FriendlyName' => 'URL of LiveChat',
'Type' => 'text',
'Size' => '25',
'Default' => 'https://rocket.chat',
'Description' => 'Please enter the URL to your Rocket.Chat instance (e.g. https://chat.domain.tld/)',
),
'rocketchat-enable' => array(
'FriendlyName' => 'Enable',
'Type' => 'yesno',
'Description' => 'Tick to enable',
),

)
);
}

0 comments on commit 05fc158

Please sign in to comment.