first commit

This commit is contained in:
2024-11-10 21:08:49 +01:00
commit 0d932ce5ee
14455 changed files with 2567501 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,275 @@
.ztb-wrapper{
background: url("../images/bg_body.png") repeat fixed 30% 70% rgba(0, 0, 0, 0);
float: left;
height: 100%;
min-height: 600px;
min-width: 970px;
width: 100%;
}
div#message{
margin:10px 0 0;
}
.ztb-code-wrapper{
background-color: white;
margin-top: 10px;
padding: 0 50px;
text-align: center;
width: 600px;
min-height: 200px;
height: auto;
}
.ztb-title {
float: left;
font-size: 18px;
line-height: 30px;
margin-bottom: 25px;
margin-top: 65px;
text-align: center;
width: 100%;
}
.ztb-logo {
height: 70px;
line-height: 70px;
text-align: center;
width: 600px;
padding: 0 50px;
}
.ztb-logo img{
width: 130px;
}
.ztb-logo a{
display: inline-block;
line-height: 100px;
}
.ztb-button {
display: block;
height: 60px;
line-height: 60px;
margin-bottom: 30px;
float: left;
width: 100%;
}
.ztb-button a{
background-color: #196cca;
border: medium none;
border-radius: 5px;
color: #fff;
cursor: pointer;
display: inline-block;
font-size: 17px;
height: 40px;
line-height: 40px;
padding: 0 25px;
position: relative;
text-decoration: none;
width: auto;
border-radius: 100px;
-moz-border-radius: 100px;
-webkit-border-radius: 100px;
}
.ztb-button a:hover{
background-color: #0066CC;
color: #fff;
}
.ztb-button a:focus{
box-shadow: none;
}
.ztb-button .disconect-ztb-wrapper{
float: left;
display: block;
text-align: center;
padding: 0;
width: 100%;
height: 20px;
line-height: 20px;
margin-bottom: 20px;
}
.ztb-button .disconect-ztb-wrapper span{
float: left;
text-align: right;
width: 55%;
}
.ztb-button #disconnect-ztb{
background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
color: #9e9e9e;
display: inline-block;
float: none;
font-size: 14px;
height: 20px;
line-height: 20px;
padding: 0;
text-decoration: underline;
width: auto;
}
.ztb-button #disconnect-ztb:hover{
color: black;
}
.ztb-source{
background-color: #fef9cf;
font-family: "Lucida Console","Lucida Sans Typewriter",Monaco,"Bitstream Vera Sans Mono",monospace;
font-size: 12px;
width: 100%;
padding: 10px;
height: 140px;
}
.insert-code-wrapper {
display: inline-block;
padding-top: 20px;
text-align: center;
min-width: 60%;
float: left;
width: 100%;
}
.insert-code-wrapper span{
float: left;
font-size: 14px;
line-height: 14px;
}
.insert-code-wrapper .insert-code-content{
margin-right: 0;
float: left;
width: 100%;
margin-top: 0;
}
.insert-code-wrapper .insert-code{
margin-top: 15px;
color: #ffffff;
font-family: open-sans-bold;
font-weight: normal;
padding: 10px 40px;
text-transform: uppercase;
background-color: #e03a3a;
border: medium none;
border-radius: 5px;
box-shadow: 0 1px 0 #e03a3a inset, 0 2px 0 0 #bc2425, 0 3px 2px #999;
color: #fff;
cursor: pointer;
font-family: "Open-Sans-Semibold",sans-serif;
font-size: 14px;
font-weight: bold;
padding: 10px 20px;
position: relative;
text-decoration: none;
text-shadow: 0 1px 0 #a61b1b;
-moz-user-select: none;
background-image: none;
text-align: center;
vertical-align: middle;
white-space: nowrap;
line-height: 1.42857;
margin-bottom: 50px;
display: inline-block;
width: 90px;
height: 40px;
}
.insert-code-wrapper .insert-code:hover{
background-color: #f24444;
box-shadow: 0 1px 0 #e03a3a inset, 0 2px 0 0 #bc2425, 0 3px 2px #999;
border: medium none;
}
.insert-code-content{
display: none;
}
.success-message{
background-color: #aace3b;
color: #fff;
display: inline-block;
font-weight: bold;
height: 20px;
line-height: 20px;
margin-bottom: 15px;
margin-top: 7px;
padding: 10px;
display: none;
}
#button-open-insert-code{
float: left;
margin-bottom: 20px;
margin-right: 5px;
font-size: 14px;
line-height: 14px;
}
.check-actived{
background: rgba(0, 0, 0, 0) url("../images/check.png") no-repeat scroll left 0 top -2px / 17px 17px;
float: left;
height: 17px;
margin-left: 2px;
margin-right: 0;
width: 17px;
}
.ztb-register-form .ztb-submit-button{
background-color: #196cca;
border: medium none;
border-radius: 5px;
color: #fff;
cursor: pointer;
display: inline-block;
font-size: 17px;
height: 40px;
line-height: 40px;
padding: 0 25px;
position: relative;
text-decoration: none;
width: auto;
border-radius: 100px;
-moz-border-radius: 100px;
-webkit-border-radius: 100px;
margin-top: 15px;
float: none;
margin: 0 auto;
}
.ztb-register-form label{
float: left;
width: 200px;
text-align: right;
padding-right: 10px;
line-height: 40px;
font-size: 16px;
}
.ztb-register-form .form-control{
height: 40px;
margin-bottom: 15px;
min-width: 200px;
float: left;
}
.button-wrapper{
display: inline-block;
width: 100%;
}
.progress-bar-strip {
-webkit-animation: progress 1s linear infinite !important;
-moz-animation: progress 1s linear infinite !important;
animation: progress 1s linear infinite !important;
background-repeat: repeat !important;
background-position: center center;
background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.35) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0.35) 75%, transparent 75%, transparent) !important;
background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.35) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0.35) 75%, transparent 75%, transparent) !important;
background-size: 32px 32px;
}
@-webkit-keyframes progress {
from {
background-position: 0px 0
}
to {
background-position: 30px 0
}
}
@-moz-keyframes progress {
from {
background-position: 0px 0
}
to {
background-position: 30px 0
}
}
@keyframes progress {
from {
background-position: 0px 0
}
to {
background-position: 30px 0
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@@ -0,0 +1,44 @@
jQuery(window).ready(function(){
jQuery('#connect-ztb, [zb-plugin="zb_fbc"]').click(function(){
setTimeout(function(){
checkToken();
},3000);
});
function checkToken(){
jQuery.ajax({
type: "POST",
url: ZTB_BASE_URL+'/customer/access/checkAuth?callback=?',
data: {type:'check auth'},
xhrFields: {
withCredentials: true
},
dataType: "jsonp",
success: function(response){
if(response.auth == true){
jQuery.ajax({
type: "POST",
url: ZBT_WP_ADMIN_URL+'admin-ajax.php?action=update_zb_fbc_code',
data: {
domain:response.domain,
access:response.access,
customer:response.customer,
email:response.email,
token:response.token,
},
success: function(response){
location.reload();
}
});
}else{
setTimeout(function(){
checkToken();
},3000);
}
}
});
}
});

View File

@@ -0,0 +1,222 @@
<?php
/*
/**
* Plugin Name: FB Messenger Live Chat
* Plugin URI: https://zotabox.com/zbv2/facebookchat?utm_source=wordpress.com&utm_medium=Facebook%20Live%20Chat&utm_campaign=ecommerce%20plugins&authuser=anonymous
* Description: Support your customers via Facebook Live Chat conveniently from your own website. 10+ more popular marketing tools also included.
* Version: 1.5.0
* Author: Zotabox
* Author URI: https://zotabox.com/dashboard/?utm_source=wordpress.com&utm_medium=Facebook Live Chat&utm_campaign=ecommerce%20plugins&authuser=anonymous
* License: SMB 1.0
*/
//Add some free tools
add_action( 'admin_init', 'zb_fbc_admin_init' );
function zb_fbc_admin_init(){
/* Register stylesheet. */
wp_register_style( 'css_main', plugins_url('assets/css/style.css', __FILE__) );
wp_enqueue_style('css_main');
/* Register js. */
wp_register_script( 'zb_fbc_admin_init', plugins_url('assets/js/main.js?v='.time(), __FILE__) );
wp_enqueue_script('zb_fbc_admin_init');
//Create options
add_option( 'ztb_source', '', '', 'yes' );
add_option( 'ztb_id', '', '', 'yes' );
add_option( 'ztb_domainid', '', '', 'yes' );
add_option( 'ztb_email', '', '', 'yes' );
add_option( 'access_key', '', '', 'yes' );
add_option( 'ztb_access_key', '', '', 'yes' );
add_option( 'ztb_status_message', 1, '', 'yes' );
add_option( 'ztb_status_disconnect', 2, '', 'yes' );
}
register_deactivation_hook( __FILE__, 'zb_fbc_deactivate' );
function zb_fbc_deactivate(){
update_option( 'ztb_status_message', 2 );
update_option( 'ztb_status_disconnect', 1 );
}
register_activation_hook( __FILE__, 'zb_fbc_activate' );
function zb_fbc_activate() {
update_option( 'ztb_status_message', 1 );
}
add_action('admin_notices', 'zb_fbc_show_admin_messages');
function zb_fbc_show_admin_messages()
{
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
$domain_action = 'https://zotabox.com';
$token_key = get_option( 'ztb_token_key', '' );
$public_key = get_option( 'access_key', '' );
$ztb_status_message = get_option( 'ztb_status_message', '' );
$ztb_status_disconnect = get_option( 'ztb_status_disconnect', '' );
$ztb_id = get_option( 'ztb_id', '' );
$message_intall = '<div id="message" class="updated fade">
<p>Thanks for installing <strong>Zotabox plugin!</strong>
<a href="/wp-admin/admin.php?page=zb_fbc">
<strong>Click to configure.</strong></a></p>
</div>';
$message_disconnect = '<div id="message" class="updated fade">
<p>Disconnected from <strong>Zotabox </strong>successfully! </p>
</div>';
if ( is_plugin_active( 'fb-messenger-live-chat/fb-messenger-live-chat.php') ) {
if($ztb_status_message == 1){
echo $message_intall;
if($ztb_status_message == 1){
update_option( 'ztb_status_message', 2 );
}
}
}
}
add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), 'zb_fbc_add_action_links' );
function zb_fbc_add_action_links ( $links ) {
$mylinks = array(
'<a href="' . admin_url( 'admin.php?page=zb_fbc' ) . '">Settings</a>',
);
return array_merge( $links, $mylinks );
}
add_action('admin_menu', 'zb_fbc_admin_menu');
function zb_fbc_admin_menu() {
add_menu_page('FB Messenger Live Chat', 'FB Live Chat', 'administrator', 'zb_fbc', 'zb_fbc_setting',plugins_url( 'zotabox.png', __FILE__ ));
}
function zb_fbc_setting(){
$domain_action = 'https://zotabox.com';
$token_key = wp_create_nonce('update_zb_fbc_code');
$access_key = get_option( 'ztb_access_key', '' );
if(empty($access_key)){
$access_key = get_option( 'access_key', '' );
}
$ztb_id = get_option( 'ztb_id', '' );
$domain = get_option('ztb_domainid','');
$zbEmail = get_option('ztb_email','');
$ztb_source = get_option('ztb_source','');
$button = '';
$adminEmail = get_option('admin_email');
//Check empty ztb email
if(empty($zbEmail)){
$zbEmail = $adminEmail;
}
global $current_user;
wp_get_current_user();
$ztb_status_disconnect = get_option( 'ztb_status_disconnect', '' );
$connected = 2;
if(isset($access_key) && !empty($access_key) && strlen($access_key) > 0 && $ztb_status_disconnect == $connected){
$button = '<a target="zotabox" href="'.$domain_action.'/customer/access/PluginLogin/?customer='.$ztb_id.'&access='.$access_key.'&domain_secure_id='.$domain.'&app=fbc&platform=wordpress&utm_source=wordpress.com">
Configure your tools
</a>';
$form = '';
}else{
$form = '<form class="ztb-register-form" target="_blank" method="POST" action="'.$domain_action.'/customer/access/PluginAuth?app=fbc&utm_source=wordpress.com&utm_medium=Facebook Live Chat&utm_campaign=ecommerce%20plugins&token='.$token_key.'&platform=wordpress&access='.$access_key.'" id="account-info">
<div class="form-group">
<label>Website:</label>
<input class="form-control" readonly type="text" name="domain" value="'.home_url().'" />
<input type="hidden" name="name" value="'.$current_user->display_name.'" />
<input type="hidden" name="utm_medium" value="Facebook Live Chat" />
<input type="hidden" name="utm_campaign" value="ecommerce plugins" />
</div>
<div class="form-group">
<label>Email:</label>
<input class="form-control" type="text" name="email" value="'.$zbEmail.'" />
</div>
<div class="form-group button-wrapper">
<input zb-plugin="zb_fbc" class="ztb-submit-button" type="submit" value="Start Using Your New Tools Now" /><br><br>
<div style="width: 80%;margin: auto;color: #888; padding-top: 10px;"><strong>Note:</strong> Zotabox is a 3rd party service provider. A Zotabox account will be created automatically and you can delete it at any time.<br><br>
You will receive important account, informational and promotional emails from us and remarketing ads via Google Adwords. For information to opt out of these ads and emails at any time, please visit <a href="https://info.zotabox.com/privacy-policy/" target="_blank">our privacy page</a>.
</div>
</div>
</form>';
$button = '';
}
$html = '
<script type="text/javascript">
var ZBT_WP_ADMIN_URL = "'.admin_url().'";
var ZTB_BASE_URL = "'.$domain_action.'";
</script>
<div class="ztb-wrapper">
<div class="ztb-logo">
<a href="https://zotabox.com/dashboard/?utm_source=wordpress.com&utm_medium=Facebook Live Chat&utm_campaign=ecommerce%20plugins&authuser=anonymous" title="Zotabox" target="zotabox">
<img title="Zotabox" alt="Zotabox" src="'.plugins_url( 'assets/images/logo-zotabox.png', __FILE__ ).'">
</a>
</div>
<div class="ztb-code-wrapper wrap">
<div class="ztb-title">
Zotabox includes 20+ Promotional Sales tools to grow your websites traffic, boost your sales and get more subscribers.
</div>
<div class="account-input">
'.$form.'
</div>
<div class="ztb-button">'.$button.'</div>
<div style="clear:both"></div>
</div>
</div>';
echo $html;
}
function insert_zb_fbc_code(){
if(!is_admin()){
$domain = get_option( 'ztb_domainid', '' );
$ztb_source = get_option('ztb_source','');
$ztb_status_disconnect = get_option('ztb_status_disconnect','');
$connected = 2;
if(!empty($domain) && strlen($domain) > 0 && $ztb_status_disconnect == $connected){
print_r(html_entity_decode(print_zb_fbc_code($domain)));
}
}
}
add_action( 'wp_head', 'insert_zb_fbc_code' );
add_action("wp_ajax_update_zb_fbc_code", "update_zb_fbc_code");
add_action("wp_ajax_nopriv_update_zb_fbc_code", "update_zb_fbc_code");
function update_zb_fbc_code(){
if(isset($_REQUEST['token']) && wp_verify_nonce($_REQUEST['token'], 'update_zb_fbc_code')){
$domain = sanitize_text_field(addslashes($_REQUEST['domain']));
$public_key = sanitize_text_field(addslashes($_REQUEST['access']));
$token = sanitize_text_field(addslashes($_REQUEST['token']));
$id = intval($_REQUEST['customer']);
if(!isset($domain) || empty($domain)){
$redirect = admin_url('admin.php?page=zb_fbc');
wp_safe_redirect($redirect);
}else{
if(wp_verify_nonce($_REQUEST['token'], 'update_zb_fbc_code')){
update_option( 'ztb_domainid', $domain );
update_option( 'ztb_access_key', $public_key );
update_option( 'ztb_id', $id );
update_option( 'ztb_status_disconnect', 2 );
wp_send_json( array(
'error' => false,
'message' => 'Update Zotabox embedded code successful !'
)
);
}else{
wp_send_json( array(
'error' => true,
'message' => 'Wrong nonce!'
)
);
}
}
}
}
function print_zb_fbc_code($domainSecureID = "", $isHtml = false) {
$ds1 = substr($domainSecureID, 0, 1);
$ds2 = substr($domainSecureID, 1, 1);
$baseUrl = '//static.zotabox.com';
$code = <<<STRING
<script async src="{$baseUrl}/{$ds1}/{$ds2}/{$domainSecureID}/widgets.js"></script>
STRING;
return $code;
}
?>

