diff --git a/CHANGES.md b/CHANGES.md index 02953e6..c3c62fc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,16 +6,15 @@ - Thème / Menu : le menu en petit écran (burger) dispose maintenant de ses propres paramètres, - Edition de page / emplacement dans le menu : une page désactivée est signalée par le curseur 'not-allowed' en grand écran et par son nom barré en petit écran, - Nouveaux gabarits pour l'éditeur Tinymce : accordéon à 3 et 4 paragraphes, - - Statislite 4.8 : comptage des liens cliqués (ils doivent posséder la class="download-link" ). + - Statislite 4.8 : comptage des liens cliqués pour lesquels la class 'clicked_link_count' a été ajoutée par l'éditeur de liens de Tinymce. - Corrections : - - Thème / header : erreur qui permettait l'affichage de la banière sur toutes les pages même si 'Bannière visible uniquement sur la page d'accueil' était cochée - Statislite / configuration : erreur qui effaçait l'information 'configuration validée', - Slider 4.8 / Configuration : les liens sur les images étaient modifiés au changement de l'ordre des pages. ## Version 4.4.09 de Deltacms - Corrections : - Statislite / configuration : erreur qui effaçait l'information 'configuration validée', - - Thème / bannière : bannière sur page d'accueil seulement, correction. + - Thème / header : bannière sur page d'accueil seulement, correction. ## Version 4.4.08 de Deltacms - Correction : diff --git a/core/core.js.php b/core/core.js.php index 1385e83..ddfa79d 100644 --- a/core/core.js.php +++ b/core/core.js.php @@ -580,13 +580,13 @@ $(document).ready(function(){ } }).trigger("resize"); - /* Compteur de téléchargements + /* Compteur de liens cliqués * Fonctionne avec download_counter.php - * Les liens comptabilisés doivent avoir la class="download-link" + * Les liens comptabilisés doivent avoir la class="clicked_link_count" * Envoi au fichier download_counter.php la donnée url */ getData(['config', 'statislite', 'enable']) && is_file('site/data/statislite/module/download_counter/download_counter.php' ) ) { ?> - $('.download-link').on('click', function(event) { + $('.clicked_link_count').on('click', function(event) { // Récupérer le chemin vers le fichier var filePath = $(this).attr('href'); // Envoyer une requête AJAX pour enregistrer le téléchargement @@ -643,11 +643,5 @@ $(document).ready(function(){ $("#site.container").css("padding-top","0"); } - - /* - * Lien vers une page ou une sous-page désactivée en petit écran - */ - if($(window).width() < 800) { - $("a.disabled-link").css('text-decoration', 'line-through'); - } + }); diff --git a/core/core.php b/core/core.php index 7430c56..88e7a89 100644 --- a/core/core.php +++ b/core/core.php @@ -1822,6 +1822,7 @@ class common { $disableChild = 0; foreach($childrenPageIds as $childKey) { $totalChild += 1; + if( $this->getData(['page', $childKey, 'disable']) === true ) $disableChild +=1; } if($childrenPageIds && $disableChild !== $totalChild && $this->getdata(['page',$parentPageId,'hideMenuChildren']) === false) { $itemsLeft .= template::ico('down', 'left'); diff --git a/core/layout/mediaqueries.css b/core/layout/mediaqueries.css index cd125c5..1ec26a5 100644 --- a/core/layout/mediaqueries.css +++ b/core/layout/mediaqueries.css @@ -175,6 +175,9 @@ body > nav { margin: 0 auto !important ; } + nav a.disabled-link { + text-decoration:line-through; + } nav{ padding: 0; } @@ -198,11 +201,6 @@ text-align: left; margin-left: 10px; } - /* Espacement icône down des pages avec sous-pages*/ - nav ul li .spacexpx{ - padding-left:25px; - } - nav #menuLeft { display: block; float: none; diff --git a/core/module/install/install.php b/core/module/install/install.php index 5a3060c..7d6d30f 100644 --- a/core/module/install/install.php +++ b/core/module/install/install.php @@ -168,11 +168,13 @@ class install extends common { $this->copyDir('core/module/install/ressource/themes', self::FILE_DIR . 'source/theme'); unlink(self::FILE_DIR . 'source/theme/themes.json'); - // Modification du texte 'Pied de page personnalisé' situé dans theme.json ( $this->setData pose problème) + // Modification des textes 'Pied de page personnalisé', 'Bannière vide' et du lien vers la page d'accueil situé dans theme.json ( $this->setData pose problème) if( $langAdmin !== 'fr'){ $theme = file_get_contents( self::DATA_DIR.'theme.json'); $theme = json_decode( $theme, true); $theme['theme']['footer']['text'] = $text['core_install']['index'][7]; + $theme['theme']['header']['featureContent'] = $text['core_install']['index'][8]; + $theme['theme']['menu']['burgerIconLink1'] = $text['core_install']['index'][9]; $json = json_encode($theme); file_put_contents(self::DATA_DIR.'theme.json',$json); } diff --git a/core/module/install/lang/en/lex_install.php b/core/module/install/lang/en/lex_install.php index 34ae9b4..8cc93d8 100644 --- a/core/module/install/lang/en/lex_install.php +++ b/core/module/install/lang/en/lex_install.php @@ -21,4 +21,8 @@ $text['core_install']['index'][5] = 'Installation completed'; $text['core_install']['index'][6] = 'home.html'; // Texte par défaut à gauche du footer $text['core_install']['index'][7] = 'Custom footer'; +// Texte pour la bannière customisable +$text['core_install']['index'][8] = 'Banner empty'; +// Texte pour le lien vers la page d'accueil +$text['core_install']['index'][9] = 'home'; ?> \ No newline at end of file diff --git a/core/module/install/lang/es/lex_install.php b/core/module/install/lang/es/lex_install.php index bfa7b66..60ebdc3 100644 --- a/core/module/install/lang/es/lex_install.php +++ b/core/module/install/lang/es/lex_install.php @@ -21,4 +21,8 @@ $text['core_install']['index'][5] = 'Instalación completa'; $text['core_install']['index'][6] = 'home.html'; // Texte par défaut à gauche du footer $text['core_install']['index'][7] = 'Pie de página personalizado'; +// Texte pour la bannière customisable +$text['core_install']['index'][8] = 'Banner vacío'; +// Texte pour le lien vers la page d'accueil +$text['core_install']['index'][9] = 'inicio'; ?> \ No newline at end of file diff --git a/core/module/install/lang/fr/lex_install.php b/core/module/install/lang/fr/lex_install.php index f4753f0..eb14c91 100644 --- a/core/module/install/lang/fr/lex_install.php +++ b/core/module/install/lang/fr/lex_install.php @@ -21,4 +21,8 @@ $text['core_install']['index'][5] = 'Installation terminée'; $text['core_install']['index'][6] = 'accueil.html'; // Texte par défaut à gauche du footer $text['core_install']['index'][7] = 'Pied de page personnalisé'; +// Texte pour la bannière customisable +$text['core_install']['index'][8] = 'Bannière vide'; +// Texte pour le lien vers la page d'accueil +$text['core_install']['index'][9] = 'accueil'; ?> \ No newline at end of file diff --git a/core/module/install/ressource/databaselight_en/base/content/home.html b/core/module/install/ressource/databaselight_en/base/content/home.html new file mode 100644 index 0000000..cfa5104 --- /dev/null +++ b/core/module/install/ressource/databaselight_en/base/content/home.html @@ -0,0 +1 @@ +

