From 3e17e26028009a64c3d175757e8dfd0f2c5e7f9a Mon Sep 17 00:00:00 2001 From: Prof Langues Date: Fri, 31 Jan 2020 12:19:13 +0100 Subject: [PATCH 1/2] Deux comptes youtube WIP --- core/core.php | 9 ++++- core/module/config/config.php | 1 + core/module/config/view/index/index.php | 46 +++++++++++++++---------- 3 files changed, 36 insertions(+), 20 deletions(-) diff --git a/core/core.php b/core/core.php index e69b0fa1..7b1e729f 100644 --- a/core/core.php +++ b/core/core.php @@ -2160,8 +2160,12 @@ class layout extends common { break; case 'youtubeId': $socialUrl = 'https://www.youtube.com/channel/'; - $title = 'YouTube'; + $title = 'Chaîne YouTube'; break; + case 'youtubeIdUser': + $socialUrl = 'https://www.youtube.com/user/'; + $title = 'YouTube'; + break; case 'githubId': $socialUrl = 'https://www.github.com/'; $title = 'Github'; @@ -2170,6 +2174,9 @@ class layout extends common { $socialUrl = ''; } if($socialId !== '') { + // + if ($socialName === 'youtubeIdUser') + {$socialName = 'youtubeId';} $socials .= '' . template::ico(substr($socialName, 0, -2)) . ''; } } diff --git a/core/module/config/config.php b/core/module/config/config.php index 7b95c2cc..ad34ac6e 100755 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -301,6 +301,7 @@ class config extends common { 'pinterestId' => $this->getInput('configSocialPinterestId'), 'twitterId' => $this->getInput('configSocialTwitterId'), 'youtubeId' => $this->getInput('configSocialYoutubeId'), + 'youtubeIdUser' => $this->getInput('configSocialYoutubeIdUser'), '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 35ed1696..f962ceb8 100755 --- a/core/module/config/view/index/index.php +++ b/core/module/config/view/index/index.php @@ -114,22 +114,29 @@ 'value' => $this->getData(['config', 'social', 'instagramId']) ]); ?> -
- 'Saisissez votre ID : https://www.youtube.com/channel/[ID].', - 'label' => 'Youtube', - 'value' => $this->getData(['config', 'social', 'youtubeId']) - ]); ?> -
- -
'Saisissez votre ID : https://twitter.com/[ID].', 'label' => 'Twitter', 'value' => $this->getData(['config', 'social', 'twitterId']) ]); ?> -
+
+ +
+
+ 'Saisissez votre ID Channel: https://www.youtube.com/channel/[ID].', + 'label' => 'Youtube Channel', + '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 : https://pinterest.com/[ID].', @@ -137,21 +144,22 @@ 'value' => $this->getData(['config', 'social', 'pinterestId']) ]); ?>
+ +
+
+
+ 'Saisissez votre ID Github : https://github.com/[ID].', + 'label' => 'Github', + 'value' => $this->getData(['config', 'social', 'githubId']) + ]); ?> +
'Saisissez votre ID Linkedin : https://fr.linkedin.com/in/[ID].', 'label' => 'Linkedin', 'value' => $this->getData(['config', 'social', 'linkedinId']) ]); ?> -
-
-
-
- 'Saisissez votre ID Github : https://github.com/[ID].', - 'label' => 'Github', - 'value' => $this->getData(['config', 'social', 'githubId']) - ]); ?>
From 7caa81450caa068d8c03f2246999c7dcbf03ae80 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sat, 1 Feb 2020 20:49:35 +0100 Subject: [PATCH 2/2] [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']) ]); ?>