news config social & co

This commit is contained in:
Deltacms 2022-12-29 08:31:27 +01:00
parent 986d50dfcf
commit 2e76a62615
8 changed files with 21 additions and 8 deletions

View File

@ -1935,9 +1935,9 @@ class common {
}
/**
* Affiche les balises meta property
* Affiche les balises meta property propres à Facebook
*/
public function showMetaProperty() {
public function showMetaPropertyFacebook() {
echo '<meta property="og:title" content="' . $this->output['metaTitle'] . '" />' . PHP_EOL;
echo '<meta property="og:description" content="' . $this->output['metaDescription'] . '" />' . PHP_EOL;
echo '<meta property="og:type" content="website" />' . PHP_EOL;

View File

@ -3,13 +3,13 @@
$lang = $this->getData(['config', 'i18n', 'langBase']);
if( $this->getInput('DELTA_I18N_SITE') !== '' && $this->getInput('DELTA_I18N_SITE') !== null && $this->getInput('DELTA_I18N_SITE') !== 'base') $lang = $this->getInput('DELTA_I18N_SITE');
?>
<html prefix="og: http://ogp.me/ns#" lang="<?php echo $lang;?>">
<html <?php if( $this->getData(['config', 'social', 'headFacebook' ]) === true) echo 'prefix="og: http://ogp.me/ns#"'; ?> lang="<?php echo $lang;?>">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php
$this->showMetaTitle();
$this->showMetaProperty();
if( $this->getData(['config', 'social', 'headFacebook' ]) === true) $this->showMetaPropertyFacebook();
?>
<?php
$this->showFavicon();

View File

@ -405,7 +405,8 @@ class config extends common {
'twitterId' => $this->getInput('socialTwitterId'),
'youtubeId' => $this->getInput('socialYoutubeId'),
'youtubeUserId' => $this->getInput('socialYoutubeUserId'),
'githubId' => $this->getInput('socialGithubId')
'githubId' => $this->getInput('socialGithubId'),
'headFacebook' => $this->getInput('socialHeadFacebook', helper::FILTER_BOOLEAN)
],
'smtp' => [
'enable' => $this->getInput('smtpEnable',helper::FILTER_BOOLEAN),

View File

@ -167,6 +167,8 @@ $text['core_config_view']['social'][12] = 'Enter your ID: https://twitter.com/[I
$text['core_config_view']['social'][13] = 'Enter your ID: https://pinterest.com/[ID].';
$text['core_config_view']['social'][14] = 'Enter your Linkedin ID: https://fr.linkedin.com/in/[ID].';
$text['core_config_view']['social'][15] = 'Enter your Github ID: https://github.com/[ID].';
$text['core_config_view']['social'][16] = 'head Facebook';
$text['core_config_view']['social'][17] = 'Insert in the head of the page the meta properties specific to Facebook';
$text['core_config']['generateFiles'][0] = 'Updated sitemap and robots.txt files';
$text['core_config']['generateFiles'][1] = 'Writing failure, site map not updated';
$text['core_config']['backup'][0] = 'Save';

View File

@ -167,6 +167,8 @@ $text['core_config_view']['social'][12] = 'Saisissez votre ID : https://twitter.
$text['core_config_view']['social'][13] = 'Saisissez votre ID : https://pinterest.com/[ID].';
$text['core_config_view']['social'][14] = 'Saisissez votre ID Linkedin : https://fr.linkedin.com/in/[ID].';
$text['core_config_view']['social'][15] = 'Saisissez votre ID Github : https://github.com/[ID].';
$text['core_config_view']['social'][16] = 'head Facebook';
$text['core_config_view']['social'][17] = 'Insère dans le head de la page les propriétés meta propres à Facebook';
$text['core_config']['generateFiles'][0] = 'Mises à jour des fichiers sitemap et robots.txt';
$text['core_config']['generateFiles'][1] = 'Echec d\'écriture, le site map n\'a pas été mis à jour';
$text['core_config']['backup'][0] = 'Sauvegarder';

View File

@ -102,6 +102,14 @@ include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdm
]); ?>
</div>
</div>
<div class="row">
<div class="col3">
<?php echo template::checkbox('socialHeadFacebook', true, $text['core_config_view']['social'][16], [
'checked' => $this->getData(['config', 'social','headFacebook']),
'help' => $text['core_config_view']['social'][17]
]); ?>
</div>
</div>
<div class="row">
<div class="col3">
<?php echo template::text('socialTwitterId', [

View File

@ -39,17 +39,18 @@
.newsContent {
overflow: hidden; /* les dépassements seront masqués */
clear: left;
margin-bottom: 20px;
}
.newsSuite {
font-style: italic;
font-weight: normal;
}
/*
.newsSpace {
min-height: 20px;
}
*/
.newsSignature {
position: absolute;
bottom: 3px;

View File

@ -33,7 +33,6 @@ if($module::$news):
<div class="newsContent">
<?php echo $news['content']; ?>
</div>
<div class="newsSpace"></div>
<div class="newsSignature">
<i class="far fa-calendar-alt"></i>
<?php if( function_exists('datefmt_create') && function_exists('datefmt_create') && extension_loaded('intl') ){