fix Tawk.to
This commit is contained in:
parent
b28b40280f
commit
7f35e7fb68
@ -26,6 +26,15 @@ class User
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static function getTawkToHash($email)
|
||||
{
|
||||
global $config;
|
||||
if (!empty($config['tawkto_api_key']) && !Empty($email)) {
|
||||
return hash_hmac('sha256', $email, $config['tawkto_api_key']);
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
public static function getBills($id = 0)
|
||||
{
|
||||
if (!$id) {
|
||||
|
@ -845,5 +845,6 @@
|
||||
"Enable_CSRF_Validation": "Aktifkan Validasi CSRF",
|
||||
"Cross_site_request_forgery": "Pemalsuan permintaan lintas situs",
|
||||
"Forgot_Password": "Lupa Kata Sandi",
|
||||
"Validity_Periode": "Periode Validitas"
|
||||
"Validity_Periode": "Periode Validitas",
|
||||
"Transaction_History_List": "Daftar Riwayat Transaksi"
|
||||
}
|
@ -105,9 +105,7 @@
|
||||
placeholder="{Lang::T('Cash')}, {Lang::T('Bank Transfer')}">
|
||||
</div>
|
||||
<p class="help-block col-md-4">
|
||||
{Lang::T('This used for admin to select payment in recharge, using comma for
|
||||
every new
|
||||
options')}
|
||||
{Lang::T('This used for admin to select payment in recharge, using comma for every new options')}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@ -844,6 +842,13 @@
|
||||
</div>
|
||||
<p class="help-block col-md-4">{Lang::T('From Direct Chat Link.')}</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">Tawk.to Javascript API key</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="tawkto_api_key" name="tawkto_api_key" value="{$_c['tawkto_api_key']}"
|
||||
placeholder="39e52264cxxxxxxxxxxxxxdd078af5342e8">
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-2"></label>
|
||||
<p class="col-md-6 help-block">/ip hotspot walled-garden<br>
|
||||
add dst-host=tawk.to<br>
|
||||
|
@ -59,31 +59,23 @@
|
||||
var isLoggedIn = false;
|
||||
var Tawk_API = {
|
||||
onLoad: function() {
|
||||
if (!isLoggedIn) {
|
||||
isLoggedIn = true;
|
||||
window.Tawk_API.login({
|
||||
name: '{$_user['fullname']}',
|
||||
email: '{$_user['email']}',
|
||||
userId: '{$_user['id']}'
|
||||
}, function(error) {
|
||||
//do something if there's an error
|
||||
});
|
||||
}
|
||||
Tawk_API.setAttributes({
|
||||
'id' : '{$_user['id']}',
|
||||
'username' : '{$_user['username']}',
|
||||
'service_type' : '{$_user['service_type']}',
|
||||
'balance' : '{$_user['balance']}',
|
||||
'account_type' : '{$_user['account_type']}',
|
||||
'phone' : '{$_user['phonenumber']}'
|
||||
}, function(error) {});
|
||||
Tawk_API.setAttributes({
|
||||
'username' : '{$_user['username']}',
|
||||
'service' : '{$_user['service_type']}',
|
||||
'balance' : '{$_user['balance']}',
|
||||
'account' : '{$_user['account_type']}',
|
||||
'phone' : '{$_user['phonenumber']}'
|
||||
}, function(error) {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
var Tawk_LoadStart = new Date();
|
||||
Tawk_API.visitor = {
|
||||
name : '{$_user['fullname']}',
|
||||
email : '{$_user['email']}',
|
||||
userId: '{$_user['id']}'
|
||||
name: '{$_user['fullname']}',
|
||||
email: '{$_user['email']}',
|
||||
phone: '{$_user['phonenumber']}'
|
||||
};
|
||||
(function() {
|
||||
var s1 = document.createElement("script"),
|
||||
|
@ -1,3 +1,3 @@
|
||||
{
|
||||
"version": "2024.11.4"
|
||||
"version": "2024.11.5"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user