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,6 +2160,10 @@ class layout extends common {
break; break;
case 'youtubeId': case 'youtubeId':
$socialUrl = 'https://www.youtube.com/channel/'; $socialUrl = 'https://www.youtube.com/channel/';
$title = 'Chaîne YouTube';
break;
case 'youtubeIdUser':
$socialUrl = 'https://www.youtube.com/user/';
$title = 'YouTube'; $title = 'YouTube';
break; break;
case 'githubId': case 'githubId':
@ -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

@ -115,19 +115,26 @@
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::text('configSocialYoutubeId', [ <?php echo template::text('configSocialTwitterId', [
'help' => 'Saisissez votre ID : https://www.youtube.com/channel/[ID].', 'help' => 'Saisissez votre ID : https://twitter.com/[ID].',
'label' => 'Youtube', 'label' => 'Twitter',
'value' => $this->getData(['config', 'social', 'youtubeId']) 'value' => $this->getData(['config', 'social', 'twitterId'])
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::text('configSocialTwitterId', [ <?php echo template::text('configSocialYoutubeId', [
'help' => 'Saisissez votre ID : https://twitter.com/[ID].', 'help' => 'Saisissez votre ID Channel: https://www.youtube.com/channel/[ID].',
'label' => 'Twitter', 'label' => 'Youtube Channel',
'value' => $this->getData(['config', 'social', 'twitterId']) '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>
<div class="col4"> <div class="col4">
@ -137,6 +144,16 @@
'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].',
@ -145,15 +162,6 @@
]); ?> ]); ?>
</div> </div>
</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>
</div> </div>