Added option to hide share button

This commit is contained in:
Julian Prieber 2022-06-08 20:26:21 +02:00
parent 2dc76c5b22
commit 032162cdbf
2 changed files with 26 additions and 0 deletions

View File

@ -123,6 +123,26 @@
@endif
<?php ////begin share button//// ?>
@if(Config::get('meta.display_share_button') != '')
@if(Config::get('meta.display_share_button') == 'false')
<?php $ShowShrBtn = 'false'; ?>
@elseif(Config::get('meta.display_share_button') == 'user')
@if($littlelink_names = Auth::user()->littlelink_name)
<?php $ShowShrBtn = 'true'; ?>
@else
<?php $ShowShrBtn = 'false'; ?>
@endif
@else
<?php $ShowShrBtn = 'true'; ?>
@endif
@else
<?php $ShowShrBtn = 'true'; ?>
@endif
@if($ShowShrBtn == 'true')
<?php
//Get browser type
$arr_browsers = ["Opera", "Edg", "Chrome", "Safari", "Firefox", "MSIE", "Trident"];
@ -185,6 +205,8 @@ function get_operating_system() {
</span>
@endif
<script src="{{ asset('littlelink/js/share.button.js') }}"></script>
@endif
<?php ////end share button//// ?>
<div class="container">

View File

@ -71,6 +71,10 @@ return [
'littlelink_title' => '',
// Either "true", "false" or "auth".
// If "auth" is selected, the share button will only be shown to users on their own page.
'display_share_button' => 'true',
// Do not change here!
'analytics' => $analytics, // Set on top of page.