Deux comptes youtube WIP

This commit is contained in:
Prof Langues 2020-01-31 12:19:13 +01:00
parent 09d9ae219c
commit 3e17e26028
3 changed files with 36 additions and 20 deletions

View File

@ -2160,8 +2160,12 @@ class layout extends common {
break; break;
case 'youtubeId': case 'youtubeId':
$socialUrl = 'https://www.youtube.com/channel/'; $socialUrl = 'https://www.youtube.com/channel/';
$title = 'YouTube'; $title = 'Chaîne YouTube';
break; break;
case 'youtubeIdUser':
$socialUrl = 'https://www.youtube.com/user/';
$title = 'YouTube';
break;
case 'githubId': case 'githubId':
$socialUrl = 'https://www.github.com/'; $socialUrl = 'https://www.github.com/';
$title = 'Github'; $title = 'Github';
@ -2170,6 +2174,9 @@ class layout extends common {
$socialUrl = ''; $socialUrl = '';
} }
if($socialId !== '') { if($socialId !== '') {
//
if ($socialName === 'youtubeIdUser')
{$socialName = 'youtubeId';}
$socials .= '<a href="' . $socialUrl . $socialId . '" onclick="window.open(this.href);return false" data-tippy-content="' . $title . '">' . template::ico(substr($socialName, 0, -2)) . '</a>'; $socials .= '<a href="' . $socialUrl . $socialId . '" onclick="window.open(this.href);return false" data-tippy-content="' . $title . '">' . template::ico(substr($socialName, 0, -2)) . '</a>';
} }
} }

View File

@ -301,6 +301,7 @@ class config extends common {
'pinterestId' => $this->getInput('configSocialPinterestId'), 'pinterestId' => $this->getInput('configSocialPinterestId'),
'twitterId' => $this->getInput('configSocialTwitterId'), 'twitterId' => $this->getInput('configSocialTwitterId'),
'youtubeId' => $this->getInput('configSocialYoutubeId'), 'youtubeId' => $this->getInput('configSocialYoutubeId'),
'youtubeIdUser' => $this->getInput('configSocialYoutubeIdUser'),
'githubId' => $this->getInput('configSocialGithubId') 'githubId' => $this->getInput('configSocialGithubId')
], ],
'timezone' => $this->getInput('configTimezone', helper::FILTER_STRING_SHORT, true), 'timezone' => $this->getInput('configTimezone', helper::FILTER_STRING_SHORT, true),

View File

@ -114,22 +114,29 @@
'value' => $this->getData(['config', 'social', 'instagramId']) 'value' => $this->getData(['config', 'social', 'instagramId'])
]); ?> ]); ?>
</div> </div>
<div class="col4">
<?php echo template::text('configSocialYoutubeId', [
'help' => 'Saisissez votre ID : https://www.youtube.com/channel/[ID].',
'label' => 'Youtube',
'value' => $this->getData(['config', 'social', 'youtubeId'])
]); ?>
</div>
</div>
<div class="row">
<div class="col4"> <div class="col4">
<?php echo template::text('configSocialTwitterId', [ <?php echo template::text('configSocialTwitterId', [
'help' => 'Saisissez votre ID : https://twitter.com/[ID].', 'help' => 'Saisissez votre ID : https://twitter.com/[ID].',
'label' => 'Twitter', 'label' => 'Twitter',
'value' => $this->getData(['config', 'social', 'twitterId']) 'value' => $this->getData(['config', 'social', 'twitterId'])
]); ?> ]); ?>
</div> </div>
</div>
<div class="row">
<div class="col4">
<?php echo template::text('configSocialYoutubeId', [
'help' => 'Saisissez votre ID Channel: https://www.youtube.com/channel/[ID].',
'label' => 'Youtube Channel',
'value' => $this->getData(['config', 'social', 'youtubeId'])
]); ?>
</div>
<div class="col4">
<?php echo template::text('configSocialYoutubeIdUser', [
'help' => 'Saisissez votre ID User : https://www.youtube.com/user/[ID].',
'label' => 'Youtube User',
'value' => $this->getData(['config', 'social', 'youtubeIdUser'])
]); ?>
</div>
<div class="col4"> <div class="col4">
<?php echo template::text('configSocialPinterestId', [ <?php echo template::text('configSocialPinterestId', [
'help' => 'Saisissez votre ID : https://pinterest.com/[ID].', 'help' => 'Saisissez votre ID : https://pinterest.com/[ID].',
@ -137,21 +144,22 @@
'value' => $this->getData(['config', 'social', 'pinterestId']) 'value' => $this->getData(['config', 'social', 'pinterestId'])
]); ?> ]); ?>
</div> </div>
</div>
<div class="row">
<div class="col4 offset2">
<?php echo template::text('configSocialGithubId', [
'help' => 'Saisissez votre ID Github : https://github.com/[ID].',
'label' => 'Github',
'value' => $this->getData(['config', 'social', 'githubId'])
]); ?>
</div>
<div class="col4"> <div class="col4">
<?php echo template::text('configSocialLinkedinId', [ <?php echo template::text('configSocialLinkedinId', [
'help' => 'Saisissez votre ID Linkedin : https://fr.linkedin.com/in/[ID].', 'help' => 'Saisissez votre ID Linkedin : https://fr.linkedin.com/in/[ID].',
'label' => 'Linkedin', 'label' => 'Linkedin',
'value' => $this->getData(['config', 'social', 'linkedinId']) 'value' => $this->getData(['config', 'social', 'linkedinId'])
]); ?> ]); ?>
</div>
</div>
<div class="row">
<div class="col4 offset4">
<?php echo template::text('configSocialGithubId', [
'help' => 'Saisissez votre ID Github : https://github.com/[ID].',
'label' => 'Github',
'value' => $this->getData(['config', 'social', 'githubId'])
]); ?>
</div> </div>
</div> </div>
</div> </div>