Deltacms/core/module/config/view/social/social.php

178 lines
6.6 KiB
PHP

<?php
// Lexique
$text = [];
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Paramètres';
$text[1] = 'Désactiver le mode de capture Open Graph';
$text[2] = 'Activer le mode de capture Open Graph';
$text[3] = 'Générer sitemap.xml et robots.txt';
$text[4] = 'Autoriser les robots à référencer le site';
$text[5] = 'Cette capture d\'écran est nécessaire aux partages sur les réseaux sociaux. Pour la régénérer activer le mode de capture Open Graph et cliquer sur l\'appareil photo en bas à droite.';
$text[6] = '<h4>Image screenshot.jpg absente</h4><p>L\'activation du mode de capture Open Graph fait apparaître un appareil photo en bas de page. Un clic dessus génère une image screenshot.jpg à partir de la page active.</p>';
$text[7] = 'Réseaux sociaux';
$text[8] = 'Saisissez votre ID : https://www.facebook.com/[ID].';
$text[9] = 'Saisissez votre ID : https://www.instagram.com/[ID].';
$text[10] = 'ID de la chaîne : https://www.youtube.com/channel/[ID].';
$text[11] = 'Saisissez votre ID Utilisateur : https://www.youtube.com/user/[ID].';
$text[12] = 'Saisissez votre ID : https://twitter.com/[ID].';
$text[13] = 'Saisissez votre ID : https://pinterest.com/[ID].';
$text[14] = 'Saisissez votre ID Linkedin : https://fr.linkedin.com/in/[ID].';
$text[15] = 'Saisissez votre ID Github : https://github.com/[ID].';
break;
case 'en' :
$text[0] = 'Settings';
$text[1] = 'Disable Open Graph capture mode';
$text[2] = 'Enable Open Graph capture mode';
$text[3] = 'Generate sitemap.xml and robots.txt';
$text[4] = 'Allow robots to reference the site';
$text[5] = 'This screenshot is required for social media sharing. To regenerate it, activate the Open Graph capture mode and click on the camera at the bottom right';
$text[6] = '<h4>Image screenshot.jpg absent</h4><p>Enabling the Open Graph capture mode causes a camera to appear at the bottom of the page. Clicking it generates a screenshot.jpg image from the active page.</p>';
$text[7] = 'Social networks';
$text[8] = 'Enter your ID: https://www.facebook.com/[ID].';
$text[9] = 'Enter your ID: https://www.instagram.com/[ID].';
$text[10] = 'String ID: https://www.youtube.com/channel/[ID].';
$text[11] = 'Enter your User ID: https://www.youtube.com/user/[ID].';
$text[12] = 'Enter your ID: https://twitter.com/[ID].';
$text[13] = 'Enter your ID: https://pinterest.com/[ID].';
$text[14] = 'Enter your Linkedin ID: https://fr.linkedin.com/in/[ID].';
$text[15] = 'Enter your Github ID: https://github.com/[ID].';
break;
}
?>
<div id="socialContainer">
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo $text[0]; ?>
<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/referencement" target="_blank">
<?php echo template::ico('help', 'left');?>
</a>
</span>
</h4>
<div class="row">
<div class="col4 offset1">
<div class="row">
<div class="col12" id="take_screenshoot">
<?php
$texte = $text[2];
if( isset($_SESSION['screenshot'])) $texte = $_SESSION['screenshot'] === 'on' ? $text[1]: $text[2];
echo template::button('socialMetaImage', [
'href' => helper::baseUrl() . 'config/configOpenGraph',
'value' => $texte
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php echo template::button('socialSiteMap', [
'href' => helper::baseUrl() . 'config/generateFiles',
'value' => $text[3]
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php echo template::checkbox('seoRobots', true, $text[4], [
'checked' => $this->getData(['config', 'seo','robots'])
]); ?>
</div>
</div>
</div>
<div class="col6 offset1">
<?php if (file_exists(self::FILE_DIR.'source/screenshot.jpg')){ ?>
<div class="row">
<div class="col8 offset2 textAlignCenter">
<img src="<?php echo helper::baseUrl(false) . self::FILE_DIR.'source/screenshot.jpg';?>" data-tippy-content="<?php echo $text[5]; ?>" />
</div>
</div>
<?php } else{?>
<div class="row">
<div class="col8 offset2 textAlignCenter">
<?php echo $text[6]; ?>
</div>
</div>
<?php }?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo $text[7]; ?>
<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/referencement#reseaux-sociaux" target="_blank">
<?php echo template::ico('help', 'left');?>
</a>
</span>
</h4>
<div class="row">
<div class="col3">
<?php echo template::text('socialFacebookId', [
'help' => $text[8],
'label' => 'Facebook',
'value' => $this->getData(['config', 'social', 'facebookId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('socialInstagramId', [
'help' => $text[9],
'label' => 'Instagram',
'value' => $this->getData(['config', 'social', 'instagramId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('socialYoutubeId', [
'help' => $text[10],
'label' => 'Chaîne Youtube',
'value' => $this->getData(['config', 'social', 'youtubeId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('socialYoutubeUserId', [
'help' => $text[11],
'label' => 'Youtube',
'value' => $this->getData(['config', 'social', 'youtubeUserId'])
]); ?>
</div>
</div>
<div class="row">
<div class="col3">
<?php echo template::text('socialTwitterId', [
'help' => $text[12],
'label' => 'Twitter',
'value' => $this->getData(['config', 'social', 'twitterId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('socialPinterestId', [
'help' => $text[13],
'label' => 'Pinterest',
'value' => $this->getData(['config', 'social', 'pinterestId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('socialLinkedinId', [
'help' => $text[14],
'label' => 'Linkedin',
'value' => $this->getData(['config', 'social', 'linkedinId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('socialGithubId', [
'help' => $text[15],
'label' => 'Github',
'value' => $this->getData(['config', 'social', 'githubId'])
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>