Version Description
Download this release
Release Info
Developer | revechat |
Plugin | REVE Chat – WP Live Chat Support plugin |
Version | 1.2.2 |
Comparing to | |
See all releases |
Version 1.2.2
- assets/banner-772x250.png +0 -0
- assets/icon-128x128.png +0 -0
- assets/icon-256x256.png +0 -0
- assets/screenshot-1.png +0 -0
- assets/screenshot-2.png +0 -0
- assets/screenshot-3.png +0 -0
- assets/screenshot-4.png +0 -0
- trunk/index.html +1 -0
- trunk/readme.txt +1 -0
- trunk/revechat.php +146 -0
- trunk/screenshot-1.png +0 -0
- trunk/screenshot-2.png +0 -0
- trunk/screenshot-3.png +0 -0
- trunk/screenshot-4.png +0 -0
assets/banner-772x250.png
ADDED
Binary file
|
assets/icon-128x128.png
ADDED
Binary file
|
assets/icon-256x256.png
ADDED
Binary file
|
assets/screenshot-1.png
ADDED
Binary file
|
assets/screenshot-2.png
ADDED
Binary file
|
assets/screenshot-3.png
ADDED
Binary file
|
assets/screenshot-4.png
ADDED
Binary file
|
trunk/index.html
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<!DOCTYPE html><title></title>
|
trunk/readme.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
0 |
|
1 |
|
1 |
+
=== Reve Chat ===
|
2 |
|
3 |
|
trunk/revechat.php
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Reve Chat
|
4 |
+
Description: REVE Chat is a powerful and intuitive real-time customer engagement software. As a customer support software, REVE Chat puts a live person on your website to personally guide and help your visitors, while they go through the various sections of your digital display. This live chat service helps them to get the most out of your web presence, while allowing you to understand their diverse needs on a one-to-one basis. REVE Chat is easy to install and use.
|
5 |
+
Version: 1.2.2
|
6 |
+
Author: ReveChat
|
7 |
+
Author URI: www.revechat.com
|
8 |
+
License: GPL2
|
9 |
+
*/
|
10 |
+
if(!class_exists('WP_Plugin_Revechat'))
|
11 |
+
{
|
12 |
+
class WP_Plugin_Revechat
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* Construct the plugin object
|
16 |
+
*/
|
17 |
+
public function __construct()
|
18 |
+
{
|
19 |
+
// Plugin Details
|
20 |
+
$this->plugin = new stdClass;
|
21 |
+
$this->plugin->name = 'revechat'; // Plugin Folder
|
22 |
+
$this->plugin->displayName = 'ReveChat'; // Plugin Name
|
23 |
+
$this->plugin->version = '1.1.1';
|
24 |
+
|
25 |
+
// Hooks
|
26 |
+
add_action('admin_init', array(&$this, 'registerSettings'));
|
27 |
+
add_action('admin_menu', array(&$this, 'adminPanels'));
|
28 |
+
|
29 |
+
add_action('wp_head', array(&$this, 'frontendHeader'));
|
30 |
+
} // END public function __construct
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Activate the frontendHeader
|
34 |
+
*/
|
35 |
+
public static function frontendHeader()
|
36 |
+
{
|
37 |
+
$aid = get_option('revechat_accountid' , '');
|
38 |
+
$trackingID = get_option('revechat_trackingid' , '');
|
39 |
+
|
40 |
+
if( (isset($aid) && !empty($aid)) && (isset($trackingID) && !empty($trackingID)) ) {
|
41 |
+
|
42 |
+
$script = "<script type='text/javascript'>";
|
43 |
+
$script .= ' var url = "https://static.revechat.com/client/scripts/configuration.js";
|
44 |
+
var trackingID ="'.$trackingID.'"
|
45 |
+
function initializeWidget(){
|
46 |
+
var aid="'.$aid.'";
|
47 |
+
new ReveChatWidget(aid);
|
48 |
+
var trackingID ="'.$trackingID.'";}
|
49 |
+
(function loadSrc(src_url, onload_callback){
|
50 |
+
var script = document.createElement("script");
|
51 |
+
if(script.readyState){
|
52 |
+
script.onreadystatechange = function (){
|
53 |
+
if(script.readyState === "loaded" || script.readyState === "complete"){
|
54 |
+
script.onreadystatechange = null
|
55 |
+
onload_callback();}}
|
56 |
+
} else {
|
57 |
+
script.onload = function(){
|
58 |
+
onload_callback();
|
59 |
+
} }
|
60 |
+
script.src = src_url;
|
61 |
+
var first_script = document.getElementsByTagName("script")[0];
|
62 |
+
first_script.parentNode.insertBefore(script, first_script);
|
63 |
+
})(url, initializeWidget);
|
64 |
+
<!-- Add textArea code at every page in your website -->';
|
65 |
+
|
66 |
+
$script .='</script>';
|
67 |
+
|
68 |
+
echo $script ;
|
69 |
+
|
70 |
+
}
|
71 |
+
|
72 |
+
} // END public static function activate
|
73 |
+
/*
|
74 |
+
* show parameter section
|
75 |
+
*/
|
76 |
+
public function registerSettings(){
|
77 |
+
register_setting($this->plugin->name, 'revechat_accountid', 'trim');
|
78 |
+
register_setting($this->plugin->name, 'revechat_trackingid', 'trim');
|
79 |
+
}
|
80 |
+
/*
|
81 |
+
* admin panel
|
82 |
+
*/
|
83 |
+
public function adminPanels(){
|
84 |
+
//add_options_page("ReveChat Dashboard" , "ReveChat" , "read" , "reveChatOptions");
|
85 |
+
// Add a new submenu under Settings:
|
86 |
+
add_options_page(__('ReveChat Dashboard','revechat-settings'), __('ReveChat Settings','menu-revechat'), 'manage_options', 'revechatsettings', array($this , 'reveChatOptions') );
|
87 |
+
}
|
88 |
+
/*
|
89 |
+
* revechat options
|
90 |
+
*/
|
91 |
+
public function reveChatOptions(){
|
92 |
+
if ( !current_user_can( 'manage_options' ) ) {
|
93 |
+
wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
|
94 |
+
}
|
95 |
+
// variables for the field and option names
|
96 |
+
$accountId = 'revechat_accountid';
|
97 |
+
$trackingId = 'revechat_trackingid';
|
98 |
+
|
99 |
+
// Read in existing option value from database
|
100 |
+
$val_accountId = get_option( $accountId );
|
101 |
+
$val_trackingId = get_option( $trackingId );
|
102 |
+
|
103 |
+
if( isset($_POST[ $accountId ]) && isset($_POST[ $trackingId ] ) ){
|
104 |
+
|
105 |
+
// Read in existing option value from POST
|
106 |
+
$val_accountId = $_POST[ $accountId ];
|
107 |
+
$val_trackingId = $_POST[ $trackingId ];
|
108 |
+
update_option( $accountId , $val_accountId );
|
109 |
+
update_option( $trackingId , $val_trackingId );
|
110 |
+
?>
|
111 |
+
<div class="updated"><p><strong><?php _e('Settings saved.', 'revechat-menu' ); ?></strong></p></div>
|
112 |
+
<?php
|
113 |
+
}
|
114 |
+
?>
|
115 |
+
<div class="wrap">
|
116 |
+
<?php echo "<h2>" . __( 'ReveChat Plugin Settings', 'revechat-menu' ) . "</h2>"; ?>
|
117 |
+
<form name="form1" method="post" action="">
|
118 |
+
|
119 |
+
|
120 |
+
<p><?php _e("Account ID", 'revechat-menu' ); ?>
|
121 |
+
<input type="text" name="<?php echo $accountId; ?>" value="<?php echo $val_accountId; ?>" size="20">
|
122 |
+
</p><hr />
|
123 |
+
<p><?php _e("Tracking ID", 'revechat-menu' ); ?>
|
124 |
+
<input type="text" name="<?php echo $trackingId; ?>" value="<?php echo $val_trackingId; ?>" size="20">
|
125 |
+
</p><hr />
|
126 |
+
|
127 |
+
<p class="submit">
|
128 |
+
<input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />
|
129 |
+
</p>
|
130 |
+
|
131 |
+
</form>
|
132 |
+
</div>
|
133 |
+
|
134 |
+
<?php
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Deactivate the plugin
|
139 |
+
*/
|
140 |
+
public static function deactivate()
|
141 |
+
{
|
142 |
+
// Do nothing
|
143 |
+
} // END public static function deactivate
|
144 |
+
} // END class WP_Plugin_Revechat
|
145 |
+
} // END if(!class_exists('WP_Plugin_Revechat'))
|
146 |
+
$revechat = new WP_Plugin_Revechat ;
|
trunk/screenshot-1.png
ADDED
Binary file
|
trunk/screenshot-2.png
ADDED
Binary file
|
trunk/screenshot-3.png
ADDED
Binary file
|
trunk/screenshot-4.png
ADDED
Binary file
|