View File

@@ -0,0 +1,149 @@
=== Live Chat with Messenger Customer Chat ===
Contributors: Zotabox
Donate link:
Tags: live chat, messenger, help desk, customer support, facebook
Requires at least: 3.0.1
Tested up to: 5.3
Stable tag: trunk
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Support your customers via <strong>Facebook Messenger Live Chat</strong> conveniently from your own website.
== Description ==
+ Support your customers via Facebook Live Chat.
+ Facebook Messenger has over 1 billion active monthly users
+ Permanent chat history available for both store owner and customer
Zotabox is a premium plugin with a 30 day free trial (no credit card req'd) and a 30 day money back guarantee for our package of 20+ promotional sales tools.
<a href="https://info.zotabox.com/?utm_source=Wordpress&utm_medium=App&utm_campaign=Wordpress">Zotabox</a> is an easy to use package of 20+ promotional sales tools for your website.
<h4><b>YOUR ZOTABOX PACKAGE INCLUDES:</b></h4>
+ Easy Popup to promote your specials and increase your subscribers with custom images, timers and coupons
+ Header Bar to promote your specials and increase your subscribers. Countdown timer and coupons included.
+ Landing Page Builder - create new landing pages with ease
+ Slider - slide out box to promote specials, video, collect emails etc.
+ Push Notifications - collect subscribers and send out push notifications
+ Contact Form Builder customize fields, departments, attach files, auto-response etc.
+ Facebook Live Chat Support your customers via Facebook
+ Social Buttons encourage followers to join your site
+ Easy Store Locator make it easy for your customers to find you
+ Testimonial have your customers promote for you
+ Social Review - automatically display your latest facebook or google reviews
+ Notification Box fade in notification boxes to promote your products
+ Stickers promote latest news, new arrivals, blogs etc
+ Promo Box to promote sales, products, new arrivals
+ Easy Banner upload your custom image and link to any page
+ Social Mobile Tools so customers can contact you on mobile
+ EU Cookie Notification - ask EU visitors to accept cookies
+ Back to Top Buttons enhanced, stylish back to top buttons
<h4><b>Extra Features:</b></h4>
+ Zotabox is integrated with 20+ email service providers including Mailchimp, Constant Contact, Aweber, Get Response & Campaign Monitor etc.
+ Zotabox is also integrated with 20 + social accounts including Facebook, Twitter, Google Plus, Youtube, Instagram, Pinterest, Linked In etc.
+ Add countdown timers, custom images, coupons, email capture fields to tools
+ Loads asynchronously. Wont slow down your website.
+ No coding needed. Fully customizable.
+ Google Analytics and Facebook Pixel Integration
+ Custom CSS and Custom HTML available
+ User-friendly and responsive design.
+ Mobile friendly
<h4><b>Targeting Rules Include:</b></h4>
+ Display on Certain Pages
+ Time on Site
+ Scroll Down Page
+ Minimum Screen Size
+ Exit Intent (for some tools)
+ New, Returning Visitor
+ Set Display/Expire Date
+ Geo Targeting
<h4><b>Premium Plans:</b></h4>
<strong>Starter</strong> - 3,000 customer visits per month. $9.99/month. Premium versions of all tools.
<strong>Express</strong> - 15,000 customer visits per month. $19.99/month. Premium versions of all tools. Premium versions of all tools.
<strong>Platinum</strong> - 150,000 customer visits per month - $49.99/month.
All Plans include: multiple websites, multiple tools on same website, no branding, email service integration, custom CSS, custom images, google analytics integration etc.
Guarantee: Get your first payment back if you do not increase your sales in 30 days.
Custom Plans also available.
See our <a href="https://zotabox.com/membership/pricing">full pricing plan here</a>.
<h4><b>ABOUT ZOTABOX</b></h4>
Zotabox is based in Hanoi, Vietnam. We have built high quality website marketing tools to increase your sales since 2013. Zotabox includes 20+ onsite tools to boost your sales and get more subscribers.
<strong>Note:</strong> Zotabox is a 3rd party service provider. A Zotabox account will be created automatically and you can delete it at any time.
You will receive important account, informational and promotional emails from us and remarketing ads via Google Adwords. For information to opt out of these ads and emails at any time, please visit <a href="https://info.zotabox.com/privacy-policy/" target="_blank">our privacy page</a>.
== Installation ==
For an automatic installation through WordPress:
<ol>
<li>Go to the 'Add New' plugins screen in your WordPress admin area</li>
<li>Search for 'Zotabox Facebook Live Chat'</li>
<li>Click 'Install Now' and activate the plugin</li>
</ol>
To upload the plugin through WordPress, instead of FTP:
<ol>
<li>Go to the 'Add New' plugins screen in your WordPress admin area</li>
<li>Upload the downloaded zip file and activate.</li>
</ol>
For a manual installation via FTP:
<ol>
<li>Upload the facebook-messenger-live-chat folder to the /wp-content/plugins/ directory</li>
<li>Activate the plugin through the 'Plugins' screen in your WordPress admin area</li>
</ol>
(*) Note: If the tool does not display after turning ON, please try to install Zotabox code manually follow these instructions:
http://info.zotabox.com/wordpress-woocommerce-embed-code-instructions/
== Frequently asked questions ==
= A question that someone might have =
An answer to that question.
== Screenshots ==
1. Facebook Live Chat Settings
2. Zotabox Dashboard
== Changelog ==
<strong>v1.1.4</strong>
<ul>
<li>Integrate with Social Mobile Bar</li>
<li>Support auto-open chat box</li>
</ul>
<strong>v1.0.9</strong>
<ul>
<li>Release FB Live Chat for mobile</li>
<li>Improve sign up process</li>
</ul>
<strong>v1.0</strong>
<ul>
<li>Plugin release</li>
</ul>
== Upgrade notice ==
*** Note ***
== Arbitrary section 1 ==

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB