From 40d77bba7b0f2b6d93ea045305201652351392d6 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Wed, 7 Sep 2022 15:07:40 +0700 Subject: [PATCH] add tawk to and example walled garden --- system/controllers/settings.php | 12 ++++++++++++ ui/ui/app-midtrans.tpl | 2 ++ ui/ui/app-settings.tpl | 12 ++++++++++++ ui/ui/app-tripay.tpl | 2 ++ ui/ui/app-xendit.tpl | 2 ++ ui/ui/register-otp.tpl | 15 +++++++++++++++ ui/ui/register-rotp.tpl | 15 +++++++++++++++ ui/ui/register.tpl | 15 +++++++++++++++ ui/ui/sections/user-footer.tpl | 28 ++++++++++++++++++++++------ ui/ui/user-dashboard.tpl | 1 - 10 files changed, 97 insertions(+), 7 deletions(-) diff --git a/system/controllers/settings.php b/system/controllers/settings.php index 74b5b16..7a7de6a 100644 --- a/system/controllers/settings.php +++ b/system/controllers/settings.php @@ -205,6 +205,7 @@ switch ($action) { $sms_url = _post('sms_url'); $wa_url = _post('wa_url'); $address = _post('address'); + $tawkto = _post('tawkto'); $payment_gateway = _post('payment_gateway'); if ($company == '') { r2(U . 'settings/app', 'e', $_L['All_field_is_required']); @@ -277,6 +278,17 @@ switch ($action) { $d->save(); } + $d = ORM::for_table('tbl_appconfig')->where('setting', 'tawkto')->find_one(); + if($d){ + $d->value = $tawkto; + $d->save(); + }else{ + $d = ORM::for_table('tbl_appconfig')->create(); + $d->setting = 'tawkto'; + $d->value = $tawkto; + $d->save(); + } + $note = _post('note'); $d = ORM::for_table('tbl_appconfig')->where('setting', 'note')->find_one(); $d->value = $note; diff --git a/ui/ui/app-midtrans.tpl b/ui/ui/app-midtrans.tpl index c3b7000..979f314 100644 --- a/ui/ui/app-midtrans.tpl +++ b/ui/ui/app-midtrans.tpl @@ -55,6 +55,8 @@ +
/ip hotspot walled-garden
+add dst-host=:^midtrans.com
diff --git a/ui/ui/app-settings.tpl b/ui/ui/app-settings.tpl index fec0905..479fce8 100644 --- a/ui/ui/app-settings.tpl +++ b/ui/ui/app-settings.tpl @@ -72,6 +72,18 @@ +
Tawk.to Chat Widget
+
+
+ +
+ +

From Direct Chat Link.

+
/ip hotspot walled-garden
+add dst-host=:^tawk.to
+
+
+
Invoice
diff --git a/ui/ui/app-tripay.tpl b/ui/ui/app-tripay.tpl index c2d2f10..371e3a9 100644 --- a/ui/ui/app-tripay.tpl +++ b/ui/ui/app-tripay.tpl @@ -44,6 +44,8 @@ Daftar Tripay
+
/ip hotspot walled-garden
+add dst-host=:^tripay.co.id
diff --git a/ui/ui/app-xendit.tpl b/ui/ui/app-xendit.tpl index a3f043a..769a2d4 100644 --- a/ui/ui/app-xendit.tpl +++ b/ui/ui/app-xendit.tpl @@ -41,6 +41,8 @@ +
/ip hotspot walled-garden
+add dst-host=:^xendit.co
diff --git a/ui/ui/register-otp.tpl b/ui/ui/register-otp.tpl index 07db896..1203520 100644 --- a/ui/ui/register-otp.tpl +++ b/ui/ui/register-otp.tpl @@ -101,6 +101,21 @@ +{if $_c['tawkto'] != ''} + + + +{/if} \ No newline at end of file diff --git a/ui/ui/register-rotp.tpl b/ui/ui/register-rotp.tpl index 8c23bd9..82efa6d 100644 --- a/ui/ui/register-rotp.tpl +++ b/ui/ui/register-rotp.tpl @@ -74,6 +74,21 @@ +{if $_c['tawkto'] != ''} + + + +{/if} \ No newline at end of file diff --git a/ui/ui/register.tpl b/ui/ui/register.tpl index c15f8d3..7d2fb2c 100644 --- a/ui/ui/register.tpl +++ b/ui/ui/register.tpl @@ -97,6 +97,21 @@ +{if $_c['tawkto'] != ''} + + + +{/if} \ No newline at end of file diff --git a/ui/ui/sections/user-footer.tpl b/ui/ui/sections/user-footer.tpl index 3e5fa2e..d2b6172 100644 --- a/ui/ui/sections/user-footer.tpl +++ b/ui/ui/sections/user-footer.tpl @@ -11,8 +11,8 @@
Fixed Header
@@ -20,8 +20,8 @@
Nav Full
@@ -55,10 +55,26 @@ - + {if isset($xfooter)} {$xfooter} {/if} - + +{if $_c['tawkto'] != ''} + + + +{/if} + \ No newline at end of file diff --git a/ui/ui/user-dashboard.tpl b/ui/ui/user-dashboard.tpl index d688016..128e91d 100644 --- a/ui/ui/user-dashboard.tpl +++ b/ui/ui/user-dashboard.tpl @@ -57,5 +57,4 @@ - {include file="sections/user-footer.tpl"}