From 93077d2647927f86262186c558cd8b4721bc2849 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Fri, 19 Mar 2021 16:01:38 -0300 Subject: [PATCH] add discord for social media --- bl-kernel/admin/views/edit-user.php | 7 +++++++ bl-kernel/admin/views/settings.php | 14 ++++++++++++++ bl-kernel/site.class.php | 12 ++++++++++++ bl-kernel/user.class.php | 6 ++++++ bl-kernel/users.class.php | 3 ++- 5 files changed, 41 insertions(+), 1 deletion(-) diff --git a/bl-kernel/admin/views/edit-user.php b/bl-kernel/admin/views/edit-user.php index 90090a2e..5e5805d0 100644 --- a/bl-kernel/admin/views/edit-user.php +++ b/bl-kernel/admin/views/edit-user.php @@ -406,6 +406,13 @@ 'data' => array('save' => 'true') )); + echo Bootstrap::formInputText(array( + 'name' => 'discord', + 'label' => 'Discord', + 'value' => $user->discord(), + 'data' => array('save' => 'true') + )); + echo Bootstrap::formInputText(array( 'name' => 'codepen', 'label' => 'CodePen', diff --git a/bl-kernel/admin/views/settings.php b/bl-kernel/admin/views/settings.php index d60044f7..d74309fe 100644 --- a/bl-kernel/admin/views/settings.php +++ b/bl-kernel/admin/views/settings.php @@ -409,6 +409,13 @@ $L->g('Social Networks'))); + echo Bootstrap::formInputText(array( + 'name' => 'youtube', + 'label' => 'YouTube', + 'value' => $site->youtube(), + 'data' => array('save' => 'true') + )); + echo Bootstrap::formInputText(array( 'name' => 'twitter', 'label' => 'Twitter', @@ -423,6 +430,13 @@ 'data' => array('save' => 'true') )); + echo Bootstrap::formInputText(array( + 'name' => 'discord', + 'label' => 'Discord', + 'value' => $site->discord(), + 'data' => array('save' => 'true') + )); + echo Bootstrap::formInputText(array( 'name' => 'codepen', 'label' => 'CodePen', diff --git a/bl-kernel/site.class.php b/bl-kernel/site.class.php index 11285f82..ebf8214f 100644 --- a/bl-kernel/site.class.php +++ b/bl-kernel/site.class.php @@ -34,6 +34,8 @@ class Site extends dbJSON { 'mastodon'=> '', 'dribbble'=> '', 'vk'=> '', + 'discord'=> '', + 'youtube'=> '', 'orderBy'=> 'date', // date or position 'extremeFriendly'=> true, 'autosaveInterval'=> 2, // minutes @@ -159,6 +161,16 @@ class Site extends dbJSON { return $this->getField('facebook'); } + public function discord() + { + return $this->getField('discord'); + } + + public function youtube() + { + return $this->getField('youtube'); + } + public function codepen() { return $this->getField('codepen'); diff --git a/bl-kernel/user.class.php b/bl-kernel/user.class.php index f1716de0..41a5d533 100644 --- a/bl-kernel/user.class.php +++ b/bl-kernel/user.class.php @@ -120,6 +120,11 @@ class User { return $this->getValue('facebook'); } + public function discord() + { + return $this->getValue('discord'); + } + public function codepen() { return $this->getValue('codepen'); @@ -179,6 +184,7 @@ class User { $tmp['youtube'] = $this->youtube(); $tmp['twitter'] = $this->twitter(); $tmp['facebook'] = $this->facebook(); + $tmp['discord'] = $this->discord(); $tmp['codepen'] = $this->codepen(); $tmp['instagram'] = $this->instagram(); $tmp['github'] = $this->github(); diff --git a/bl-kernel/users.class.php b/bl-kernel/users.class.php index 915a9395..1dccb232 100644 --- a/bl-kernel/users.class.php +++ b/bl-kernel/users.class.php @@ -24,7 +24,8 @@ class Users extends dbJSON { 'linkedin'=>'', 'mastodon'=>'', 'vk'=>'', - 'youtube'=>'' + 'youtube'=>'', + 'discord'=>'' ); function __construct()