From 7caa81450caa068d8c03f2246999c7dcbf03ae80 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sat, 1 Feb 2020 20:49:35 +0100 Subject: [PATCH] [9.2.17] Youtube channel and user --- core/core.php | 7 ++----- core/module/config/config.php | 2 +- core/module/config/view/index/index.php | 12 ++++++------ 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/core/core.php b/core/core.php index 7b1e729f..7462ac10 100644 --- a/core/core.php +++ b/core/core.php @@ -2162,7 +2162,7 @@ class layout extends common { $socialUrl = 'https://www.youtube.com/channel/'; $title = 'Chaîne YouTube'; break; - case 'youtubeIdUser': + case 'youtubeUserId': $socialUrl = 'https://www.youtube.com/user/'; $title = 'YouTube'; break; @@ -2174,10 +2174,7 @@ class layout extends common { $socialUrl = ''; } if($socialId !== '') { - // - if ($socialName === 'youtubeIdUser') - {$socialName = 'youtubeId';} - $socials .= '' . template::ico(substr($socialName, 0, -2)) . ''; + $socials .= '' . template::ico(substr(str_replace('User','',$socialName), 0, -2)) . ''; } } if($socials !== '') { diff --git a/core/module/config/config.php b/core/module/config/config.php index ad34ac6e..eeea656c 100755 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -301,7 +301,7 @@ class config extends common { 'pinterestId' => $this->getInput('configSocialPinterestId'), 'twitterId' => $this->getInput('configSocialTwitterId'), 'youtubeId' => $this->getInput('configSocialYoutubeId'), - 'youtubeIdUser' => $this->getInput('configSocialYoutubeIdUser'), + 'youtubeUserId' => $this->getInput('configSocialYoutubeUserId'), 'githubId' => $this->getInput('configSocialGithubId') ], 'timezone' => $this->getInput('configTimezone', helper::FILTER_STRING_SHORT, true), diff --git a/core/module/config/view/index/index.php b/core/module/config/view/index/index.php index f962ceb8..149f0d35 100755 --- a/core/module/config/view/index/index.php +++ b/core/module/config/view/index/index.php @@ -125,16 +125,16 @@
'Saisissez votre ID Channel: https://www.youtube.com/channel/[ID].', - 'label' => 'Youtube Channel', + 'help' => 'ID de la chaîne : https://www.youtube.com/channel/[ID].', + 'label' => 'Chaîne Youtube', 'value' => $this->getData(['config', 'social', 'youtubeId']) ]); ?>
- 'Saisissez votre ID User : https://www.youtube.com/user/[ID].', - 'label' => 'Youtube User', - 'value' => $this->getData(['config', 'social', 'youtubeIdUser']) + 'Saisissez votre ID Utilisateur : https://www.youtube.com/user/[ID].', + 'label' => 'Youtube', + 'value' => $this->getData(['config', 'social', 'youtubeUserId']) ]); ?>