Content of your new page.

\ No newline at end of file diff --git a/core/module/install/ressource/databaselight_en/base/locale.json b/core/module/install/ressource/databaselight_en/base/locale.json index cd1f974..16b32ff 100644 --- a/core/module/install/ressource/databaselight_en/base/locale.json +++ b/core/module/install/ressource/databaselight_en/base/locale.json @@ -1,6 +1,6 @@ { "locale": { - "homePageId": "accueil", + "homePageId": "home", "page302": "none", "page403": "none", "page404": "none", diff --git a/core/module/install/ressource/databaselight_en/base/page.json b/core/module/install/ressource/databaselight_en/base/page.json index b5a93e7..4e6d99d 100644 --- a/core/module/install/ressource/databaselight_en/base/page.json +++ b/core/module/install/ressource/databaselight_en/base/page.json @@ -1,10 +1,10 @@ { "page": { - "accueil": { + "home": { "typeMenu": "text", "iconUrl": "", "disable": false, - "content": "accueil.html", + "content": "home.html", "hideTitle": true, "homePageId": true, "breadCrumb": false, diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index 98504c6..22d35e3 100644 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -348,8 +348,8 @@ class init extends common { 'swiperTransition' => '1000' ], 'menu' => [ - 'backgroundColor' => 'rgba(32, 59, 82, 0.85)', - 'backgroundColorSub' => 'rgba(32, 59, 82, 1)', + 'backgroundColor' => 'rgba(103, 127, 163, 0.85)', + 'backgroundColorSub' => 'rgba(83, 107, 143, 1)', 'font' => 'roboto', 'fontSize' => '1.1em', 'fontWeight' => 'normal', @@ -363,19 +363,31 @@ class init extends common { 'fixed' => true, 'activeColorAuto' => true, 'activeColor' => 'rgba(255, 255, 255, 1)', - 'activeTextColor' => 'rgba(255, 255, 255, 1)', + 'activeTextColor' => 'rgba(224, 248, 87, 1)', 'radius' => '0px', 'memberBar' => true, - 'burgerLogo' => '', - 'burgerContent' => 'title', 'width' => 'container', - 'burgerFontSize' => '1.5em', - 'burgerTextColor' => '#DDD', 'minWidthTab' => 'auto', 'minWidthParentOrAll' => false, - 'widthLogo' => '30px', - 'heightLogo' => 'auto' - ], + 'burgerTitle' => false, + 'burgerIcon1' => 'icones/home_orange.png', + 'burgerIcon2' => '', + 'burgerContent' => 'oneIcon', + 'burgerTextColor' => 'rgba(221, 221, 221, 1)', + 'burgerFontSize' => '1.5em', + 'burgerFixed' => true, + 'burgerIconColor' => 'rgba(199, 246, 9, 1)', + 'burgerIconBgColor' => 'rgba(103, 127, 163, 0)', + 'burgerBannerColor' => 'rgba(103, 127, 163, 0)', + 'burgerTextMenuColor' => 'rgba(255, 255, 255, 1)', + 'burgerActiveTextColor' => 'rgba(224, 248, 87, 1)', + 'burgerBackgroundColor' => 'rgba(103, 127, 163, 0.85)', + 'burgerActiveColorAuto' => true, + 'burgerActiveColor' => '', + 'burgerBackgroundColorSub' => 'rgba(83, 107, 143, 1)', + 'burgerIconLink1' => 'accueil', + 'burgerIconLink2' => '' + ], 'site' => [ 'backgroundColor' => 'rgba(255, 255, 255, 1)', 'radius' => '0px', diff --git a/core/module/install/ressource/themes/theme_default.zip b/core/module/install/ressource/themes/theme_default.zip index 814f18a..7867e13 100644 Binary files a/core/module/install/ressource/themes/theme_default.zip and b/core/module/install/ressource/themes/theme_default.zip differ diff --git a/core/module/install/ressource/themes/theme_sansbanniere_fluide.zip b/core/module/install/ressource/themes/theme_sansbanniere_fluide.zip index 7a52d1f..babcd25 100644 Binary files a/core/module/install/ressource/themes/theme_sansbanniere_fluide.zip and b/core/module/install/ressource/themes/theme_sansbanniere_fluide.zip differ diff --git a/core/module/install/ressource/themes/theme_sombre_islande_fluide.zip b/core/module/install/ressource/themes/theme_sombre_islande_fluide.zip index 6063882..a2d8ed3 100644 Binary files a/core/module/install/ressource/themes/theme_sombre_islande_fluide.zip and b/core/module/install/ressource/themes/theme_sombre_islande_fluide.zip differ diff --git a/core/vendor/tinymce/init.js b/core/vendor/tinymce/init.js index 3bffec2..3725b22 100644 --- a/core/vendor/tinymce/init.js +++ b/core/vendor/tinymce/init.js @@ -213,6 +213,10 @@ tinymce.init({ image_caption: true, // Pages internes link_list: baseUrl + "core/vendor/tinymce/links.php", + link_class_list: [ + {title: 'None', value: ''}, + {title: 'clicked_link_count', value: 'clicked_link_count'} + ], // Contenu du menu contextuel contextmenu: "selectall searchreplace | hr | media image link anchor nonbreaking | insertable cell row column deletetable", // Fichiers CSS à intégrer à l'éditeur diff --git a/module/statislite/lang/en/lex_statislite.php b/module/statislite/lang/en/lex_statislite.php index 9551c8f..3507840 100644 --- a/module/statislite/lang/en/lex_statislite.php +++ b/module/statislite/lang/en/lex_statislite.php @@ -105,7 +105,7 @@ $text['statislite_view']['index'][27] = ' - Total number of pages viewed: '; $text['statislite_view']['index'][28] = ' - Number of visits: '; $text['statislite_view']['index'][29] = 'en_GB'; $text['statislite_view']['index'][30] = 'Europe/London'; -$text['statislite_view']['index'][31] = 'Links clicked'; +$text['statislite_view']['index'][31] = 'Links clicked since '; $text['statislite']['config'][0] = 'Your choice...'; $text['statislite']['config'][1] = 'Changes saved'; $text['statislite']['config'][2] = 'No save file'; diff --git a/module/statislite/lang/es/lex_statislite.php b/module/statislite/lang/es/lex_statislite.php index 6499f10..6b47af8 100644 --- a/module/statislite/lang/es/lex_statislite.php +++ b/module/statislite/lang/es/lex_statislite.php @@ -105,7 +105,7 @@ $text['statislite_view']['index'][27] = ' - Número total de páginas vistas: '; $text['statislite_view']['index'][28] = ' - Número de visitas: '; $text['statislite_view']['index'][29] = 'es_ES'; $text['statislite_view']['index'][30] = 'Europe/Madrid'; -$text['statislite_view']['index'][31] = 'Enlaces seleccionados'; +$text['statislite_view']['index'][31] = 'Enlaces seleccionados desde '; $text['statislite']['config'][0] = 'Tu elección...'; $text['statislite']['config'][1] = 'Cambios guardados'; $text['statislite']['config'][2] = 'No hay archivo de respaldo'; diff --git a/module/statislite/lang/fr/lex_statislite.php b/module/statislite/lang/fr/lex_statislite.php index 0cb92bf..636101c 100644 --- a/module/statislite/lang/fr/lex_statislite.php +++ b/module/statislite/lang/fr/lex_statislite.php @@ -105,7 +105,7 @@ $text['statislite_view']['index'][27] = ' - Nombre total de pages vues : '; $text['statislite_view']['index'][28] = ' - Nombre de visites : '; $text['statislite_view']['index'][29] = 'fr_FR'; $text['statislite_view']['index'][30] = 'Europe/Paris'; -$text['statislite_view']['index'][31] = 'Liens cliqués'; +$text['statislite_view']['index'][31] = 'Liens cliqués depuis le '; $text['statislite']['config'][0] = 'Votre choix...'; $text['statislite']['config'][1] = 'Modifications enregistrées'; $text['statislite']['config'][2] = 'Pas de fichier de sauvegarde'; diff --git a/module/statislite/ressource/download_counter/download_counter.php b/module/statislite/ressource/download_counter/download_counter.php index 88016b4..22982db 100644 --- a/module/statislite/ressource/download_counter/download_counter.php +++ b/module/statislite/ressource/download_counter/download_counter.php @@ -4,7 +4,9 @@ if (isset($_POST['url'])) { $url = $_POST['url']; $urlfile = 'counter.json'; - if( !is_file( $urlfile )) file_put_contents($urlfile,'{"'.$url.'":0}'); + if( !is_file( $urlfile ) || filesize($urlfile)<5 ){ + file_put_contents($urlfile,'{"date_creation_fichier":"'.date('Y/m/d H:i:s').'"}'); + } $json = file_get_contents($urlfile); $tab = json_decode($json, true); //Lire le tableau si la clef === $url incrémentation de la valeur associée, sortir diff --git a/module/statislite/view/index/index.php b/module/statislite/view/index/index.php index 935723a..d95efdb 100644 --- a/module/statislite/view/index/index.php +++ b/module/statislite/view/index/index.php @@ -152,19 +152,34 @@ if( function_exists('datefmt_create') && function_exists('datefmt_format') && ex * Affichage des téléchargements * */ -if( file_exists( $module::$downloadLink.'counter.json' ) && file_get_contents($module::$downloadLink.'counter.json') !== '{}'){ ?> -
-
- $value){ ?> + if( function_exists('datefmt_create') && function_exists('datefmt_format') && extension_loaded('intl') ){ + // Affichage au format de la langue d'administration + $fmt = datefmt_create( + $text['statislite_view']['index'][29], + IntlDateFormatter::LONG, + IntlDateFormatter::SHORT, + $text['statislite_view']['index'][30], + IntlDateFormatter::GREGORIAN + ); + $datedeb = datefmt_format($fmt, strtotime($download["date_creation_fichier"])); + + } else{ + $datedeb = $download["date_creation_fichier"]; + } ?> +
+
+ $value){ + if( $key !== "date_creation_fichier" ){ ?>
'.$key.' => '.$value.''; ?>
- +