From bc4f532b9740945d5b155bcf2cd491ae2599acbc Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Sat, 7 Dec 2019 14:32:39 +0100 Subject: [PATCH] add support for vk.com social network --- bl-kernel/helpers/theme.class.php | 3 ++- bl-kernel/site.class.php | 6 ++++++ bl-kernel/user.class.php | 6 ++++++ bl-kernel/users.class.php | 3 ++- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/bl-kernel/helpers/theme.class.php b/bl-kernel/helpers/theme.class.php index c446d846..cf74099e 100644 --- a/bl-kernel/helpers/theme.class.php +++ b/bl-kernel/helpers/theme.class.php @@ -13,7 +13,8 @@ class Theme { 'instagram'=>'Instagram', 'codepen'=>'Codepen', 'linkedin'=>'Linkedin', - 'mastodon'=>'Mastodon' + 'mastodon'=>'Mastodon', + 'vk'=>'VK' ); foreach ($socialNetworks as $key=>$label) { diff --git a/bl-kernel/site.class.php b/bl-kernel/site.class.php index 7cc93e77..a42179f9 100644 --- a/bl-kernel/site.class.php +++ b/bl-kernel/site.class.php @@ -32,6 +32,7 @@ class Site extends dbJSON { 'linkedin'=> '', 'mastodon'=> '', 'dribbble'=> '', + 'vk'=> '', 'orderBy'=> 'date', // date or position 'extremeFriendly'=> true, 'autosaveInterval'=> 2, // minutes @@ -192,6 +193,11 @@ class Site extends dbJSON { return $this->getField('dribbble'); } + public function vk() + { + return $this->getField('vk'); + } + public function orderBy() { return $this->getField('orderBy'); diff --git a/bl-kernel/user.class.php b/bl-kernel/user.class.php index 75a6b746..0a50cc35 100644 --- a/bl-kernel/user.class.php +++ b/bl-kernel/user.class.php @@ -145,6 +145,11 @@ class User { return $this->getValue('mastodon'); } + public function vk() + { + return $this->getValue('vk'); + } + public function profilePicture() { $filename = $this->getValue('username').'.png'; @@ -169,6 +174,7 @@ class User { $tmp['gitlab'] = $this->gitlab(); $tmp['linkedin'] = $this->linkedin(); $tmp['mastodon'] = $this->mastodon(); + $tmp['vk'] = $this->vk(); $tmp['profilePicture'] = $this->profilePicture(); if ($returnsArray) { diff --git a/bl-kernel/users.class.php b/bl-kernel/users.class.php index b57899f9..1d9bd111 100644 --- a/bl-kernel/users.class.php +++ b/bl-kernel/users.class.php @@ -22,7 +22,8 @@ class Users extends dbJSON { 'github'=>'', 'gitlab'=>'', 'linkedin'=>'', - 'mastodon'=>'' + 'mastodon'=>'', + 'vk'=>'' ); function __construct()