Modifications 4203
This commit is contained in:
parent
ee78381b74
commit
97c1878b7e
|
@ -1,5 +1,13 @@
|
|||
# Changelog
|
||||
|
||||
## Version 4.2.03 de Deltacms
|
||||
- Modifications :
|
||||
- Configuration / Configuration : affichage et export pdf d'informations à envoyer au support en cas de dysfonctionnement,
|
||||
- Configuration / Référencement : amélioration de la capture Open Graph,
|
||||
- Statislite : amélioration de l'affichage en petit écran,
|
||||
- Agenda : suppression du cache à l'affichage des évènements (problème d'affichage avec certains serveurs),
|
||||
- Nettoyage : suppression de 2Mo de données inutiles.
|
||||
|
||||
## Version 4.2.02 de Deltacms
|
||||
- Modifications :
|
||||
- Statislite : sécurité vis à vis d'une corruption des fichiers json,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
# DeltaCMS 4.2.02
|
||||
# DeltaCMS 4.2.03
|
||||
|
||||
DeltaCMS est un CMS sans base de données (flat-file) qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.
|
||||
L'administration du site est bilingue anglais ou français, le site peut être rédigé dans une des principales langues européennes.
|
||||
|
@ -75,10 +75,10 @@ En cas de difficulté avec la nouvelle version, il suffira de téléverser la sa
|
|||
[R] site Contenu du site
|
||||
[R] backup Sauvegardes automatiques
|
||||
[R] data Répertoire des données
|
||||
[R] fr Dossier localisé, un dossier par langue rédigée
|
||||
[R] base Dossier localisé, un dossier par langue rédigée
|
||||
[F] page.json Données des pages
|
||||
[F] module.json Données des modules de pages
|
||||
[F] local.json Données du site propres à la langue
|
||||
[F] locale.json Données du site propres à la langue
|
||||
[R] content Dossier des contenus de page
|
||||
[F] accueil.html Exemple contenu de la page d'accueil
|
||||
[R] *modules* Un dossier par module, exemple [R]search [R]gallery [R]agenda, pour les données du module
|
||||
|
@ -102,7 +102,6 @@ En cas de difficulté avec la nouvelle version, il suffira de téléverser la sa
|
|||
[F] index.php Fichier d'initialisation de DeltaCMS
|
||||
[F] robots.txt Filtrage des répertoires accessibles aux robots des moteurs de recherche
|
||||
[F] sitemap.xml Plan du site
|
||||
[F] sitemap.xml.gz Version compressée
|
||||
|
||||
Le fichiers .htaccess contribuent à la sécurité en filtrant l'accès aux répertoires sensibles.
|
||||
|
||||
|
|
|
@ -582,7 +582,7 @@ $(document).ready(function(){
|
|||
$.ajax({
|
||||
type: "POST",
|
||||
contentType:"application/x-www-form-urlencoded",
|
||||
url: "screenshot.php",
|
||||
url: "<?php echo helper::baseUrl(false); ?>core/vendor/screenshot/screenshot.php",
|
||||
data: {
|
||||
image: dataURL
|
||||
},
|
||||
|
|
|
@ -48,7 +48,7 @@ class common {
|
|||
|
||||
// Numéro de version
|
||||
const DELTA_UPDATE_URL = 'https://update.deltacms.fr/master/';
|
||||
const DELTA_VERSION = '4.2.02';
|
||||
const DELTA_VERSION = '4.2.03';
|
||||
const DELTA_UPDATE_CHANNEL = "v4";
|
||||
|
||||
public static $actions = [];
|
||||
|
|
|
@ -59,4 +59,9 @@ if ($this->getData(['core', 'dataVersion']) < 4202) {
|
|||
// Mise à jour
|
||||
$this->setData(['core', 'dataVersion', 4202]);
|
||||
}
|
||||
|
||||
if ($this->getData(['core', 'dataVersion']) < 4203) {
|
||||
// Mise à jour
|
||||
$this->setData(['core', 'dataVersion', 4203]);
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -28,7 +28,7 @@ if( $this->getInput('DELTA_I18N_SITE') !== '' && $this->getInput('DELTA_I18N_SIT
|
|||
}?>
|
||||
<?php
|
||||
if( isset ($_SESSION['screenshot'] )){
|
||||
if( $_SESSION['screenshot'] === 'on'){ ?>
|
||||
if( $_SESSION['screenshot'] === 'on'){?>
|
||||
<script src="./core/vendor/screenshot/html2canvas.min.js"></script>
|
||||
<?php } }?>
|
||||
</head>
|
||||
|
|
|
@ -328,12 +328,10 @@ class config extends common {
|
|||
if( $_SESSION['screenshot'] === 'on'){
|
||||
$_SESSION['screenshot'] = 'off';
|
||||
$texte = $text[0];
|
||||
if( file_exists('./screenshot.php')) unlink ('./screenshot.php');
|
||||
}
|
||||
else{
|
||||
$_SESSION['screenshot'] = 'on';
|
||||
$texte = $text[1];
|
||||
if( !file_exists('./screenshot.php')) copy('./core/vendor/screenshot/screenshot.php','./screenshot.php');
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
|
|
|
@ -248,6 +248,16 @@ $( document).ready(function() {
|
|||
$(this).css("background-color", blockButton);
|
||||
});
|
||||
|
||||
// html vers pdf
|
||||
$(".buttontopdf").on("click", function() {
|
||||
var doc = new jsPDF();
|
||||
var elementHTML = $('#infotopdf').html();
|
||||
doc.fromHTML(elementHTML, 15, 15, {
|
||||
'width': 170
|
||||
});
|
||||
doc.save('informations.pdf');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<script src="core/vendor/jspdf/jspdf.min.js"></script>
|
||||
<?php
|
||||
// Lexique
|
||||
$text = [];
|
||||
|
@ -28,6 +29,18 @@ switch ($val) {
|
|||
$text[21] = 'Sauvegarder';
|
||||
$text[22] = 'Restaurer';
|
||||
$text[23] = 'Copie sauvegardes auto';
|
||||
$text[24] = 'Informations à transmettre au support en cas de dysfonctionnement';
|
||||
$text[25] = 'Version de Deltacms: ';
|
||||
$text[26] = 'Version de PHP: ';
|
||||
$text[27] = 'Type de serveur: ';
|
||||
$text[28] = 'URL intelligentes: ';
|
||||
$text[29] = 'oui';
|
||||
$text[30] = 'non';
|
||||
$text[31] = 'Modules PHP installés: ';
|
||||
$text[32] = 'Module(s) absent(s): ';
|
||||
$text[33] = 'Les modules nécessaires sont installés.';
|
||||
$text[34] = 'Modules Deltacms installés: ';
|
||||
$text[35] = 'Générer un pdf';
|
||||
break;
|
||||
case 'en' :
|
||||
$text[0] = 'Parameters';
|
||||
|
@ -54,6 +67,18 @@ switch ($val) {
|
|||
$text[21] = 'Save';
|
||||
$text[22] = 'Restore';
|
||||
$text[23] = 'Auto backup copy';
|
||||
$text[24] = 'Information to send to support in case of malfunction';
|
||||
$text[25] = 'Deltacms version: ';
|
||||
$text[26] = 'PHP version: ';
|
||||
$text[27] = 'Server type: ';
|
||||
$text[28] = 'Smart URL: ';
|
||||
$text[29] = 'yes';
|
||||
$text[30] = 'no';
|
||||
$text[31] = 'PHP modules installed: ';
|
||||
$text[32] = 'Module(s) missing: ';
|
||||
$text[33] = 'The necessary modules are installed.';
|
||||
$text[34] = 'Deltacms modules installed: ';
|
||||
$text[35] = 'Generate a pdf';
|
||||
break;
|
||||
}
|
||||
?>
|
||||
|
@ -198,4 +223,72 @@ switch ($val) {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<div id="infotopdf">
|
||||
<h4><?php echo $text[24]; ?></h4>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php $textRewrite = $text[30];
|
||||
if( helper::checkRewrite() === true ) $textRewrite = $text[29];
|
||||
$listText = $text[25]. common::DELTA_VERSION."\n".$text[26]. phpversion()."\n".$text[27]. $_SERVER['SERVER_SOFTWARE']."\n".$text[28].$textRewrite;
|
||||
echo template::textarea('modulesPhp',[
|
||||
'value' => $listText
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php $listMod = get_loaded_extensions();
|
||||
natcasesort($listMod);
|
||||
$listModText = $text[31];
|
||||
$listModSmall = [];
|
||||
foreach( $listMod as $key=>$value){
|
||||
$listModText .= $value.' - ';
|
||||
$listModSmall[$key] = strtolower($value);
|
||||
}
|
||||
$listModText = substr( $listModText, 0, strlen($listModText) - 3);
|
||||
$listModRequired = array('exif', 'gd', 'mbstring', 'xmlwriter', 'zip', 'date', 'fileinfo', 'phar');
|
||||
$listDiff = array_diff( $listModRequired, $listModSmall );
|
||||
if( count($listDiff) > 0) {
|
||||
$listModText .= "\n\n".$text[32];
|
||||
foreach( $listDiff as $key=>$value){
|
||||
$listModText .= $value.' - ';
|
||||
}
|
||||
$listModText = substr( $listModText, 0, strlen($listModText) - 3);
|
||||
} else{
|
||||
$listModText .= "\n\n".$text[33];
|
||||
}
|
||||
echo template::textarea('modulesPhp',[
|
||||
'value' => $listModText
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php // $infoModules[nom_module]['realName'], ['version'], ['update'], ['delete'], ['dataDirectory']
|
||||
$infoModules = helper::getModules();
|
||||
$listModDeltaText = $text[34];
|
||||
foreach( $infoModules as $key=>$value){
|
||||
$listModDeltaText .= $key.' '.$infoModules[$key]['version'].' - ';
|
||||
}
|
||||
$listModDeltaText = substr( $listModDeltaText, 0, strlen($listModDeltaText) - 3);
|
||||
echo template::textarea('modulesDeltacms',[
|
||||
'value' => $listModDeltaText
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col2 offset5">
|
||||
<?php echo template::button('buttonHtmlToPdf', [
|
||||
'class' => 'buttontopdf',
|
||||
'value' => $text[35]
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -86,7 +86,7 @@ switch ($val) {
|
|||
<?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]; ?>" />
|
||||
<img src="<?php echo helper::baseUrl(false) . self::FILE_DIR.'source/screenshot.jpg'.'?n='.uniqid();?>" data-tippy-content="<?php echo $text[5]; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<?php } else{?>
|
||||
|
|
|
@ -70,7 +70,7 @@ class init extends common {
|
|||
]
|
||||
],
|
||||
'core' => [
|
||||
'dataVersion' => 4202,
|
||||
'dataVersion' => 4203,
|
||||
'lastBackup' => 0,
|
||||
'lastClearTmp' => 0,
|
||||
'lastAutoUpdate' => 0,
|
||||
|
|
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -3,35 +3,29 @@
|
|||
if (isset($_POST['image'])) {
|
||||
|
||||
$data = $_POST['image'] ;
|
||||
|
||||
$data = str_replace(' ','+',$data);
|
||||
|
||||
$data = str_replace('data:image/png;base64,', '', $data);
|
||||
|
||||
$img = base64_decode($data);
|
||||
|
||||
// Effacer l'image et la miniature jpg
|
||||
if (file_exists('./site/file/thumb/screenshot.jpg')) {
|
||||
chmod('./site/file/thumb/screenshot.jpg', 0777);
|
||||
unlink ('./site/file/thumb/screenshot.jpg');
|
||||
if (file_exists('../../../site/file/thumb/screenshot.jpg')) {
|
||||
chmod('../../../site/file/thumb/screenshot.jpg', 0777);
|
||||
unlink ('../../../site/file/thumb/screenshot.jpg');
|
||||
}
|
||||
if (file_exists('./site/file/source/screenshot.jpg')) {
|
||||
unlink ('./site/file/source/screenshot.jpg');
|
||||
if (file_exists('../../../site/file/source/screenshot.jpg')) {
|
||||
chmod('../../../site/file/source/screenshot.jpg', 0777);
|
||||
unlink ('../../../site/file/source/screenshot.jpg');
|
||||
}
|
||||
|
||||
file_put_contents('./site/file/source/screenshot.png',$img) ;
|
||||
|
||||
$image = imagecreatefrompng('./site/file/source/screenshot.png');
|
||||
file_put_contents('screenshot.png',$img) ;
|
||||
|
||||
$image = imagecreatefrompng('screenshot.png');
|
||||
$quality = 75;
|
||||
imagejpeg($image, '../../../site/file/source/screenshot.jpg', $quality);
|
||||
|
||||
imagejpeg($image, './site/file/source/screenshot.jpg', $quality);
|
||||
|
||||
chmod('./site/file/source/screenshot.jpg', 0777);
|
||||
|
||||
if (file_exists('./site/file/source/screenshot.png')) {
|
||||
chmod('./site/file/source/screenshot.png', 0777);
|
||||
unlink ('./site/file/source/screenshot.png');
|
||||
if (file_exists('screenshot.png')) {
|
||||
chmod('screenshot.png', 0777);
|
||||
unlink ('screenshot.png');
|
||||
}
|
||||
|
||||
imagedestroy($image);
|
||||
|
|
|
@ -36,7 +36,7 @@ class agenda extends common {
|
|||
'index' => self::GROUP_VISITOR
|
||||
];
|
||||
|
||||
const VERSION = '5.0';
|
||||
const VERSION = '5.1';
|
||||
const REALNAME = 'Agenda';
|
||||
const DELETE = true;
|
||||
const UPDATE = '4.1';
|
||||
|
@ -154,6 +154,10 @@ class agenda extends common {
|
|||
|
||||
$this->setData(['module', $this->getUrl(0), 'config', 'versionData','5.0']);
|
||||
}
|
||||
// Initialisation ou mise à jour vers la version 5.1
|
||||
if (version_compare($this->getData(['module', $this->getUrl(0), 'config', 'versionData']), '5.1', '<') ) {
|
||||
$this->setData(['module', $this->getUrl(0), 'config', 'versionData','5.1']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -12,6 +12,10 @@
|
|||
* (c) 2019 Adam Shaw
|
||||
**/
|
||||
|
||||
$.ajaxSetup({
|
||||
cache: false
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
//Fullcalendar : instanciation, initialisations
|
||||
|
@ -45,7 +49,7 @@
|
|||
selectable: true,
|
||||
editable: true,
|
||||
//afficher les évènements à partir d'un fichier JSON
|
||||
events : '<?php echo $module::DATAMODULE.'data/'.$this->getUrl(0); ?>'+'_affiche/events.json',
|
||||
events : '<?php echo $module::DATAMODULE.'data/'.$this->getUrl(0); ?>'+'_affiche/events.json?n='+'<?php echo uniqid(); ?>',
|
||||
//créer un évènement
|
||||
dateClick: function(info) {
|
||||
window.open('<?php echo helper::baseUrl() . $this->getUrl(0); ?>'+ '/da:'+ info.dateStr + 'vue:' + info.view.type + 'deb:' + calendar.formatIso(info.view.currentStart),'_self');
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
class blog extends common {
|
||||
|
||||
const VERSION = '6.0';
|
||||
const VERSION = '6.1';
|
||||
const REALNAME = 'Blog';
|
||||
const DELETE = true;
|
||||
const UPDATE = '0.0';
|
||||
|
@ -179,6 +179,10 @@ class blog extends common {
|
|||
}
|
||||
$this->setData(['module', $this->getUrl(0), 'config', 'versionData','6.0']);
|
||||
}
|
||||
// Version 6.1
|
||||
if (version_compare($this->getData(['module', $this->getUrl(0), 'config', 'versionData']), '6.1', '<') ) {
|
||||
$this->setData(['module', $this->getUrl(0), 'config', 'versionData','6.1']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -42,11 +42,11 @@ if($module::$articles): ?>
|
|||
<?php endif;?>
|
||||
</div>
|
||||
<div class="col9">
|
||||
<h1 class="blogTitle">
|
||||
<h2 class="blogTitle">
|
||||
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>">
|
||||
<?php echo $article['title']; ?>
|
||||
</a>
|
||||
</h1>
|
||||
</h2>
|
||||
<div class="blogComment">
|
||||
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>#comment">
|
||||
<?php if ($article['comment']): ?>
|
||||
|
|
|
@ -31,7 +31,7 @@ class statislite extends common {
|
|||
'conversionTime' => self::GROUP_VISITOR
|
||||
];
|
||||
|
||||
const VERSION = '4.1';
|
||||
const VERSION = '4.2';
|
||||
const REALNAME = 'Statislite';
|
||||
const DELETE = true;
|
||||
const UPDATE = '2.6';
|
||||
|
@ -249,10 +249,10 @@ class statislite extends common {
|
|||
*/
|
||||
private function update() {
|
||||
|
||||
// Installation ou mise à jour vers la version 4.0
|
||||
if (version_compare($this->getData(['module', $this->getUrl(0), 'config', 'versionData']), '4.1', '<') ) {
|
||||
// Installation ou mise à jour vers la version 4.2
|
||||
if (version_compare($this->getData(['module', $this->getUrl(0), 'config', 'versionData']), '4.2', '<') ) {
|
||||
|
||||
$this->setData(['module', $this->getUrl(0), 'config', 'versionData','4.1']);
|
||||
$this->setData(['module', $this->getUrl(0), 'config', 'versionData','4.2']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,6 +34,19 @@
|
|||
.v20 { width: 20%; }
|
||||
.v10 { width: 10%; }
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
.v100 { width: 100%; }
|
||||
.v90 { width: 90%; }
|
||||
.v80 { width: 80%; }
|
||||
.v70 { width: 70%; }
|
||||
.v60 { width: 60%; }
|
||||
.v50 { width: 50%; }
|
||||
.v40 { width: 40%; }
|
||||
.v30 { width: 30%; }
|
||||
.v20 { width: 25%; }
|
||||
.v10 { width: 20%; }
|
||||
}
|
||||
|
||||
/* Multicolore */
|
||||
.multicolor .v100 { background-color: #970000; color : #68ffff}
|
||||
.multicolor .v90 { background-color: #ff0000; color : #00ffff}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 422 KiB After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 422 KiB After Width: | Height: | Size: 4.2 KiB |
Loading…
Reference in New Issue