This commit is contained in:
Prof Langues 2019-05-02 13:21:48 +02:00
parent 7975568021
commit 3013b1b6b1
51 changed files with 2561 additions and 733 deletions

View File

@ -1,14 +1,30 @@
# ChangeLog # Changelog
## Version 9.1.0
- Modifications :
- Amélioration de l'algorithme de gestion des barres
- Script Google Analytics
- Menu : effet de surimpression pages filles
- Réorganisation de l'écran d'édition des pages
- Blog : notification hiérarchique lors de la rédaction d'un commentaire
- Form : notification hiérarchique de la récepton d'un message
- Ajouts :
- Menu dans une barre latérale : intégral ou sous-menu de la page parente
- Option d'apparition des pages dans le menu latéral ou le menu principal
- Option de chargement d'un modèle de site à l'installation
- Option de masquage des pages enfants dans le menu principal
- Petits écrans, ordre des blocs : Page - Barre Gauche - Barre Droite
- Intégration de la classe Swiper http://idangero.us/swiper/
- Intégration de l'URL canonical
- Icône de suppression des pages dans la barre d'administration
- Gestion du sitemap.xml et du robots.txt
## Version 9.0.21 ## Version 9.0.21
- Mise à jour : - Mise à jour :
- Code Mirror v5.46 - Code Mirror v5.46
- Corrections : - Corrections :
- Liens de l'éditeur de page : impossibilité de sélectionner un lien vers une page parente - Liens de l'éditeur de page : impossibilité de sélectionner un lien vers une page parente
- Export des données du site, problème lors de la création de l'arborescence - Export des données du site, problème lors de la création de l'arborescence.
- Titre de l'icône Youtube erroné
- Translittératon activée et multi-sélection dans le gestionnaire de fichiers
## Version 9.0.20 ## Version 9.0.20
- Correction : - Correction :
@ -16,11 +32,11 @@
## Version 9.0.19 ## Version 9.0.19
- Correction : - Correction :
- Alignement du menu - Alignement du menu
## Version 9.0.18 ## Version 9.0.18
- Correction : - Correction :
- Etat par défaut du numéro de version mal récupéré - Etat par défaut du numéro de version mal récupéré
## Version 9.0.17 ## Version 9.0.17
- Mises à jour : - Mises à jour :
@ -31,10 +47,10 @@
- Harmonisation du contenu des bulles d'aide - Harmonisation du contenu des bulles d'aide
- Modifications : - Modifications :
- Ajout du numéro de version dans le pied de page activable dans la configuration du thème - Ajout du numéro de version dans le pied de page activable dans la configuration du thème
- Désactivation Aviary dans Responsive FileManager - Désactivation Aviary dans Responsive FileManager
## Version 9.0.16 ## Version 9.0.16
- Corrections : - Correction :
- Nom de page constitué de caractères filtrés empếchant la création d'un Id valide. - Nom de page constitué de caractères filtrés empếchant la création d'un Id valide.
- Module Gallery : bouton de fermeture sous Edge - Module Gallery : bouton de fermeture sous Edge
@ -46,11 +62,11 @@
- Masquage de l'icône de gestion du compte - Masquage de l'icône de gestion du compte
## Version 9.0.14 ## Version 9.0.14
- Modifications : - Corrections :
- Tippy, lity et TinyMCE, simpleLightbox : - Débordement dans le pied de page quand le copyright est à droite
- légende et titre, nouveaux paramètres - Modifications :
- SimpleLightbox : bug d'affichage sous Edge, autre méthode - Petits écrans, menu d'administration plus icônes plus grandes
- Meilleure intégration - Masquage de l'icône de gestion du compte
## Version 9.0.13 ## Version 9.0.13
- Modifications : - Modifications :

View File

@ -328,9 +328,29 @@ core.start = function() {
}); });
}).trigger("resize"); }).trigger("resize");
// Ajouter l'attribut data-lity afin de faire la liaison avec lity
//$("a[rel='data-lity']").attr("data-lity","");
// Ajouter la classe Gallery afin de faire la liaison avec simplelightbox
//$("a[rel='gallery']").addClass("gallery","");
// Appel dans init.js
// $('.gallery').simpleLightbox();
}; };
core.start(); core.start();
/**
* Confirmation de suppression
*/
$("#pageDelete").on("click", function() {
var _this = $(this);
return core.confirm("Êtes-vous sûr de vouloir supprimer cette page ?", function() {
$(location).attr("href", _this.attr("href"));
});
});
/** /**
* Calcul de la luminance relative d'une couleur * Calcul de la luminance relative d'une couleur
*/ */

View File

@ -27,8 +27,8 @@ class common {
const GROUP_MODERATOR = 2; const GROUP_MODERATOR = 2;
const GROUP_ADMIN = 3; const GROUP_ADMIN = 3;
// Numéro de version stable // Numéro de version
const ZWII_VERSION = '9.0.21'; const ZWII_VERSION = '9.1.00.dev63';
public static $actions = []; public static $actions = [];
public static $coreModuleIds = [ public static $coreModuleIds = [
@ -55,6 +55,8 @@ class common {
public $output = [ public $output = [
'access' => true, 'access' => true,
'content' => '', 'content' => '',
'contentLeft' => '',
'contentRight' => '',
'display' => self::DISPLAY_LAYOUT_MAIN, 'display' => self::DISPLAY_LAYOUT_MAIN,
'metaDescription' => '', 'metaDescription' => '',
'metaTitle' => '', 'metaTitle' => '',
@ -79,7 +81,8 @@ class common {
'tippy', 'tippy',
'zwiico', 'zwiico',
'imagemap', 'imagemap',
'simplelightbox' 'simplelightbox',
'swiper'
], ],
'view' => '' 'view' => ''
]; ];
@ -142,8 +145,6 @@ class common {
} }
// Mise à jour des données core // Mise à jour des données core
// Fonction désactivée en dev
// if (stripos(common::ZWII_VERSION, 'dev') === 0 )
$this->update(); $this->update();
// Utilisateur connecté // Utilisateur connecté
@ -213,9 +214,6 @@ class common {
$this->url = $this->getData(['config', 'homePageId']); $this->url = $this->getData(['config', 'homePageId']);
} }
} }
// Mise à jour de la liste des pages pour TinyMCE
$this->linkList();
} }
/** /**
@ -519,7 +517,6 @@ class common {
* Enregistre les données dans deux fichiers séparés * Enregistre les données dans deux fichiers séparés
*/ */
public function saveData() { public function saveData() {
// Save config core page module et user // Save config core page module et user
// 5 premières clés principales // 5 premières clés principales
// Trois tentatives // Trois tentatives
@ -543,9 +540,10 @@ class common {
} }
/** /**
* Génére un fichier json avec la liste des * Génére un fichier json avec la liste des pages
*
*/ */
public function linkList() { public function pages2Json() {
// Sauve la liste des pages pour TinyMCE // Sauve la liste des pages pour TinyMCE
$parents = []; $parents = [];
$rewrite = (helper::checkRewrite()) ? '' : '?'; $rewrite = (helper::checkRewrite()) ? '' : '?';
@ -590,6 +588,89 @@ class common {
} }
} }
/**
* Génére un fichier robots.txt à l'installation
* Si le fichier exite déjà les commandes sont ajoutées
*/
public function createRobots() {
$robotValue =
PHP_EOL .
'# ZWII CONFIG ---------' . PHP_EOL .
'User-agent: *' . PHP_EOL .
'Disallow: /core/' . PHP_EOL .
'Disallow: /module/' .PHP_EOL .
'Disallow: /site/data' .PHP_EOL .
'Disallow: /site/tmp' .PHP_EOL .
'Disallow: /site/backup' .PHP_EOL .
'Allow: /site/file/' .PHP_EOL .
'Sitemap: ' . helper::baseUrl() . 'sitemap.xml' . PHP_EOL .
'Sitemap: ' . helper::baseUrl() . 'sitemap.xml.gz' . PHP_EOL .
'# ZWII CONFIG ---------' . PHP_EOL ;
if (file_exists('robots.txt')) {
return(file_put_contents(
'robots.txt',
$robotValue,
FILE_APPEND
));
} else {
// Sinon on crée un fichier
return(file_put_contents(
'robots.txt',
$robotValue
));
}
}
/**
* Génére un fichier un fchier sitemap.xml
* https://github.com/icamys/php-sitemap-generator
* $command valeurs possible
* all : génére un site map complet
* Sinon contient id de la page à créer
*/
public function createSitemap($command = "all") {
require_once "core/vendor/sitemap/SitemapGenerator.php";
$sitemap = new \Icamys\SitemapGenerator\SitemapGenerator(helper::baseurl());
// will create also compressed (gzipped) sitemap
$sitemap->createGZipFile = true;
// determine how many urls should be put into one file
// according to standard protocol 50000 is maximum value (see http://www.sitemaps.org/protocol.html)
$sitemap->maxURLsPerSitemap = 50000;
// sitemap file name
$sitemap->sitemapFileName = "sitemap.xml";
$datetime = new DateTime(date('c'));
$datetime->format(DateTime::ATOM); // Updated ISO8601
// sitemap index file name
$sitemap->sitemapIndexFileName = "sitemap-index.xml";
foreach($this->getHierarchy(null, false, false) as $parentPageId => $childrenPageIds) {
$sitemap->addUrl ($parentPageId,$datetime);
foreach($childrenPageIds as $childKey) {
$sitemap->addUrl($childKey,$datetime);
}
}
// generating internally a sitemap
$sitemap->createSitemap();
// writing early generated sitemap to file
$sitemap->writeSitemap();
return(file_exists('sitemap.xml'));
}
/** /**
* Envoi un mail * Envoi un mail
@ -790,6 +871,14 @@ class common {
$this->setData(['core', 'dataVersion', 9017]); $this->setData(['core', 'dataVersion', 9017]);
$this->SaveData(); $this->SaveData();
} }
// Version 9.1.0
if($this->getData(['core', 'dataVersion']) < 9100) {
$this->setData(['theme','footer','displayVersion', true ]);
$this->setData(['theme','footer','displaySiteMap', true ]);
$this->setData(['theme','footer','displayCopyright', true ]);
$this->setData(['core', 'dataVersion', 9100]);
$this->SaveData();
}
} }
} }
@ -1025,6 +1114,7 @@ class core extends common {
} }
// Breadcrumb // Breadcrumb
$title = $this->getData(['page', $this->getUrl(0), 'title']); $title = $this->getData(['page', $this->getUrl(0), 'title']);
if (!empty($this->getData(['page', $this->getUrl(0), 'parentPageId'])) && if (!empty($this->getData(['page', $this->getUrl(0), 'parentPageId'])) &&
$this->getData(['page', $this->getUrl(0), 'breadCrumb'])) { $this->getData(['page', $this->getUrl(0), 'breadCrumb'])) {
@ -1048,12 +1138,15 @@ class core extends common {
'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']), 'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']),
'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']), 'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']),
'iconUrl' => $this->getData(['page', $this->getUrl(0), 'iconUrl']), 'iconUrl' => $this->getData(['page', $this->getUrl(0), 'iconUrl']),
'disable' => $this->getData(['page', $this->getUrl(0), 'disable']) 'disable' => $this->getData(['page', $this->getUrl(0), 'disable']),
'contentRight' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'content']),
'contentLeft' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'content'])
]); ]);
} }
// Importe le module // Importe le module
else { else {
// Id du module, et valeurs en sortie de la page si il s'agit d'un module de page // Id du module, et valeurs en sortie de la page si il s'agit d'un module de page
if($access AND $this->getData(['page', $this->getUrl(0), 'moduleId'])) { if($access AND $this->getData(['page', $this->getUrl(0), 'moduleId'])) {
$moduleId = $this->getData(['page', $this->getUrl(0), 'moduleId']); $moduleId = $this->getData(['page', $this->getUrl(0), 'moduleId']);
$this->addOutput([ $this->addOutput([
@ -1062,7 +1155,9 @@ class core extends common {
'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']), 'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']),
'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']), 'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']),
'iconUrl' => $this->getData(['page', $this->getUrl(0), 'iconUrl']), 'iconUrl' => $this->getData(['page', $this->getUrl(0), 'iconUrl']),
'disable' => $this->getData(['page', $this->getUrl(0), 'disable']) 'disable' => $this->getData(['page', $this->getUrl(0), 'disable']),
'contentRight' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'content']),
'contentLeft' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'content'])
]); ]);
$pageContent = $this->getData(['page', $this->getUrl(0), 'content']); $pageContent = $this->getData(['page', $this->getUrl(0), 'content']);
} }
@ -1460,7 +1555,7 @@ class helper {
// Cas où un identifiant est vide // Cas où un identifiant est vide
if (empty($text)) { if (empty($text)) {
$text = uniqid('page-'); $text = uniqid('page-');
} }
// Un ID ne peut pas être un entier, pour éviter les conflits avec le système de pagination // Un ID ne peut pas être un entier, pour éviter les conflits avec le système de pagination
if(intval($text) !== 0) { if(intval($text) !== 0) {
$text = 'i' . $text; $text = 'i' . $text;
@ -1690,14 +1785,14 @@ class layout extends common {
*/ */
public function showAnalytics() { public function showAnalytics() {
if($code = $this->getData(['config', 'analyticsId'])) { if($code = $this->getData(['config', 'analyticsId'])) {
echo '<script> echo '<!-- Global site tag (gtag.js) - Google Analytics -->
(function(i,s,o,g,r,a,m){i["GoogleAnalyticsObject"]=r;i[r]=i[r]||function(){ <script async src="https://www.googletagmanager.com/gtag/js?id='. $code .'"></script>
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), <script>
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) window.dataLayer = window.dataLayer || [];
})(window,document,"script","https://www.google-analytics.com/analytics.js","ga"); function gtag(){dataLayer.push(arguments);}
ga("create", "' . $code . '", "auto"); gtag("js", new Date());
ga("send", "pageview"); gtag("config","'. $code .'");
</script>'; </script>';
} }
} }
@ -1716,22 +1811,48 @@ class layout extends common {
echo '<h2 id="sectionTitle">' . $this->core->output['title'] . '</h2>'; echo '<h2 id="sectionTitle">' . $this->core->output['title'] . '</h2>';
} }
echo $this->core->output['content']; echo $this->core->output['content'];
} }
/**
* Affiche le contenu de la barre gauche
* @param page chargée
*/
public function showBarContentLeft() {
echo $this->core->output['contentLeft'];
}
/** /**
* Affiche le contenu de la barre droite
* @param page chargée
*/
public function showBarContentRight() {
echo $this->core->output['contentRight'];
}
/**
* Affiche le copyright * Affiche le copyright
*/ */
public function showCopyright() { public function showCopyright() {
$items = '<div id="footerCopyright">'; $items = '<div id="footerCopyright">';
$items .= '<span id="footerFont">Motorisé&nbsp;par&nbsp;<a href="http://zwiicms.com/" onclick="window.open(this.href);return false" data-tippy-content="Zwii CMS sans base de données, très léger et performant">Zwii'; $items .= '<span id="footerFont">';
$items .= ' <span id="footerDisplayVersion" ' . $items .= '<span id="footerDisplayCopyright">';
($this->getData(['theme','footer','displayVersion']) === true ? '>': 'class="displayNone" >' ) . if ($this->getData(['theme','footer','displayCopyright']) === true) {
common::ZWII_VERSION . $items .= 'Motorisé&nbsp;par&nbsp</span>';
"</span>" ; }
$items .= '</a>'; $items .= '<a href="http://zwiicms.com/" onclic="window.open(this.href);return false" data-tippy-content="Zwii CMS sans base de données, très léger et performant">ZwiiCMS</a>';
$items .= '&nbsp;|&nbsp;<a href="' . helper::baseUrl() . 'sitemap" data-tippy-content="Plan du site" >Plan&nbsp;du&nbsp;site</a></span>'; //$items .= '</span>';
$items .= '<span id="footerDisplayVersion">';
if ($this->getData(['theme','footer','displayVersion']) === true ) {
$items .= '<wbr>&nbsp;'. common::ZWII_VERSION ;
}
$items .= '</span>';
$items .= '<span id="footerDisplaySiteMap">';
if ($this->getData(['theme','footer','displaySiteMap']) === true ) {
$items .= '<wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() .
'sitemap" data-tippy-content="Plan du site" >Plan&nbsp;du&nbsp;site</a>';
}
if( if(
( (
$this->getData(['theme', 'footer', 'loginLink']) $this->getData(['theme', 'footer', 'loginLink'])
@ -1741,11 +1862,11 @@ class layout extends common {
) { ) {
$items .= '<span id="footerLoginLink" ' . $items .= '<span id="footerLoginLink" ' .
($this->getUrl(0) === 'theme' ? 'class="displayNone"' : '') . ($this->getUrl(0) === 'theme' ? 'class="displayNone"' : '') .
'>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . 'user/login/' . '><wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . 'user/login/' .
strip_tags(str_replace('/', '_', $this->getUrl())) . strip_tags(str_replace('/', '_', $this->getUrl())) .
'" data-tippy-content="Connexion à l\'administration" >Connexion</a></span>'; '" data-tippy-content="Connexion à l\'administration" >Connexion</a></span>';
} }
$items .= '</div>'; $items .= '</span></div>';
echo $items; echo $items;
} }
@ -1775,9 +1896,13 @@ class layout extends common {
$items = ''; $items = '';
$currentPageId = $this->getData(['page', $this->getUrl(0)]) ? $this->getUrl(0) : $this->getUrl(2); $currentPageId = $this->getData(['page', $this->getUrl(0)]) ? $this->getUrl(0) : $this->getUrl(2);
foreach($this->getHierarchy() as $parentPageId => $childrenPageIds) { foreach($this->getHierarchy() as $parentPageId => $childrenPageIds) {
// Passer les entrées masquées
if ($this->getData(['page',$parentPageId,'hideMenuHead']) === true ) {
continue;
}
// Propriétés de l'item // Propriétés de l'item
$active = ($parentPageId === $currentPageId OR in_array($currentPageId, $childrenPageIds)) ? ' class="active"' : ''; $active = ($parentPageId === $currentPageId OR in_array($currentPageId, $childrenPageIds)) ? ' class="active"' : '';
$targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank"' : ''; $targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank"' : '';
// Mise en page de l'item // Mise en page de l'item
$items .= '<li>'; $items .= '<li>';
@ -1789,7 +1914,6 @@ class layout extends common {
$items .= '<a href="' . helper::baseUrl() . $parentPageId . '"' . $active . $targetBlank . '>'; $items .= '<a href="' . helper::baseUrl() . $parentPageId . '"' . $active . $targetBlank . '>';
} }
switch ($this->getData(['page', $parentPageId, 'typeMenu'])) { switch ($this->getData(['page', $parentPageId, 'typeMenu'])) {
case '' : case '' :
$items .= $this->getData(['page', $parentPageId, 'title']); $items .= $this->getData(['page', $parentPageId, 'title']);
@ -1813,18 +1937,31 @@ class layout extends common {
} }
break; break;
} }
// Cas où les pages enfants enfant sont toutes masquées dans le menu
// ne pas afficher de symbole lorsqu'il n'y a rien à afficher
$totalChild = 0;
if($childrenPageIds) { $disableChild = 0;
foreach($childrenPageIds as $childKey) {
$totalChild += 1;
if ($this->getData(['page',$childKey,'hideMenuHead']) === true ) {
$disableChild += 1;
}
}
if($childrenPageIds && $disableChild !== $totalChild &&
$this->getdata(['page',$parentPageId,'hideMenuChildren']) === false) {
$items .= template::ico('down', 'left'); $items .= template::ico('down', 'left');
} }
// ------------------------------------------------
$items .= '</a>'; $items .= '</a>';
if ($this->getdata(['page',$parentPageId,'hideMenuChildren']) === true) {
continue;
}
$items .= '<ul>'; $items .= '<ul>';
foreach($childrenPageIds as $childKey) { foreach($childrenPageIds as $childKey) {
// Passer les entrées masquées
if ($this->getData(['page',$childKey,'hideMenuHead']) === true ) {
continue;
}
// Propriétés de l'item // Propriétés de l'item
$active = ($childKey === $currentPageId) ? ' class="active"' : ''; $active = ($childKey === $currentPageId) ? ' class="active"' : '';
$targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : ''; $targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : '';
@ -1894,12 +2031,116 @@ class layout extends common {
echo '<ul>' . $items . '</ul>'; echo '<ul>' . $items . '</ul>';
} }
/**
* Générer un menu pour la barre latérale
* Uniquement texte
* @param onlyChildren n'affiche les sous-pages de la page actuelle
*/
public function showMenuSide($onlyChildren = null) {
// Met en forme les items du menu
$items = '';
// Nom de la page courante
$currentPageId = $this->getData(['page', $this->getUrl(0)]) ? $this->getUrl(0) : $this->getUrl(2);
// Nom de la page parente
$currentParentPageId = $this->getData(['page',$currentPageId,'parentPageId']);
// Détermine si on affiche uniquement le parent et les enfants
// Filtre contient le nom de la page parente
if ($onlyChildren === true) {
if (empty($currentParentPageId)) {
$filterCurrentPageId = $currentPageId;
} else {
$filterCurrentPageId = $currentParentPageId;
}
//if ($this->getData(['page',$filterCurrentPageId,'hideTitle']) == false) {
// echo '<h3 id="menuSideTitle"><a href="' . helper::baseUrl() . $currentPageId . '">' . $this->getData(['page',$filterCurrentPageId,'title']) . '</a></h3>';
//}
}
foreach($this->getHierarchy() as $parentPageId => $childrenPageIds) {
// Ne pas afficher les entrées masquées
if ($this->getData(['page',$parentPageId,'hideMenuSide']) === true ) {
continue;
}
// Filtre actif et nom de la page parente courante différente, on sort de la boucle
if ($onlyChildren === true && $parentPageId !== $filterCurrentPageId) {
continue;
}
// Propriétés de l'item
$active = ($parentPageId === $currentPageId OR in_array($currentPageId, $childrenPageIds)) ? ' class="active"' : '';
$targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank"' : '';
// Mise en page de l'item;
// Ne pas afficher le parent d'une sous-page quand l'option est sélectionnée.
if ($onlyChildren === false) {
$items .= '<li id="menuSide">';
if ( $this->getData(['page',$parentPageId,'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) {
$items .= '<a href="'.$this->getUrl(1).'">';
} else {
$items .= '<a href="' . helper::baseUrl() . $parentPageId . '"' . $active . $targetBlank . '>';
}
$items .= $this->getData(['page', $parentPageId, 'title']);
// Cas où les pages enfants enfant sont toutes masquées dans le menu
// ne pas afficher de symbole lorsqu'il n'y a rien à afficher
//$totalChild = 0;
//$disableChild = 0;
//foreach($childrenPageIds as $childKey) {
// $totalChild += 1;
// if ($this->getData(['page',$childKey,'hideMenuSide']) === true ) {
// $disableChild += 1;
// }
//}
//if($childrenPageIds && $disableChild !== $totalChild ) {
// $items .= template::ico('down', 'left');
//}
// ------------------------------------------------
// A garder mais désactivé avec la suppresion du thème
$items .= '</a>';
} else {
$items .= '</ul>';
}
$items .= '<ul id="menuSideChild">';
foreach($childrenPageIds as $childKey) {
// Passer les entrées masquées
if ($this->getData(['page',$childKey,'hideMenuSide']) === true ) {
continue;
}
// Propriétés de l'item
$active = ($childKey === $currentPageId) ? ' class="active"' : '';
$targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : '';
// Mise en page du sous-item
$items .= '<li id="menuSideChild">';
if ( $this->getData(['page',$childKey,'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') )
{$items .= '<a href="'.$this->getUrl(1).'">';}
else {
$items .= '<a href="' . helper::baseUrl() . $childKey . '"' . $active . $targetBlank . '>'; }
$items .= $this->getData(['page', $childKey, 'title']);
$items .= '</a></li>';
}
$items .= '</ul>';
$items .= '</li>';
}
// Retourne les items du menu
echo '<ul id="menuSide">' . $items . '</ul>';
}
/** /**
* Affiche le meta titre * Affiche le meta titre
*/ */
public function showMetaTitle() { public function showMetaTitle() {
echo '<title>' . $this->core->output['metaTitle'] . '</title>'; echo '<title>' . $this->core->output['metaTitle'] . '</title>';
echo '<meta property="og:title" content="' . $this->core->output['metaTitle'] . '" />'; echo '<meta property="og:title" content="' . $this->core->output['metaTitle'] . '" />';
$canonical = ($this->getUrl(0) == "accueil") ? "" : "?".$this->getUrl(0) ;
echo '<link rel="canonical" href="'. helper::baseUrl(false) . $canonical .'" />';
} }
/** /**
@ -2014,6 +2255,7 @@ class layout extends common {
OR $this->getUrl(0) === '' OR $this->getUrl(0) === ''
) { ) {
$leftItems .= '<li><a href="' . helper::baseUrl() . 'page/edit/' . $this->getUrl(0) . '" data-tippy-content="Modifier la page">' . template::ico('pencil') . '</a></li>'; $leftItems .= '<li><a href="' . helper::baseUrl() . 'page/edit/' . $this->getUrl(0) . '" data-tippy-content="Modifier la page">' . template::ico('pencil') . '</a></li>';
$leftItems .= '<li><a id="pageDelete" href="' . helper::baseUrl() . 'page/delete/' . $this->getUrl(0) . '&csrf=' . $_SESSION['csrf'] . '" data-tippy-content="Effacer la page">' . template::ico('trash') . '</a></li>';
} }
} }
// Items de droite // Items de droite
@ -2069,6 +2311,10 @@ class layout extends common {
$socialUrl = 'https://www.facebook.com/'; $socialUrl = 'https://www.facebook.com/';
$title = 'Facebook'; $title = 'Facebook';
break; break;
case 'linkedinId':
$socialUrl = 'https://fr.linkedin.com/in/';
$title = 'Linkedin';
break;
case 'instagramId': case 'instagramId':
$socialUrl = 'https://www.instagram.com/'; $socialUrl = 'https://www.instagram.com/';
$title = 'Instagram'; $title = 'Instagram';

View File

@ -31,10 +31,30 @@ body {
*/ */
@media (max-width: 768px) { @media (max-width: 768px) {
body { body {
margin:2px 2px !important; margin:2px 2px !important;
} }
#site { #site {
margin:2px auto !important; margin:0px auto !important;
}
header {
margin:0px 0px !important;
background-size: cover !important;
}
}
@media (max-width: 992px) {
.siteContainer {
display: flex;
flex-direction: column;
}
.siteContainer > #contentLeft {
order: 2;
}
.siteContainer > #contentRight {
order: 3;
}
.siteContainer > #contentSite {
order: 1;
} }
} }
@ -320,13 +340,14 @@ td > .col12 {
width: 70% !important; width: 70% !important;
} }
#bar #barRight { #bar #barRight {
font-size: 1.2em; font-size: 1.2em;
} }
#bar #barSelectPage { #bar #barSelectPage {
width: 80%; width: 80%;
font-size: 120%; font-size: 120%;
} }
} }
@media (max-width: 992px) { @media (max-width: 992px) {
#bar .zwiico-user { #bar .zwiico-user {
display: none; display: none;
@ -380,6 +401,7 @@ nav #toggle span {
nav #menu { nav #menu {
display: block; display: block;
} }
nav ul { nav ul {
padding: 0; padding: 0;
margin: 0; margin: 0;
@ -389,6 +411,7 @@ nav li {
display: inline-block; display: inline-block;
position: relative; position: relative;
} }
nav li ul { nav li ul {
display: block; display: block;
position: absolute; position: absolute;
@ -397,13 +420,15 @@ nav li ul {
opacity: 0; opacity: 0;
-webkit-transition: .3s ease-out; -webkit-transition: .3s ease-out;
transition: .3s ease-out; transition: .3s ease-out;
padding-left: 10px;
} }
nav li ul li { nav li ul li {
display: block; display: block;
text-align: left; text-align: left;
} }
nav li:hover ul { nav li:hover ul {
z-index: 1; z-index: 2;
opacity: 1; opacity: 1;
} }
nav a { nav a {
@ -439,6 +464,8 @@ nav a:hover {
padding-left: 40px !important; padding-left: 40px !important;
} }
} }
/* Barre de navigation fixe quand le menu est en-dehors du site */ /* Barre de navigation fixe quand le menu est en-dehors du site */
#navfixedlogout { #navfixedlogout {
position: -webkit-sticky; /* Safari */ position: -webkit-sticky; /* Safari */
@ -460,6 +487,19 @@ nav .zwiico-menu {
} }
/* Menu vertical */
#menuSide, #menuSideChild {
padding-left: 10px;
margin: 0px;
list-style: none;
}
ul #menuSideChild, li #menuSideChild {
padding-left:10px;
}
/* Corps */ /* Corps */
section { section {
padding: 20px; padding: 20px;
@ -487,12 +527,17 @@ body > footer {
footer { footer {
text-align: center; text-align: center;
padding: 1px 20px; padding: 1px 20px;
vertical-align:middle;
}
footer .col4 {
vertical-align: middle; vertical-align: middle;
} }
#footerLoginLink,
#footerDisplayCopyright,
#footerDisplayVersion,
#footerDisplaySiteMap {
font-size: inherit;
}
/* Conserve le pied de page sur une ligne */ /* Conserve le pied de page sur une ligne */
@media (max-width: 992px) { @media (max-width: 992px) {
footer .col4 { footer .col4 {
@ -503,10 +548,6 @@ footer .col4 {
} }
} }
#footerDisplayVersion {
font-size: inherit;
}
footer #footerSocials span { footer #footerSocials span {
color: #FFF; color: #FFF;
padding: 9px; padding: 9px;
@ -522,11 +563,11 @@ footer #footerSocials .zwiico-facebook {
footer #footerSocials .zwiico-facebook:hover { footer #footerSocials .zwiico-facebook:hover {
background: #324B80; background: #324B80;
} }
footer #footerSocials .zwiico-googleplus { footer #footerSocials .zwiico-linkedin {
background: #DD4B39; background: #007BB6;
} }
footer #footerSocials .zwiico-googleplus:hover { footer #footerSocials .zwiico-linkedin:hover {
background: #D03724; background: #006881;
} }
footer #footerSocials .zwiico-instagram { footer #footerSocials .zwiico-instagram {
background: #E4405F; background: #E4405F;

View File

@ -1,294 +1,325 @@
<?php $layout = new layout($this); ?> <?php $layout = new layout($this); ?>
<!DOCTYPE html> <!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" lang="fr"> <html prefix="og: http://ogp.me/ns#" lang="fr">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<?php $layout->showMetaTitle(); ?> <?php $layout->showMetaTitle(); ?>
<?php $layout->showMetaDescription(); ?> <?php $layout->showMetaDescription(); ?>
<?php $layout->showMetaType(); ?> <?php $layout->showMetaType(); ?>
<?php $layout->showMetaImage(); ?> <?php $layout->showMetaImage(); ?>
<?php $layout->showFavicon(); ?> <?php $layout->showFavicon(); ?>
<?php $layout->showVendor(); ?> <?php $layout->showVendor(); ?>
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>core/layout/common.css"> <?php $layout->showAnalytics(); ?>
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>site/data/theme.css?<?php echo md5_file('site/data/theme.css'); ?>"> <link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>core/layout/common.css">
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>site/data/custom.css?<?php echo md5_file('site/data/custom.css'); ?>"> <link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>site/data/theme.css?<?php echo md5_file('site/data/theme.css'); ?>">
</head> <link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>site/data/custom.css?<?php echo md5_file('site/data/custom.css'); ?>">
<body> </head>
<?php $layout->showStyle(); ?> <body>
<?php $layout->showBar(); ?> <?php $layout->showStyle(); ?>
<?php $layout->showNotification(); ?> <?php $layout->showBar(); ?>
<?php if($this->getData(['theme', 'menu', 'position']) === 'body-first' || $this->getData(['theme', 'menu', 'position']) === 'top' ): ?> <?php $layout->showNotification(); ?>
<!-- Menu dans le fond du site avant la bannière --> <?php if($this->getData(['theme', 'menu', 'position']) === 'body-first' || $this->getData(['theme', 'menu', 'position']) === 'top' ): ?>
<nav <!-- Menu dans le fond du site avant la bannière -->
<?php <nav
// Détermine si le menu est fixe en haut de page lorsque l'utilisateur n'est pas connecté <?php
// // Détermine si le menu est fixe en haut de page lorsque l'utilisateur n'est pas connecté
if($this->getData(['theme', 'menu', 'position']) === 'top' && //
$this->getData(['theme', 'menu', 'fixed']) === true) { if($this->getData(['theme', 'menu', 'position']) === 'top' &&
if ($this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')) $this->getData(['theme', 'menu', 'fixed']) === true) {
{echo 'id="navfixedlogout"';} if ($this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD'))
elseif ($this->getUrl(0) !== 'theme') {echo 'id="navfixedlogout"';}
{echo 'id="navfixedconnected"';} elseif ($this->getUrl(0) !== 'theme')
} {echo 'id="navfixedconnected"';}
?> }
> ?>
<div id="toggle"><?php echo template::ico('menu'); ?></div> >
<div id="menu" class=" <div id="toggle"><?php echo template::ico('menu'); ?></div>
<?php if($this->getData(['theme', 'menu', 'position']) === 'top'){echo 'container-large';}else{echo'container';} <div id="menu" class="
?>"> <?php if($this->getData(['theme', 'menu', 'position']) === 'top'){echo 'container-large';}else{echo'container';}
?>">
<?php $layout->showMenu(); ?>
</div> <?php $layout->showMenu(); ?>
</nav> </div>
<?php endif; ?> </nav>
<?php if($this->getData(['theme', 'header', 'position']) === 'body'): ?> <?php endif; ?>
<!-- Bannière dans le fond du site --> <?php if($this->getData(['theme', 'header', 'position']) === 'body'): ?>
<header> <!-- Bannière dans le fond du site -->
<?php <header>
if ($this->getData(['theme','header','linkHome'])){ <?php
echo "<a href='" . helper::baseUrl(false) . "'>" ;} ?> if ($this->getData(['theme','header','linkHome'])){
<?php if( echo "<a href='" . helper::baseUrl(false) . "'>" ;} ?>
$this->getData(['theme', 'header', 'textHide']) === false <?php if(
// Affiche toujours le titre de la bannière pour l'édition du thème $this->getData(['theme', 'header', 'textHide']) === false
OR ($this->getUrl(0) === 'theme' AND $this->getUrl(1) === 'header') // Affiche toujours le titre de la bannière pour l'édition du thème
): ?> OR ($this->getUrl(0) === 'theme' AND $this->getUrl(1) === 'header')
<div class="container"> ): ?>
<span><?php echo $this->getData(['config', 'title']); ?></span> <div class="container">
</div> <span><?php echo $this->getData(['config', 'title']); ?></span>
<?php endif; ?> </div>
<?php <?php endif; ?>
if ($this->getData(['theme','header','linkHome'])){echo "</a>";} <?php
?> if ($this->getData(['theme','header','linkHome'])){echo "</a>";}
</header> ?>
<?php endif; ?> </header>
<?php endif; ?>
<?php if($this->getData(['theme', 'menu', 'position']) === 'body-second'): ?>
<!-- Menu dans le fond du site après la bannière --> <?php if($this->getData(['theme', 'menu', 'position']) === 'body-second'): ?>
<nav> <!-- Menu dans le fond du site après la bannière -->
<div id="toggle"><?php echo template::ico('menu'); ?></div> <nav>
<div id="menu" class="container"> <div id="toggle"><?php echo template::ico('menu'); ?></div>
<?php $layout->showMenu(); ?> <div id="menu" class="container">
</div> <?php $layout->showMenu(); ?>
</nav> </div>
<?php endif; ?> </nav>
<!-- Site --> <?php endif; ?>
<div id="site" class="container"> <!-- Site -->
<?php if($this->getData(['theme', 'menu', 'position']) === 'site-first'): ?> <div id="site" class="container">
<!-- Menu dans le site avant la bannière --> <?php if($this->getData(['theme', 'menu', 'position']) === 'site-first'): ?>
<nav> <!-- Menu dans le site avant la bannière -->
<div id="toggle"><?php echo template::ico('menu'); ?></div> <nav>
<div id="menu" class="container"> <div id="toggle"><?php echo template::ico('menu'); ?></div>
<?php $layout->showMenu(); ?> <div id="menu" class="container">
</div> <?php $layout->showMenu(); ?>
</nav> </div>
<?php endif; ?> </nav>
<?php if( <?php endif; ?>
$this->getData(['theme', 'header', 'position']) === 'site' <?php if(
// Affiche toujours la bannière pour l'édition du thème $this->getData(['theme', 'header', 'position']) === 'site'
OR ( // Affiche toujours la bannière pour l'édition du thème
$this->getData(['theme', 'header', 'position']) === 'hide' OR (
AND $this->getUrl(0) === 'theme' $this->getData(['theme', 'header', 'position']) === 'hide'
) AND $this->getUrl(0) === 'theme'
): ?> )
<!-- Bannière dans le site --> ): ?>
<?php <!-- Bannière dans le site -->
if ($this->getData(['theme','header','linkHome'])){ <?php
echo "<a href='" . helper::baseUrl(false) . "'>" ;} ?> if ($this->getData(['theme','header','linkHome'])){
<header <?php if($this->getData(['theme', 'header', 'position']) === 'hide'): ?>class="displayNone"<?php endif; ?>> echo "<a href='" . helper::baseUrl(false) . "'>" ;} ?>
<?php if( <header <?php if($this->getData(['theme', 'header', 'position']) === 'hide'): ?>class="displayNone"<?php endif; ?>>
$this->getData(['theme', 'header', 'textHide']) === false <?php if(
// Affiche toujours le titre de la bannière pour l'édition du thème $this->getData(['theme', 'header', 'textHide']) === false
OR ($this->getUrl(0) === 'theme' AND $this->getUrl(1) === 'header') // Affiche toujours le titre de la bannière pour l'édition du thème
): ?> OR ($this->getUrl(0) === 'theme' AND $this->getUrl(1) === 'header')
<div class="container"> ): ?>
<span><?php echo $this->getData(['config', 'title']); ?></span> <div class="container">
</div> <span><?php echo $this->getData(['config', 'title']); ?></span>
<?php endif; ?> </div>
</header> <?php endif; ?>
<?php </header>
if ($this->getData(['theme','header','linkHome'])){echo "</a>";} ?> <?php
<?php endif; ?> if ($this->getData(['theme','header','linkHome'])){echo "</a>";} ?>
<?php if( <?php endif; ?>
$this->getData(['theme', 'menu', 'position']) === 'site-second' || <?php if(
$this->getData(['theme', 'menu', 'position']) === 'site' $this->getData(['theme', 'menu', 'position']) === 'site-second' ||
// Affiche toujours le menu pour l'édition du thème $this->getData(['theme', 'menu', 'position']) === 'site'
OR ( // Affiche toujours le menu pour l'édition du thème
$this->getData(['theme', 'menu', 'position']) === 'hide' OR (
AND $this->getUrl(0) === 'theme' $this->getData(['theme', 'menu', 'position']) === 'hide'
) AND $this->getUrl(0) === 'theme'
): ?> )
<!-- Menu dans le site après la bannière --> ): ?>
<nav <?php if($this->getData(['theme', 'menu', 'position']) === 'hide'): ?>class="displayNone"<?php endif; ?>> <!-- Menu dans le site après la bannière -->
<div id="toggle"><?php echo template::ico('menu'); ?></div> <nav <?php if($this->getData(['theme', 'menu', 'position']) === 'hide'): ?>class="displayNone"<?php endif; ?>>
<div id="menu" class="container"> <div id="toggle"><?php echo template::ico('menu'); ?></div>
<?php $layout->showMenu(); ?> <div id="menu" class="container">
</div> <?php $layout->showMenu(); ?>
</nav> </div>
<?php endif; ?> </nav>
<!-- Corps de page --> <?php endif; ?>
<section> <!-- Corps de page -->
<?php <section>
// Gabarit : <?php
// Récupérer la config de la page courante // Gabarit :
$blocks = explode('-',$this->getData(['page',$this->getUrl(0),'block'])); // Récupérer la config de la page courante
// Initialiser $blocks = explode('-',$this->getData(['page',$this->getUrl(0),'block']));
$blockleft=$blockright=""; // Initialiser
switch (sizeof($blocks)) { $blockleft=$blockright="";
case 1 : // une colonne switch (sizeof($blocks)) {
$content = 'col'. $blocks[0] ; case 1 : // une colonne
break; $content = 'col'. $blocks[0] ;
case 2 : // 2 blocks break;
if ($blocks[0] < $blocks[1]) { // détermine la position de la colonne case 2 : // 2 blocks
$blockleft = 'col'. $blocks[0]; if ($blocks[0] < $blocks[1]) { // détermine la position de la colonne
$content = 'col'. $blocks[1] ; $blockleft = 'col'. $blocks[0];
} else { $content = 'col'. $blocks[1] ;
$content = 'col' . $blocks[0]; } else {
$blockright = 'col' . $blocks[1]; $content = 'col' . $blocks[0];
} $blockright = 'col' . $blocks[1];
break; }
case 3 : // 3 blocks break;
$blockleft = 'col' . $blocks[0]; case 3 : // 3 blocks
$content = 'col' . $blocks[1]; $blockleft = 'col' . $blocks[0];
$blockright = 'col' . $blocks[2]; $content = 'col' . $blocks[1];
} $blockright = 'col' . $blocks[2];
// Page pleine pour la configuration des modules et l'édition des pages }
// ($this->getData(['page', $this->getUrl(2), 'moduleId']) == '' && // Page pleine pour la configuration des modules et l'édition des pages
// $this->getUrl(1) == 'config' || // Configuration d'un module en page pleine // ($this->getData(['page', $this->getUrl(2), 'moduleId']) == '' &&
// $this->getUrl(1) == 'data' || // données de formulaire en page pleine // $this->getUrl(1) == 'config' || // Configuration d'un module en page pleine
// $this->getUrl(1) == 'comment' // données des commentaires en page pleine // $this->getUrl(1) == 'data' || // données de formulaire en page pleine
if (sizeof($blocks) === 1 || // $this->getUrl(1) == 'comment' // données des commentaires en page pleine
!empty($this->getUrl(1)) ) { // Pleine page en mode configuration if (sizeof($blocks) === 1 ||
$layout->showContent(); !empty($this->getUrl(1)) ) { // Pleine page en mode configuration
} else { $layout->showContent();
?> } else {
<div class="row"> ?>
<?php if ($blockleft !== "") :?> <div class="<?php echo $blockleft; ?>" id="contentleft"> <div class="row siteContainer">
<?php <?php
echo $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'content']); if ($blockleft !== "") :?>
?></div> <?php endif; ?> <div class="<?php echo $blockleft; ?>" id="contentLeft">
<div class="<?php echo $content; ?>" id="contentsite"><?php $layout->showContent(); ?></div> <?php
<?php if ($blockright !== "") :?> <div class="<?php echo $blockright; ?>" id="contentright"> // Détermine si le bloc a un menu à inclure
<?php echo $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'content']); $layout->showBarContentLeft();
?></div> <?php endif; ?> // Type de menu affiché
</div> // 0 : aucun
<?php } ?> // 1 : menu complet
</section> // 2 : sous-menu de la page parente
<!-- footer --> if ($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'displayMenu']) !== 'none') {
<?php if( ?> <div id="menuSideLeft"><?php
$this->getData(['theme', 'footer', 'position']) === 'site' $layout->showMenuSide($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'displayMenu']) === 'parents' ? false : true);
// Affiche toujours le pied de page pour l'édition du thème ?></div><?php
OR ( }
$this->getData(['theme', 'footer', 'position']) === 'hide' ?>
AND $this->getUrl(0) === 'theme' </div>
) <?php endif; ?>
): ?> <div class="<?php echo $content; ?>
<!-- Pied de page dans le site --> " id="contentSite"><?php $layout->showContent(); ?>
</div>
<footer <?php if($this->getData(['theme', 'footer', 'position']) === 'hide'): ?>class="displayNone"<?php endif; ?>> <?php
<div class="container"> if ($blockright !== "") :?>
<div class="row" id="footersite"> <div class="<?php echo $blockright; ?>" id="contentRight">
<div class="col4" id="footersiteLeft"> <!-- bloc gauche --> <?php
<?php // Détermine si le bloc a un menu à inclure
if($this->getData(['theme', 'footer', 'textPosition']) === 'left') { $layout->showBarContentRight();
$layout->showFooterText();} // Type de menu affiché
?> // 0 : aucun
<?php // 1 : menu complet
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'left') { // 2 : sous-menu de la page parente
$layout->showSocials(); } if ($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'displayMenu']) !== 'none') {
?> ?> <div id="menuSideRight"><?php
<?php $layout->showMenuSide($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'displayMenu']) === 'parents' ? false : true);
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'left') { ?></div><?php
$layout->showCopyright(); } }
?> ?>
</div> </div>
<div class="col4" id="footersiteCenter"> <!-- bloc central --> <?php endif; ?>
<?php </div>
if($this->getData(['theme', 'footer', 'textPosition']) === 'center') { <?php } ?>
$layout->showFooterText(); } </section>
?> <!-- footer -->
<?php <?php if(
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'center') { $this->getData(['theme', 'footer', 'position']) === 'site'
$layout->showSocials(); } // Affiche toujours le pied de page pour l'édition du thème
?> OR (
<?php $this->getData(['theme', 'footer', 'position']) === 'hide'
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'center') { AND $this->getUrl(0) === 'theme'
$layout->showCopyright(); } )
?> ): ?>
</div> <!-- Pied de page dans le site -->
<div class="col4" id="footersiteRight"> <!-- bloc droite -->
<?php <footer <?php if($this->getData(['theme', 'footer', 'position']) === 'hide'): ?>class="displayNone"<?php endif; ?>>
if($this->getData(['theme', 'footer', 'textPosition']) === 'right') { <div class="container">
$layout->showFooterText(); } <div class="row" id="footersite">
?> <div class="col4" id="footersiteLeft"> <!-- bloc gauche -->
<?php <?php
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'right') { if($this->getData(['theme', 'footer', 'textPosition']) === 'left') {
$layout->showSocials(); } $layout->showFooterText();}
?> ?>
<?php <?php
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'right') { if($this->getData(['theme', 'footer', 'socialsPosition']) === 'left') {
$layout->showCopyright(); } $layout->showSocials(); }
?> ?>
</div> <?php
</div> if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'left') {
</div> $layout->showCopyright(); }
</footer> ?>
<?php endif; ?> </div>
</div> <div class="col4" id="footersiteCenter"> <!-- bloc central -->
<?php if($this->getData(['theme', 'footer', 'position']) === 'body'): ?> <?php
<!-- Pied de page dans le fond du site --> if($this->getData(['theme', 'footer', 'textPosition']) === 'center') {
<footer> $layout->showFooterText(); }
<div class="container-large"> ?>
<div class="row" id="footerbody"> <?php
<div class="col4" id="footerbodyLeft"> <!-- bloc gauche --> if($this->getData(['theme', 'footer', 'socialsPosition']) === 'center') {
<?php $layout->showSocials(); }
if($this->getData(['theme', 'footer', 'textPosition']) === 'left') { ?>
$layout->showFooterText(); } <?php
?> if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'center') {
<?php $layout->showCopyright(); }
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'left') { ?>
$layout->showSocials(); } </div>
?> <div class="col4" id="footersiteRight"> <!-- bloc droite -->
<?php <?php
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'left') { if($this->getData(['theme', 'footer', 'textPosition']) === 'right') {
$layout->showCopyright(); } $layout->showFooterText(); }
?> ?>
</div> <?php
<div class="col4" id="footerbodyCenter"> <!-- bloc central --> if($this->getData(['theme', 'footer', 'socialsPosition']) === 'right') {
<?php $layout->showSocials(); }
if($this->getData(['theme', 'footer', 'textPosition']) === 'center') { ?>
$layout->showFooterText(); } <?php
?> if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'right') {
<?php $layout->showCopyright(); }
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'center') { ?>
$layout->showSocials(); } </div>
?> </div>
<?php </div>
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'center') { </footer>
$layout->showCopyright(); } <?php endif; ?>
?> </div>
</div> <?php if($this->getData(['theme', 'footer', 'position']) === 'body'): ?>
<div class="col4" id="footerbodyRight"> <!-- bloc droite --> <!-- Pied de page dans le fond du site -->
<?php <footer>
if($this->getData(['theme', 'footer', 'textPosition']) === 'right') { <div class="container-large">
$layout->showFooterText(); } <div class="row" id="footerbody">
?> <div class="col4" id="footerbodyLeft"> <!-- bloc gauche -->
<?php <?php
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'right') { if($this->getData(['theme', 'footer', 'textPosition']) === 'left') {
$layout->showSocials(); } $layout->showFooterText(); }
?> ?>
<?php <?php
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'right') { if($this->getData(['theme', 'footer', 'socialsPosition']) === 'left') {
$layout->showCopyright();} $layout->showSocials(); }
?> ?>
</div> <?php
</div> if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'left') {
</div> $layout->showCopyright(); }
</footer> ?>
<?php endif; ?> </div>
<!-- Lien remonter en haut --> <div class="col4" id="footerbodyCenter"> <!-- bloc central -->
<div id="backToTop"><?php echo template::ico('up'); ?></div> <?php
<?php $layout->showAnalytics(); ?> if($this->getData(['theme', 'footer', 'textPosition']) === 'center') {
<?php $layout->showScript(); ?> $layout->showFooterText(); }
</body> ?>
<?php
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'center') {
$layout->showSocials(); }
?>
<?php
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'center') {
$layout->showCopyright(); }
?>
</div>
<div class="col4" id="footerbodyRight"> <!-- bloc droite -->
<?php
if($this->getData(['theme', 'footer', 'textPosition']) === 'right') {
$layout->showFooterText(); }
?>
<?php
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'right') {
$layout->showSocials(); }
?>
<?php
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'right') {
$layout->showCopyright();}
?>
</div>
</div>
</div>
</footer>
<?php endif; ?>
<!-- Lien remonter en haut -->
<div id="backToTop"><?php echo template::ico('up'); ?></div>
<?php $layout->showScript(); ?>
</body>
</html> </html>

View File

@ -17,6 +17,8 @@ class config extends common {
public static $actions = [ public static $actions = [
'backup' => self::GROUP_ADMIN, 'backup' => self::GROUP_ADMIN,
'configMetaImage' => self::GROUP_ADMIN, 'configMetaImage' => self::GROUP_ADMIN,
'generateFiles' => self::GROUP_ADMIN,
'updateRobots' => self::GROUP_ADMIN,
'index' => self::GROUP_ADMIN 'index' => self::GROUP_ADMIN
]; ];
@ -144,6 +146,55 @@ class config extends common {
]; ];
public function generateFiles() {
// Mettre à jour le site map
$successSitemap=$this->createSitemap('all');
// Creer un fichier robots.txt
$successRobots=$this->updateRobots();
if ( $successSitemap === true &&
$successRobots >= 100) {
$success = true;
} else {
$success = false;
}
// Valeurs en sortie
$this->addOutput([
'notification' => ($successSitemap === true && $successRobots >= 100) ? 'Création réussie' : 'Echec d\'écriture',
'redirect' => helper::baseUrl() . 'config',
'state' => ($successSitemap === true && $successRobots >=100) ? true : false
]);
}
/**
* Met à jour un fichier robots.txt lors du changement de réécriture
*/
public function updateRobots() {
// Créer le fichier robot si absent
if (!file_exists('robots.txt')) {
$this->createRobots();
}
// backup
rename ('robots.txt','robots.bak');
$fileold = fopen('robots.bak','r');
$filenew = fopen('robots.txt','w');
while(!feof($fileold)) {
$data = fgets($fileold);
if (strpos($data,'sitemap.xml') == 0) {
fwrite($filenew, $data);
} else {
fwrite($filenew, 'Sitemap: ' . helper::baseUrl() . 'sitemap.xml' . PHP_EOL);
fwrite($filenew, 'Sitemap: ' . helper::baseUrl() . 'sitemap.xml.gz' . PHP_EOL);
fwrite($filenew, '# ZWII CONFIG ---------' . PHP_EOL);
break;
}
}
fclose($fileold);
unlink('robots.bak');
return(fclose($filenew));
}
/** /**
* Sauvegarde des données * Sauvegarde des données
*/ */
@ -167,6 +218,7 @@ class config extends common {
$this->addOutput([ $this->addOutput([
'display' => self::DISPLAY_RAW 'display' => self::DISPLAY_RAW
]); ]);
unlink('site/tmp/' . $fileName);
} }
/** /**
@ -215,7 +267,7 @@ class config extends common {
'metaDescription' => $this->getInput('configMetaDescription', helper::FILTER_STRING_LONG, true), 'metaDescription' => $this->getInput('configMetaDescription', helper::FILTER_STRING_LONG, true),
'social' => [ 'social' => [
'facebookId' => $this->getInput('configSocialFacebookId'), 'facebookId' => $this->getInput('configSocialFacebookId'),
'googleplusId' => $this->getInput('configSocialGoogleplusId'), 'linkedinId' => $this->getInput('configSocialLinkedinId'),
'instagramId' => $this->getInput('configSocialInstagramId'), 'instagramId' => $this->getInput('configSocialInstagramId'),
'pinterestId' => $this->getInput('configSocialPinterestId'), 'pinterestId' => $this->getInput('configSocialPinterestId'),
'twitterId' => $this->getInput('configSocialTwitterId'), 'twitterId' => $this->getInput('configSocialTwitterId'),
@ -261,6 +313,8 @@ class config extends common {
helper::$rewriteStatus = false; helper::$rewriteStatus = false;
} }
} }
// Générer robots.txt et sitemap
$this->generateFiles();
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(), 'redirect' => helper::baseUrl() . $this->getUrl(),
@ -305,4 +359,4 @@ class configHelper extends helper {
return $dirContent; return $dirContent;
} }
} }

View File

@ -25,12 +25,12 @@
<?php echo template::text('configTitle', [ <?php echo template::text('configTitle', [
'label' => 'Titre du site', 'label' => 'Titre du site',
'value' => $this->getData(['config', 'title']), 'value' => $this->getData(['config', 'title']),
'help' => 'Affiché dans la barre de titre et inclus lors des partages sur les réseaux sociaux' 'help' => 'Il apparaît dans la barre de titre et les partages sur les réseaux sociaux.'
]); ?> ]); ?>
<?php echo template::textarea('configMetaDescription', [ <?php echo template::textarea('configMetaDescription', [
'label' => 'Description du site', 'label' => 'Description du site',
'value' => $this->getData(['config', 'metaDescription']), 'value' => $this->getData(['config', 'metaDescription']),
'help' => 'La description est incluse lors des partages sur les réseaux sociaux' 'help' => 'Elle apparaît dans les partages sur les réseaux sociaux.'
]); ?> ]); ?>
</div> </div>
<div class="block"> <div class="block">
@ -42,7 +42,7 @@
'value' => $this->getData(['config', 'favicon']) 'value' => $this->getData(['config', 'favicon'])
]); ?> ]); ?>
<?php echo template::text('configAnalyticsId', [ <?php echo template::text('configAnalyticsId', [
'help' => 'Saisissez l\'ID de suivi de votre propriété Google Analytics.', 'help' => 'Saisissez l\'ID de suivi.',
'label' => 'Google Analytics', 'label' => 'Google Analytics',
'placeholder' => 'UA-XXXXXXXX-X', 'placeholder' => 'UA-XXXXXXXX-X',
'value' => $this->getData(['config', 'analyticsId']) 'value' => $this->getData(['config', 'analyticsId'])
@ -52,28 +52,29 @@
]); ?> ]); ?>
<?php echo template::checkbox('rewrite', true, 'Réécriture d\'URL', [ <?php echo template::checkbox('rewrite', true, 'Réécriture d\'URL', [
'checked' => helper::checkRewrite(), 'checked' => helper::checkRewrite(),
'help' => 'Afin d\'éviter de bloquer votre site pensez à vérifier que le module de réécriture d\'URL est bien actif sur votre serveur avant d\'activer cette fonctionnalité.' 'help' => 'Vérifiez d\'abord que votre serveur l\'autorise : ce n\'est pas le cas chez Free.'
]); ?> ]); ?>
<?php echo template::select('itemsperPage', $module::$ItemsList, [ <?php echo template::select('itemsperPage', $module::$ItemsList, [
'label' => 'Pagination Blog et News', 'label' => 'Articles par page ("Blog" et "News")',
'selected' => $this->getData(['config', 'itemsperPage']), 'selected' => $this->getData(['config', 'itemsperPage'])
'help' => 'Nombre d\'articles de blog ou de news par page'
]); ?> ]); ?>
</div> </div>
<div class="block"> <div class="block">
<h4>Copie d'écran OpenGraph</h4> <h4>Copie d'écran OpenGraph</h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col8 offset2">
<img src='<?php echo helper::baseUrl(false) . 'site/file/source/screenshot.png';?>' /> <img src='<?php echo helper::baseUrl(false) . 'site/file/source/screenshot.png';?>' />
</div> </div>
<div class="col6"> </div>
<div class="row">
<div class="col10 offset1">
<?php echo template::button('configMetaImage', [ <?php echo template::button('configMetaImage', [
'href' => helper::baseUrl() . 'config/configMetaImage', 'href' => helper::baseUrl() . 'config/configMetaImage',
'value' => 'Rafraîchir la capture d\'écran' 'value' => 'Rafraîchir la capture d\'écran'
]); ?> ]); ?>
</div> </div>
</div> </div>
<p>Cette copie d'écran est nécessaire aux partages sur les réseaux sociaux. Elle est régénérée lorsque le fichier screenshot.png est effacé du gestionnaire de fichiers.</p> <p>Cette capture d'écran est nécessaire aux partages sur les réseaux sociaux. Elle est régénérée lorsque le fichier "screenshot.png" est effacé du gestionnaire de fichiers.</p>
</div> </div>
</div> </div>
<div class="col6"> <div class="col6">
@ -82,14 +83,14 @@
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::text('configSocialFacebookId', [ <?php echo template::text('configSocialFacebookId', [
'help' => 'Saisissez votre ID Facebook : https://www.facebook.com/[CETTE PARTIE].', 'help' => 'Saisissez votre ID : https://www.facebook.com/[ID].',
'label' => 'Facebook', 'label' => 'Facebook',
'value' => $this->getData(['config', 'social', 'facebookId']) 'value' => $this->getData(['config', 'social', 'facebookId'])
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::text('configSocialInstagramId', [ <?php echo template::text('configSocialInstagramId', [
'help' => 'Saisissez votre ID Instagram : https://www.instagram.com/[CETTE PARTIE].', 'help' => 'Saisissez votre ID : https://www.instagram.com/[ID].',
'label' => 'Instagram', 'label' => 'Instagram',
'value' => $this->getData(['config', 'social', 'instagramId']) 'value' => $this->getData(['config', 'social', 'instagramId'])
]); ?> ]); ?>
@ -99,14 +100,14 @@
<div class="col6"> <div class="col6">
<?php echo template::text('configSocialYoutubeId', [ <?php echo template::text('configSocialYoutubeId', [
'help' => 'Saisissez votre ID Youtube : https://www.youtube.com/channel/[CETTE PARTIE].', 'help' => 'Saisissez votre ID : https://www.youtube.com/channel/[ID].',
'label' => 'Youtube', 'label' => 'Youtube',
'value' => $this->getData(['config', 'social', 'youtubeId']) 'value' => $this->getData(['config', 'social', 'youtubeId'])
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::text('configSocialTwitterId', [ <?php echo template::text('configSocialTwitterId', [
'help' => 'Saisissez votre ID Twitter : https://twitter.com/[CETTE PARTIE].', 'help' => 'Saisissez votre ID : https://twitter.com/[ID].',
'label' => 'Twitter', 'label' => 'Twitter',
'value' => $this->getData(['config', 'social', 'twitterId']) 'value' => $this->getData(['config', 'social', 'twitterId'])
]); ?> ]); ?>
@ -115,11 +116,18 @@
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::text('configSocialPinterestId', [ <?php echo template::text('configSocialPinterestId', [
'help' => 'Saisissez votre ID Pinterest : https://pinterest.com/[CETTE PARTIE].', 'help' => 'Saisissez votre ID : https://pinterest.com/[ID].',
'label' => 'Pinterest', 'label' => 'Pinterest',
'value' => $this->getData(['config', 'social', 'pinterestId']) 'value' => $this->getData(['config', 'social', 'pinterestId'])
]); ?> ]); ?>
</div> </div>
<div class="col6">
<?php echo template::text('configSocialLinkedinId', [
'help' => 'Saisissez votre ID Linkedin : https://fr.linkedin.com/in/[CETTE PARTIE].',
'label' => 'Linkedin',
'value' => $this->getData(['config', 'social', 'linkedinId'])
]); ?>
</div>
</div> </div>
</div> </div>
<div class="block"> <div class="block">
@ -127,14 +135,14 @@
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::text('configVersion', [ <?php echo template::text('configVersion', [
'label' => 'ZwiiCMS Version', 'label' => 'ZwiiCMS',
'readonly' => true, 'readonly' => true,
'value' => common::ZWII_VERSION 'value' => common::ZWII_VERSION
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::text('moduleRedirectionVersion', [ <?php echo template::text('moduleRedirectionVersion', [
'label' => 'Module Redirection version', 'label' => 'Module "Redirection"',
'readonly' => true, 'readonly' => true,
'value' => redirection::REDIRECTION_VERSION 'value' => redirection::REDIRECTION_VERSION
]); ?> ]); ?>
@ -143,14 +151,14 @@
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::text('moduleFormVersion', [ <?php echo template::text('moduleFormVersion', [
'label' => 'Module Form version', 'label' => 'Module "Form"',
'readonly' => true, 'readonly' => true,
'value' => form::FORM_VERSION 'value' => form::FORM_VERSION
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::text('moduleGalleryVersion', [ <?php echo template::text('moduleGalleryVersion', [
'label' => 'Module Gallery version', 'label' => 'Module "Gallery"',
'readonly' => true, 'readonly' => true,
'value' => gallery::GALLERY_VERSION 'value' => gallery::GALLERY_VERSION
]); ?> ]); ?>
@ -159,14 +167,14 @@
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::text('moduleNewsVersion', [ <?php echo template::text('moduleNewsVersion', [
'label' => 'Module News version', 'label' => 'Module "News"',
'readonly' => true, 'readonly' => true,
'value' => news::NEWS_VERSION 'value' => news::NEWS_VERSION
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::text('moduleBlogVersion', [ <?php echo template::text('moduleBlogVersion', [
'label' => 'Module Blog version', 'label' => 'Module "Blog"',
'readonly' => true, 'readonly' => true,
'value' => blog::BLOG_VERSION 'value' => blog::BLOG_VERSION
]); ?> ]); ?>
@ -175,24 +183,31 @@
<?php echo template::select('configTimezone', $module::$timezones, [ <?php echo template::select('configTimezone', $module::$timezones, [
'label' => 'Fuseau horaire', 'label' => 'Fuseau horaire',
'selected' => $this->getData(['config', 'timezone']) 'selected' => $this->getData(['config', 'timezone'])
]); ?> ]); ?>
<?php echo template::checkbox('configMaintenance', true, 'Site en maintenance', [ <?php echo template::checkbox('configMaintenance', true, 'Site en maintenance', [
'checked' => $this->getData(['config', 'maintenance']), 'checked' => $this->getData(['config', 'maintenance'])
'help' => 'Le site devient inaccessible sauf pour les administrateurs.'
]); ?> ]); ?>
<?php echo template::checkbox('configAutoBackup', true, 'Sauvegarde automatique des données', [ <?php echo template::checkbox('configAutoBackup', true, 'Sauvegarde automatique', [
'checked' => $this->getData(['config', 'autoBackup']), 'checked' => $this->getData(['config', 'autoBackup']),
'help' => 'Sauvegarde une fois par jour le fichier de données dans le dossier site/backup/. La sauvegarde est conservée 30 jours.' 'help' => 'Le fichier de données est copié quotidiennement dans le dossier \'site/backup\'. La sauvegarde est conservée pendant 30 jours.'
]); ?> ]); ?>
<div class="row"> <div class="row">
<div class="col8 offset2"> <div class="col10 offset1">
<?php echo template::button('configExport', [ <?php echo template::button('configExport', [
'href' => helper::baseUrl() . 'config/backup', 'href' => helper::baseUrl() . 'config/backup',
'value' => 'Exporter une copie du site<br>(données, thème et fichiers)' 'value' => 'Exporter une copie du site<br>(données, thème et fichiers)'
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row">
<div class="col10 offset1">
<?php echo template::button('configSiteMap', [
'href' => helper::baseUrl() . 'config/generateFiles',
'value' => 'Générer sitemap.xml et robots.txt'
]); ?>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
<?php echo template::formClose(); ?> <?php echo template::formClose(); ?>

View File

@ -17,11 +17,14 @@ class install extends common {
public static $actions = [ public static $actions = [
'index' => self::GROUP_VISITOR, 'index' => self::GROUP_VISITOR,
'steps' => self::GROUP_ADMIN, 'steps' => self::GROUP_ADMIN,
'update' => self::GROUP_ADMIN 'update' => self::GROUP_ADMIN,
'removeAll' => self::GROUP_ADMIN,
]; ];
public static $newVersion; public static $newVersion;
/** /**
* Installation * Installation
*/ */
@ -46,6 +49,28 @@ class install extends common {
$userLastname = $this->getInput('installLastname', helper::FILTER_STRING_SHORT, true); $userLastname = $this->getInput('installLastname', helper::FILTER_STRING_SHORT, true);
$userMail = $this->getInput('installMail', helper::FILTER_MAIL, true); $userMail = $this->getInput('installMail', helper::FILTER_MAIL, true);
$userId = $this->getInput('installId', helper::FILTER_ID, true); $userId = $this->getInput('installId', helper::FILTER_ID, true);
// Configure certaines données par défaut
if ($this->getInput('installDefaultData',helper::FILTER_BOOLEAN) === FALSE) {
foreach($this->getHierarchy(null, false) as $parentPageId => $childrenPageIds) {
if ( $parentPageId !== 'accueil') {
$this->deleteData(['page',$parentPageId]);
}
foreach($childrenPageIds as $childKey) {
$this->deleteData(['page', $childKey]);
}
}
// Ajouter ici la liste des pages privées qui ne sont pas vues lors de l'installation.
$this->deleteData(['page', 'privee']);
// Effacer les fichiers par défaut
if (is_dir('site/file/source/galerie')) {
$this->removeAll('site/file/source/galerie');
$this->removeAll('site/file/thumb/galerie');
}
} else {
$this->setData(['module', 'blog', 'mon-premier-article', 'userId', $userId]);
$this->setData(['module', 'blog', 'mon-deuxieme-article', 'userId', $userId]);
$this->setData(['module', 'blog', 'mon-troisieme-article', 'userId', $userId]);
}
$this->setData([ $this->setData([
'user', 'user',
$userId, $userId,
@ -57,12 +82,8 @@ class install extends common {
'mail' => $userMail, 'mail' => $userMail,
'password' => $this->getInput('installPassword', helper::FILTER_PASSWORD, true) 'password' => $this->getInput('installPassword', helper::FILTER_PASSWORD, true)
] ]
]); ]);
// Configure certaines données par défaut // Envoie le mail
$this->setData(['module', 'blog', 'mon-premier-article', 'userId', $userId]);
$this->setData(['module', 'blog', 'mon-deuxieme-article', 'userId', $userId]);
$this->setData(['module', 'blog', 'mon-troisieme-article', 'userId', $userId]);
// Envoi le mail
$sent = $this->sendMail( $sent = $this->sendMail(
$userMail, $userMail,
'Installation de votre site', 'Installation de votre site',
@ -72,6 +93,10 @@ class install extends common {
'<strong>Identifiant du compte :</strong> ' . $this->getInput('installId') . '<br>' . '<strong>Identifiant du compte :</strong> ' . $this->getInput('installId') . '<br>' .
'<strong>Mot de passe du compte :</strong> ' . $this->getInput('installPassword') '<strong>Mot de passe du compte :</strong> ' . $this->getInput('installPassword')
); );
// Générer un fichier robots.txt
$this->createRobots();
// Créer sitemap
$this->createSitemap('all');
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl(false), 'redirect' => helper::baseUrl(false),
@ -79,6 +104,7 @@ class install extends common {
'state' => ($sent === true ? true : null) 'state' => ($sent === true ? true : null)
]); ]);
} }
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'display' => self::DISPLAY_LAYOUT_LIGHT, 'display' => self::DISPLAY_LAYOUT_LIGHT,
@ -195,4 +221,17 @@ class install extends common {
'view' => 'update' 'view' => 'update'
]); ]);
} }
/**
* Effacer un dossier non vide.
*/
private function removeAll ( $path ) {
foreach ( new DirectoryIterator($path) as $item ):
if ( $item->isFile() ) unlink($item->getRealPath());
if ( !$item->isDot() && $item->isDir() ) $this->removeAll($item->getRealPath());
endforeach;
rmdir($path);
}
} }

View File

@ -9,7 +9,7 @@ class install extends common {
'favicon' => 'favicon.ico', 'favicon' => 'favicon.ico',
'homePageId' => 'accueil', 'homePageId' => 'accueil',
'maintenance' => false, 'maintenance' => false,
'metaDescription' => 'Zwii est un CMS sans base de données qui permet à ses utilisateurs de créer et gérer facilement un site web sans aucune connaissance en programmation.', 'metaDescription' => 'Zwii est un CMS sans base de données qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.',
'social' => [ 'social' => [
'facebookId' => 'ZwiiCMS', 'facebookId' => 'ZwiiCMS',
'instagramId' => '', 'instagramId' => '',
@ -28,163 +28,216 @@ class install extends common {
], ],
'page' => [ 'page' => [
'accueil' => [ 'accueil' => [
'typeMenu' => 'text', 'typeMenu' => 'text',
'iconUrl' => '', 'iconUrl' => '',
'disable' => false, 'disable' => false,
'content' => '<h3>Bienvenue sur votre nouveau site Zwii !</h3> 'content' => '<h3>Bienvenue sur votre nouveau site Zwii !</h3>
<p><strong>Un email contenant le récapitulatif de votre installation vient de vous être envoyé.</strong></p> <p><strong>Un email contenant le récapitulatif de votre installation vient de vous être envoyé.</strong></p>
<p>Connectez-vous dès maintenant à votre espace membre afin de créer un site à votre image ! Vous allez pouvoir personnaliser le thème, créer des pages, ajouter des utilisateurs et bien plus encore !</p> <p>Connectez-vous dès maintenant à votre espace membre afin de créer un site à votre image ! Vous pourrez personnaliser le thème, créer des pages, ajouter des utilisateurs et bien plus encore !</p>
<p>Si vous avez besoin d\'aide ou si vous cherchez des informations sur Zwii, n\'hésitez pas à jeter un œil à notre <a title="Forum" href="http://forum.zwiicms.com/">forum</a>.</p>', <p>Si vous avez besoin d\'aide ou si vous cherchez des informations sur Zwii, n\'hésitez pas à jeter un œil à notre <a title="Forum" href="http://forum.zwiicms.com/">forum</a>.</p>',
'hideTitle' => false, 'hideTitle' => false,
'breadCrumb' => false, 'breadCrumb' => false,
'metaDescription' => '', 'metaDescription' => '',
'metaTitle' => '', 'metaTitle' => '',
'moduleId' => '', 'moduleId' => '',
'modulePosition' => 'bottom', 'modulePosition' => 'bottom',
'parentPageId' => '', 'parentPageId' => '',
'position' => 1, 'position' => 1,
'group' => self::GROUP_VISITOR, 'group' => self::GROUP_VISITOR,
'targetBlank' => false, 'targetBlank' => false,
'title' => 'Accueil', 'title' => 'Accueil',
'block' => '12', 'block' => '12',
'barLeft' => '', 'barLeft' => '',
'barRight' => '' 'barRight' => '',
'displayMenu' => 'none',
'hideMenuSide' => false,
'hideMenuHead' => false,
'hideMenuChildren' =>false
], ],
'enfant' => [ 'enfant' => [
'typeMenu' => 'text', 'typeMenu' => 'text',
'iconUrl' => '', 'iconUrl' => '',
'disable' => false, 'disable' => false,
'content' => '<p>Vous pouvez assigner des parents à vos pages afin de mieux organiser votre menu !</p> 'content' => '<p>Vous pouvez assigner des parents à vos pages afin de mieux organiser votre menu !</p>
<div class="row"> <div class="row">
<div class="col4"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.</p></div> <div class="col4"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.</p></div>
<div class="col4"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.</p></div> <div class="col4"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.</p></div>
<div class="col4"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.</p></div> <div class="col4"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.</p></div>
</div>', </div>',
'hideTitle' => false, 'hideTitle' => false,
'breadCrumb' => true, 'breadCrumb' => true,
'metaDescription' => '', 'metaDescription' => '',
'metaTitle' => '', 'metaTitle' => '',
'moduleId' => '', 'moduleId' => '',
'modulePosition' => 'bottom', 'modulePosition' => 'bottom',
'parentPageId' => 'accueil', 'parentPageId' => 'accueil',
'position' => 1, 'position' => 1,
'group' => self::GROUP_VISITOR, 'group' => self::GROUP_VISITOR,
'targetBlank' => false, 'targetBlank' => false,
'title' => 'Enfant', 'title' => 'Enfant',
'block' => '12', 'block' => '12',
'barLeft' => '', 'barLeft' => '',
'barRight' => '' 'barRight' => '',
], 'displayMenu' => 'none',
'privee' => [ 'hideMenuSide' => false,
'typeMenu' => 'text', 'hideMenuHead' => false,
'iconUrl' => '', 'hideMenuChildren' =>false
'disable' => false, ],
'content' => '<p>Cette page n\'est visible que par les membres de votre site !</p> 'privee' => [
'typeMenu' => 'text',
'iconUrl' => '',
'disable' => false,
'content' => '<p>Cette page n\'est visible que des membres de votre site !</p>
<div class="row"> <div class="row">
<div class="col6"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.</p></div> <div class="col6"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.</p></div>
<div class="col6"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.</p></div> <div class="col6"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.</p></div>
</div>', </div>',
'hideTitle' => false, 'hideTitle' => false,
'breadCrumb' => true, 'breadCrumb' => true,
'metaDescription' => '', 'metaDescription' => '',
'metaTitle' => '', 'metaTitle' => '',
'moduleId' => '', 'moduleId' => '',
'parentPageId' => '', 'parentPageId' => '',
'modulePosition' => 'bottom', 'modulePosition' => 'bottom',
'position' => 2, 'position' => 2,
'group' => self::GROUP_MEMBER, 'group' => self::GROUP_MEMBER,
'targetBlank' => false, 'targetBlank' => false,
'title' => 'Privée', 'title' => 'Privée',
'block' => '12', 'block' => '12',
'barLeft' => '', 'barLeft' => '',
'barRight' => '' 'barRight' => '',
], 'displayMenu' => 'none',
'mise-en-page' => [ 'hideMenuSide' => false,
'typeMenu' => 'text', 'hideMenuHead' => false,
'iconUrl' => '', 'hideMenuChildren' =>false
'disable' => false, ],
'content' => '<p>Vous pouvez ajouter une ou deux barres latérales aux pages de votre site. Cette mise en page se définit dans les paramètres de page et peut s\'appliquer à l\'ensemble du site ou à certaines pages en particulier, au gré de vos désirs.</p> 'mise-en-page' => [
'typeMenu' => 'text',
'iconUrl' => '',
'disable' => false,
'content' => '<p>Vous pouvez ajouter une ou deux barres latérales aux pages de votre site. Cette mise en page se définit dans les paramètres de page et peut s\'appliquer à l\'ensemble du site ou à certaines pages en particulier, au gré de vos désirs.</p>
<p>Pour créer une barre latérale à partir d\'une "Nouvelle page" ou transformer une page existante en barre latérale, sélectionnez l\'option dans la liste des gabarits. On peut bien sûr définir autant de barres latérales qu\'on le souhaite.</p> <p>Pour créer une barre latérale à partir d\'une "Nouvelle page" ou transformer une page existante en barre latérale, sélectionnez l\'option dans la liste des gabarits. On peut bien sûr définir autant de barres latérales qu\'on le souhaite.</p>
<p>Cette nouvelle fonctionnalité autorise toutes sortes d\'utilisations : texte, encadrés, images, vidéos... ou simple marge blanche. Seule restriction : on ne peut pas installer un module dans une barre latérale.</p> <p>Cette nouvelle fonctionnalité autorise toutes sortes d\'utilisations : texte, encadrés, images, vidéos... ou simple marge blanche. Seule restriction : on ne peut pas installer un module dans une barre latérale.</p>
<p>La liste des barres disponibles et leur emplacement s\'affichent en fonction du gabarit que vous aurez choisi.', <p>La liste des barres disponibles et leur emplacement s\'affichent en fonction du gabarit que vous aurez choisi.',
'hideTitle' => false, 'hideTitle' => false,
'breadCrumb' => true, 'breadCrumb' => true,
'metaDescription' => '', 'metaDescription' => '',
'metaTitle' => '', 'metaTitle' => '',
'moduleId' => '', 'moduleId' => '',
'parentPageId' => 'accueil', 'parentPageId' => 'accueil',
'modulePosition' => 'bottom', 'modulePosition' => 'bottom',
'position' => 3, 'position' => 3,
'group' => self::GROUP_VISITOR, 'group' => self::GROUP_VISITOR,
'targetBlank' => false, 'targetBlank' => false,
'title' => 'Mise en page', 'title' => 'Mise en page',
'block' => '8-4', 'block' => '4-8',
'barLeft' => '', 'barLeft' => 'barre',
'barRight' => 'barre' 'barRight' => '',
'displayMenu' => 'none',
], 'hideMenuSide' => false,
'blog' => [ 'hideMenuHead' => false,
'typeMenu' => 'text', 'hideMenuChildren' =>false
'iconUrl' => '', ],
'disable' => false, 'menu-lateral' => [
'content' => '<p>Cette page contient une instance du module de blog. Cliquez sur un article afin de le lire et de poster des commentaires.</p>', 'typeMenu' => 'text',
'hideTitle' => false, 'iconUrl' => '',
'breadCrumb' => false, 'disable' => false,
'metaDescription' => '', 'content' => '<p>Cette page illustre la possibilité d\'ajouter un menu dans les barres latérales.<br>
'metaTitle' => '', Deux types de menus sont disponibles : l\'un reprenant les rubriques du menu principal comme celui-ci, l\'autre listant les pages d\'une même rubrique. Le choix du type de menu se fait dans la page de configuration d\'une barre latérale.</p>
'moduleId' => 'blog', <p>Pour ajouter un menu à une page, choisissez une barre latérale avec menu dans la page de configuration. Les bulles d\'aide de la rubrique "Menu" expliquent comment masquer une page.</p>',
'modulePosition' => 'bottom', 'hideTitle' => false,
'parentPageId' => '', 'breadCrumb' => true,
'position' => 4, 'metaDescription' => '',
'group' => self::GROUP_VISITOR, 'metaTitle' => '',
'targetBlank' => false, 'moduleId' => '',
'title' => 'Blog', 'parentPageId' => 'accueil',
'block' => '12', 'modulePosition' => 'bottom',
'barLeft' => '', 'position' => 3,
'barRight' => '' 'group' => self::GROUP_VISITOR,
], 'targetBlank' => false,
'galeries' => [ 'title' => 'Menu latéral',
'typeMenu' => 'text', 'block' => '9-3',
'iconUrl' => '', 'barLeft' => '',
'disable' => false, 'barRight' => 'barrelateraleavecmenu',
'content' => '<p>Cette page contient une instance du module de galeries photos. Cliquez sur la galerie ci-dessous afin de voir les photos qu\'elle contient.</p>', 'displayMenu' => 'none',
'hideTitle' => false, 'hideMenuSide' => false,
'breadCrumb' => false, 'hideMenuHead' => false,
'metaDescription' => '', 'hideMenuChildren' =>false
'metaTitle' => '', ],
'moduleId' => 'gallery', 'blog' => [
'modulePosition' => 'bottom', 'typeMenu' => 'text',
'parentPageId' => '', 'iconUrl' => '',
'position' => 5, 'disable' => false,
'group' => self::GROUP_VISITOR, 'content' => '<p>Cette page contient une instance du module de blog. Cliquez sur un article afin de le lire et de poster des commentaires.</p>',
'targetBlank' => false, 'hideTitle' => false,
'title' => 'Galeries', 'breadCrumb' => false,
'block' => '12', 'metaDescription' => '',
'barLeft' => '', 'metaTitle' => '',
'barRight' => '' 'moduleId' => 'blog',
], 'modulePosition' => 'bottom',
'parentPageId' => '',
'position' => 4,
'group' => self::GROUP_VISITOR,
'targetBlank' => false,
'title' => 'Blog',
'block' => '12',
'barLeft' => '',
'barRight' => '',
'displayMenu' => 'none',
'hideMenuSide' => false,
'hideMenuHead' => false,
'hideMenuChildren' =>false
],
'galeries' => [
'typeMenu' => 'text',
'iconUrl' => '',
'disable' => false,
'content' => '<p>Cette page contient une instance du module de galeries photos. Cliquez sur la galerie ci-dessous afin de voir les photos qu\'elle contient.</p>',
'hideTitle' => false,
'breadCrumb' => false,
'metaDescription' => '',
'metaTitle' => '',
'moduleId' => 'gallery',
'modulePosition' => 'bottom',
'parentPageId' => '',
'position' => 5,
'group' => self::GROUP_VISITOR,
'targetBlank' => false,
'title' => 'Galeries',
'block' => '12',
'barLeft' => '',
'barRight' => '',
'displayMenu' => 'none',
'hideMenuSide' => false,
'hideMenuHead' => false,
'hideMenuChildren' =>false
],
'site-de-zwii' => [ 'site-de-zwii' => [
'typeMenu' => 'text', 'typeMenu' => 'text',
'iconUrl' => '', 'iconUrl' => '',
'disable' => false, 'disable' => false,
'content' => "", 'content' => "",
'hideTitle' => false, 'hideTitle' => false,
'breadCrumb' => false, 'breadCrumb' => false,
'metaDescription' => '', 'metaDescription' => '',
'metaTitle' => '', 'metaTitle' => '',
'moduleId' => 'redirection', 'moduleId' => 'redirection',
'modulePosition' => 'bottom', 'modulePosition' => 'bottom',
'parentPageId' => '', 'parentPageId' => '',
'position' => 6, 'position' => 6,
'group' => self::GROUP_VISITOR, 'group' => self::GROUP_VISITOR,
'targetBlank' => true, 'targetBlank' => true,
'title' => 'Site de Zwii', 'title' => 'Site de Zwii',
'block' => '12', 'block' => '12',
'barLeft' => '', 'barLeft' => '',
'barRight' => '' 'barRight' => '',
], 'displayMenu' => 'none',
'hideMenuSide' => false,
'hideMenuHead' => true,
'hideMenuChildren' =>false
],
'contact' => [ 'contact' => [
'typeMenu' => 'text', 'typeMenu' => 'text',
'iconUrl' => '', 'iconUrl' => '',
'disable' => false, 'disable' => false,
'content' => '<p>Cette page contient un exemple de formulaire conçu à partir du module de génération de formulaires. Il est configuré pour envoyer les données saisies par mail aux administrateurs du site.</p>', 'content' => '<p>Cette page contient un exemple de formulaire conçu à partir du module de génération de formulaires. Il est configuré pour envoyer les données saisies par mail aux administrateurs du site.</p>',
@ -201,12 +254,16 @@ class install extends common {
'title' => 'Contact', 'title' => 'Contact',
'block' => '12', 'block' => '12',
'barLeft' => '', 'barLeft' => '',
'barRight' => '' 'barRight' => '',
'displayMenu' => 'none',
'hideMenuSide' => false,
'hideMenuHead' => false,
'hideMenuChildren' =>false
], ],
'barre' => [ 'barre' => [
'typeMenu' => 'text', 'typeMenu' => 'text',
'iconUrl' => '', 'iconUrl' => '',
'disable' => false, 'disable' => false,
'content' => '<div class="block"><h4>ZwiiCMS</h4><h3>Le CMS sans base de données à l\'installation simple et rapide</p></h3></div>', 'content' => '<div class="block"><h4>ZwiiCMS</h4><h3>Le CMS sans base de données à l\'installation simple et rapide</p></h3></div>',
'hideTitle' => false, 'hideTitle' => false,
'breadCrumb' => false, 'breadCrumb' => false,
@ -221,7 +278,35 @@ class install extends common {
'title' => 'Barre latérale', 'title' => 'Barre latérale',
'block' => 'bar', 'block' => 'bar',
'barLeft' => '', 'barLeft' => '',
'barRight' => '' 'barRight' => '',
'displayMenu' => "none",
'hideMenuSide' => false,
'hideMenuHead' => false,
'hideMenuChildren' =>false
],
'barrelateraleavecmenu' => [
'typeMenu' => 'text',
'iconUrl' => '',
'disable' => false,
'content' => '<p></p>',
'hideTitle' => false,
'breadCrumb' => false,
'metaDescription' => '',
'metaTitle' => '',
'moduleId' => '',
'modulePosition' => 'bottom',
'parentPageId' => '',
'position' => 0 ,
'group' => self::GROUP_VISITOR,
'targetBlank' => false,
'title' => 'Barre latérale avec menu',
'block' => 'bar',
'barLeft' => '',
'barRight' => '',
'displayMenu' => "parents",
'hideMenuSide' => false,
'hideMenuHead' => false,
'hideMenuChildren' =>false
], ],
], ],
'module' => [ 'module' => [
@ -360,7 +445,10 @@ class install extends common {
'textTransform' => 'none', 'textTransform' => 'none',
'socialsPosition' => 'center', 'socialsPosition' => 'center',
'socialsAlign' => 'center', 'socialsAlign' => 'center',
'displayVersion' => true 'displayVersion' => true,
'displayVersion' => true,
'displaySiteMap' => true,
'displayCopyright' => true
], ],
'header' => [ 'header' => [
'backgroundColor' => 'rgba(255, 255, 255, 1)', 'backgroundColor' => 'rgba(255, 255, 255, 1)',
@ -417,4 +505,4 @@ class install extends common {
'version' => 0, 'version' => 0,
] ]
]; ];
} }

View File

@ -20,7 +20,7 @@
</div> </div>
<?php echo template::mail('installMail', [ <?php echo template::mail('installMail', [
'autocomplete' => 'off', 'autocomplete' => 'off',
'label' => 'Adresse mail' 'label' => 'Adresse mail'
]); ?> ]); ?>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
@ -36,6 +36,14 @@
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row">
<div class="col12">
<?php echo template::checkbox('installDefaultData',true , 'Charger un exemple de site', [
'checked' => true
]);
?>
</div>
</div>
<div class="row"> <div class="row">
<div class="col3 offset9"> <div class="col3 offset9">
<?php echo template::submit('installSubmit', [ <?php echo template::submit('installSubmit', [

View File

@ -41,7 +41,7 @@ class page extends common {
'free' => 'Libre' 'free' => 'Libre'
]; ];
public static $pageBlocks = [ public static $pageBlocks = [
'12' => 'Page pleine', '12' => 'Pleine page',
'4-8' => 'Barre latérale 1/3 - Page 2/3', '4-8' => 'Barre latérale 1/3 - Page 2/3',
'8-4' => 'Page 2/3 - Barre latérale 1/3', '8-4' => 'Page 2/3 - Barre latérale 1/3',
'3-9' => 'Barre latérale 1/4 - Page 3/4', '3-9' => 'Barre latérale 1/4 - Page 3/4',
@ -49,6 +49,11 @@ class page extends common {
'3-6-3' => 'Barre latérale 1/4 - Page 1/2 - Barre latérale 1/4', '3-6-3' => 'Barre latérale 1/4 - Page 1/2 - Barre latérale 1/4',
'bar' => 'Barre latérale' 'bar' => 'Barre latérale'
]; ];
public static $displayMenu = [
'none' => 'Aucun',
'parents' => 'Menu principal',
'children' => 'Sous-menu de la page parente'
];
/** /**
* Création * Création
@ -77,9 +82,15 @@ class page extends common {
'title' => $pageTitle, 'title' => $pageTitle,
'block' => '12', 'block' => '12',
'barLeft' => '', 'barLeft' => '',
'barRight' => '' 'barRight' => '',
'displayMenu' => '0',
'hideMenuSide' => false,
'hideMenuHead' => false,
'hideMenuChildren' => false
] ]
]); ]);
// Met à jour le site map
$this->createSitemap('all');
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl() . $pageId, 'redirect' => helper::baseUrl() . $pageId,
@ -133,7 +144,10 @@ class page extends common {
]); ]);
} }
// Suppression // Suppression
else { else {
// Met à jour le site map
$this->createSitemap('all');
// Effacer la page
$this->deleteData(['page', $url[0]]); $this->deleteData(['page', $url[0]]);
$this->deleteData(['module', $url[0]]); $this->deleteData(['module', $url[0]]);
// Valeurs en sortie // Valeurs en sortie
@ -165,7 +179,7 @@ class page extends common {
// un dossier existe du même nom (erreur en cas de redirection) // un dossier existe du même nom (erreur en cas de redirection)
if (file_exists($pageId)) { if (file_exists($pageId)) {
$pageId = uniqid($pageId . '-'); $pageId = uniqid($pageId . '-');
} }
// Si l'id a changée // Si l'id a changée
if ($pageId !== $this->getUrl(2)) { if ($pageId !== $this->getUrl(2)) {
// Incrémente le nouvel id de la page // Incrémente le nouvel id de la page
@ -213,6 +227,7 @@ class page extends common {
if ($this->getinput('pageEditBlock') !== 'bar') { if ($this->getinput('pageEditBlock') !== 'bar') {
$barLeft = $this->getinput('pageEditBarLeft'); $barLeft = $this->getinput('pageEditBarLeft');
$barRight = $this->getinput('pageEditBarRight'); $barRight = $this->getinput('pageEditBarRight');
$hideTitle = $this->getInput('pageEditHideTitle', helper::FILTER_BOOLEAN);
} else { } else {
// Une barre ne peut pas avoir de barres // Une barre ne peut pas avoir de barres
@ -220,6 +235,7 @@ class page extends common {
$barRight = ""; $barRight = "";
// Une barre est masquée // Une barre est masquée
$position = 0; $position = 0;
$hideTitle = true;
} }
// Modifie la page ou en crée une nouvelle si l'id a changé // Modifie la page ou en crée une nouvelle si l'id a changé
$this->setData([ $this->setData([
@ -228,9 +244,9 @@ class page extends common {
[ [
'typeMenu' => $this->getinput('pageTypeMenu'), 'typeMenu' => $this->getinput('pageTypeMenu'),
'iconUrl' => $this->getinput('pageIconUrl'), 'iconUrl' => $this->getinput('pageIconUrl'),
'disable'=> $this->getinput('pageDisable', helper::FILTER_BOOLEAN), 'disable'=> $this->getinput('pageEditDisable', helper::FILTER_BOOLEAN),
'content' => (empty($this->getInput('pageEditContent', null)) ? "<p></p>" : $this->getInput('pageEditContent', null)) , 'content' => (empty($this->getInput('pageEditContent', null)) ? "<p></p>" : $this->getInput('pageEditContent', null)) ,
'hideTitle' => $this->getInput('pageEditHideTitle', helper::FILTER_BOOLEAN), 'hideTitle' => $hideTitle,
'breadCrumb' => $this->getInput('pageEditbreadCrumb', helper::FILTER_BOOLEAN), 'breadCrumb' => $this->getInput('pageEditbreadCrumb', helper::FILTER_BOOLEAN),
'metaDescription' => $this->getInput('pageEditMetaDescription', helper::FILTER_STRING_LONG), 'metaDescription' => $this->getInput('pageEditMetaDescription', helper::FILTER_STRING_LONG),
'metaTitle' => $this->getInput('pageEditMetaTitle'), 'metaTitle' => $this->getInput('pageEditMetaTitle'),
@ -243,9 +259,13 @@ class page extends common {
'title' => $this->getInput('pageEditTitle', helper::FILTER_STRING_SHORT, true), 'title' => $this->getInput('pageEditTitle', helper::FILTER_STRING_SHORT, true),
'block' => $this->getinput('pageEditBlock'), 'block' => $this->getinput('pageEditBlock'),
'barLeft' => $barLeft, 'barLeft' => $barLeft,
'barRight' => $barRight 'barRight' => $barRight,
'displayMenu' => $this->getinput('pageEditDisplayMenu'),
'hideMenuSide' => $this->getinput('pageEditHideMenuSide', helper::FILTER_BOOLEAN),
'hideMenuHead' => $this->getinput('pageEditHideMenuHead', helper::FILTER_BOOLEAN),
'hideMenuChildren' => $this->getinput('pageEditHideMenuChildren', helper::FILTER_BOOLEAN),
] ]
]); ]);
// Barre renommée : changement le nom de la barre dans les pages mères // Barre renommée : changement le nom de la barre dans les pages mères
if ($this->getinput('pageEditBlock') === 'bar') { if ($this->getinput('pageEditBlock') === 'bar') {
foreach ($this->getHierarchy() as $eachPageId=>$parentId) { foreach ($this->getHierarchy() as $eachPageId=>$parentId) {
@ -265,6 +285,8 @@ class page extends common {
} }
} }
} }
// Met à jour le site map
$this->createSitemap('all');
// Redirection vers la configuration // Redirection vers la configuration
if($this->getInput('pageEditModuleRedirect', helper::FILTER_BOOLEAN)) { if($this->getInput('pageEditModuleRedirect', helper::FILTER_BOOLEAN)) {
// Valeurs en sortie // Valeurs en sortie
@ -306,7 +328,7 @@ class page extends common {
$this->getData(['page', $parentPageId, 'block']) === 'bar') { $this->getData(['page', $parentPageId, 'block']) === 'bar') {
self::$pagesBarId[$parentPageId] = $this->getData(['page', $parentPageId, 'title']); self::$pagesBarId[$parentPageId] = $this->getData(['page', $parentPageId, 'title']);
} }
} }
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $this->getData(['page', $this->getUrl(2), 'title']), 'title' => $this->getData(['page', $this->getUrl(2), 'title']),

View File

@ -122,7 +122,9 @@ $( document ).ready(function() {
$("#pageEditModuleConfig").removeClass("disabled"); $("#pageEditModuleConfig").removeClass("disabled");
$("#pageEditModuleConfig").slideUp(); $("#pageEditModuleConfig").slideUp();
$("#pageEditDisplayMenuWrapper").addClass("disabled"); $("#pageEditDisplayMenuWrapper").addClass("disabled");
$("#pageEditDisplayMenuWrapper").slideDown(); $("#pageEditDisplayMenuWrapper").slideDown();
$("#pageEditGroupWrapper").removeClass("disabled");
$("#pageEditGroupWrapper").slideUp();
} else { } else {
$("#pageEditDisplayMenuWrapper").removeClass("disabled"); $("#pageEditDisplayMenuWrapper").removeClass("disabled");
$("#pageEditDisplayMenuWrapper").slideUp(); $("#pageEditDisplayMenuWrapper").slideUp();
@ -133,7 +135,9 @@ $( document ).ready(function() {
* Quand le titre est masqué * Quand le titre est masqué
*/ */
if ($("input[name=pageEditHideTitle]").is(':checked') && if ($("input[name=pageEditHideTitle]").is(':checked') &&
$("#pageEditParentPageId").val() === "") { $("#pageEditParentPageId").val() === "" &&
!$('input[name=pageEditHideTitle]').is(':checked') ) {
$("#pageEditbreadCrumbWrapper").removeClass("disabled"); $("#pageEditbreadCrumbWrapper").removeClass("disabled");
$("#pageEditbreadCrumbWrapper").slideUp(); $("#pageEditbreadCrumbWrapper").slideUp();
} else { } else {
@ -154,52 +158,49 @@ $( document ).ready(function() {
$("#pageIconUrlWrapper").slideUp(); $("#pageIconUrlWrapper").slideUp();
} }
/**
* Masquer ou afficher le chemin de fer
* Quand la page n'est pas parente et que le menu n'est pas masqué
*/
if ($("#pageEditParentPageId").val() === "" &&
!$('input[name=pageEditHideTitle]').is(':checked') ) {
$("#pageEditbreadCrumbWrapper").removeClass("disabled");
$("#pageEditbreadCrumbWrapper").slideUp();
} else {
$("#pageEditbreadCrumbWrapper").addClass("disabled");
$("#pageEditbreadCrumbWrapper").slideDown();
}
/** /**
* Cache les options de masquage dans les menus quand la page n'est pas affichée. * Cache les options de masquage dans les menus quand la page n'est pas affichée.
*/ */
if ($("#pageEditPosition").val() === "0" ) { if ($("#pageEditPosition").val() === "0" ) {
$("#pageEdithiddenMenuHeadWrapper").removeClass("disabled"); $("#pageEdithideMenuHeadWrapper").removeClass("disabled");
$("#pageEdithiddenMenuHeadWrapper").slideUp(); $("#pageEdithideMenuHeadWrapper").slideUp();
$("#pageEdithiddenMenuSideWrapper").removeClass("disabled"); $("#pageEdithideMenuSideWrapper").removeClass("disabled");
$("#pageEdithiddenMenuSideWrapper").slideUp(); $("#pageEdithideMenuSideWrapper").slideUp();
} else { } else {
$("#pageEdithiddenMenuHeadWrapper").addClass("disabled"); $("#pageEdithideMenuHeadWrapper").addClass("disabled");
$("#pageEdithiddenMenuHeadWrapper").slideDown(); $("#pageEdithideMenuHeadWrapper").slideDown();
$("#pageEdithiddenMenuSideWrapper").addClass("disabled"); $("#pageEdithideMenuSideWrapper").addClass("disabled");
$("#pageEdithiddenMenuSideWrapper").slideDown(); $("#pageEdithideMenuSideWrapper").slideDown();
} }
/**
* Cache l'option de masquage des pages enfants
*/
if ($("#pageEditParentPageId").val() !== "") {
$("#pageEditHideMenuChildrenWrapper").removeClass("disabled");
$("#pageEditHideMenuChildrenWrapper").slideUp();
} else {
$("#pageEditHideMenuChildrenWrapper").addClass("disabled");
$("#pageEditHideMenuChildrenWrapper").slideDown();
}
}); });
/** /**
* Une seule option de masquage dans les menus est autorisée * Une seule option de masquage dans les menus est autorisée
*/ */
var pageEdithideMenuHeadDOM = $("#pageEdithideMenuHead");
var pageEdithiddenMenuHeadDOM = $("#pageEdithiddenMenuHead"); pageEdithideMenuHeadDOM.on("change", function() {
pageEdithiddenMenuHeadDOM.on("change", function() { if ($('input[name=pageEdithideMenuSide]').is(':checked')) {
if ($('input[name=pageEdithiddenMenuSide]').is(':checked')) { $("#pageEdithideMenuSide").prop("checked",false);
$("#pageEdithiddenMenuSide").prop("checked",false);
} }
}); });
var pageEdithiddenMenuSideDOM = $("#pageEdithiddenMenuSide"); var pageEdithideMenuSideDOM = $("#pageEdithideMenuSide");
pageEdithiddenMenuSideDOM.on("change", function() { pageEdithideMenuSideDOM.on("change", function() {
if ($('input[name=pageEdithiddenMenuHead]').is(':checked')) { if ($('input[name=pageEdithideMenuHead]').is(':checked')) {
$("#pageEdithiddenMenuHead").prop("checked",false); $("#pageEdithideMenuHead").prop("checked",false);
} }
}); });
@ -210,17 +211,17 @@ pageEdithiddenMenuSideDOM.on("change", function() {
var pageEditPositionDOM = $("#pageEditPosition"); var pageEditPositionDOM = $("#pageEditPosition");
pageEditPositionDOM.on("change", function() { pageEditPositionDOM.on("change", function() {
if ($(this).val() === "0" ) { if ($(this).val() === "0" ) {
$("#pageEdithiddenMenuHeadWrapper").removeClass("disabled"); $("#pageEdithideMenuHeadWrapper").removeClass("disabled");
$("#pageEdithiddenMenuHeadWrapper").slideUp(); $("#pageEdithideMenuHeadWrapper").slideUp();
$("#pageEdithiddenMenuSideWrapper").removeClass("disabled"); $("#pageEdithideMenuSideWrapper").removeClass("disabled");
$("#pageEdithiddenMenuSideWrapper").slideUp(); $("#pageEdithideMenuSideWrapper").slideUp();
$("#pageEdithiddenMenuSide").prop("checked",false); $("#pageEdithideMenuSide").prop("checked",false);
$("#pageEdithiddenMenuHead").prop("checked",false); $("#pageEdithideMenuHead").prop("checked",false);
} else { } else {
$("#pageEdithiddenMenuHeadWrapper").addClass("disabled"); $("#pageEdithideMenuHeadWrapper").addClass("disabled");
$("#pageEdithiddenMenuHeadWrapper").slideDown(); $("#pageEdithideMenuHeadWrapper").slideDown();
$("#pageEdithiddenMenuSideWrapper").addClass("disabled"); $("#pageEdithideMenuSideWrapper").addClass("disabled");
$("#pageEdithiddenMenuSideWrapper").slideDown(); $("#pageEdithideMenuSideWrapper").slideDown();
} }
}); });
@ -338,6 +339,8 @@ pageEditBlockDOM.on("change", function() {
if ($(this).val() === "bar") { if ($(this).val() === "bar") {
$("#PageEditMenu").removeClass("disabled"); $("#PageEditMenu").removeClass("disabled");
$("#PageEditMenu").slideUp(); $("#PageEditMenu").slideUp();
$("#PageEditMenuSpecial").removeClass("disabled");
$("#PageEditMenuSpecial").slideUp();
$("#pageEditHideTitleWrapper").removeClass("disabled"); $("#pageEditHideTitleWrapper").removeClass("disabled");
$("#pageEditHideTitleWrapper").slideUp(); $("#pageEditHideTitleWrapper").slideUp();
$("#pageEditbreadCrumbWrapper").removeClass("disabled"); $("#pageEditbreadCrumbWrapper").removeClass("disabled");
@ -347,20 +350,28 @@ pageEditBlockDOM.on("change", function() {
$("#pageEditModuleConfig").removeClass("disabled"); $("#pageEditModuleConfig").removeClass("disabled");
$("#pageEditModuleConfig").slideUp(); $("#pageEditModuleConfig").slideUp();
$("#pageEditDisplayMenuWrapper").addClass("disabled"); $("#pageEditDisplayMenuWrapper").addClass("disabled");
$("#pageEditDisplayMenuWrapper").slideDown(); $("#pageEditDisplayMenuWrapper").slideDown();
$("#pageEditGroupWrapper").removeClass("disabled");
$("#pageEditGroupWrapper").slideUp();
} else { } else {
$("#PageEditMenu").addClass("disabled"); $("#PageEditMenu").addClass("disabled");
$("#PageEditMenu").slideDown(); $("#PageEditMenu").slideDown();
$("#PageEditMenuSpecial").addClass("disabled");
$("#PageEditMenuSpecial").slideDown();
$("#pageEditHideTitleWrapper").addClass("disabled"); $("#pageEditHideTitleWrapper").addClass("disabled");
$("#pageEditHideTitleWrapper").slideDown(); $("#pageEditHideTitleWrapper").slideDown();
$("#pageEditbreadCrumbWrapper").addClass("disabled");
$("#pageEditbreadCrumbWrapper").slideDown();
$("#pageEditModuleIdWrapper").addClass("disabled"); $("#pageEditModuleIdWrapper").addClass("disabled");
$("#pageEditModuleIdWrapper").slideDown(); $("#pageEditModuleIdWrapper").slideDown();
$("#pageEditModuleConfig").addClass("disabled"); $("#pageEditModuleConfig").addClass("disabled");
$("#pageEditModuleConfig").slideDown(); $("#pageEditModuleConfig").slideDown();
$("#pageEditDisplayMenuWrapper").removeClass("disabled"); $("#pageEditDisplayMenuWrapper").removeClass("disabled");
$("#pageEditDisplayMenuWrapper").slideUp(); $("#pageEditDisplayMenuWrapper").slideUp();
$("#pageEditGroupWrapper").addClass("disabled");
$("#pageEditGroupWrapper").slideDown();
if ($("#pageEditParentPageId").val() !== "") {
$("#pageEditbreadCrumbWrapper").addClass("disabled");
$("#pageEditbreadCrumbWrapper").slideDown();
}
} }
}); });
@ -397,6 +408,13 @@ pageEditParentPageIdDOM.on("change", function() {
$("#pageEditbreadCrumbWrapper").slideDown(); $("#pageEditbreadCrumbWrapper").slideDown();
} }
if ($(this).val() !== "") {
$("#pageEditHideMenuChildrenWrapper").removeClass("disabled");
$("#pageEditHideMenuChildrenWrapper").slideUp();
} else {
$("#pageEditHideMenuChildrenWrapper").addClass("disabled");
$("#pageEditHideMenuChildrenWrapper").slideDown();
}
}); });

View File

@ -1,3 +1,7 @@
<?php
// Mise à jour de la liste des pages pour TinyMCE
$this->pages2Json();
?>
<?php echo template::formOpen('pageEditForm'); ?> <?php echo template::formOpen('pageEditForm'); ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
@ -56,21 +60,21 @@
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::select('pageTypeMenu', $module::$typeMenu,[ <?php echo template::select('pageTypeMenu', $module::$typeMenu,[
'help' => 'Sélectionnez le type de menu.', 'help' => 'Choisissez une icône ou une image de petite taille.',
'label' => 'Type de menu', 'label' => 'Aspect du menu',
'selected' => $this->getData(['page', $this->getUrl(2), 'typeMenu']) 'selected' => $this->getData(['page', $this->getUrl(2), 'typeMenu'])
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::select('configModulePosition', $module::$modulePosition,[ <?php echo template::select('configModulePosition', $module::$modulePosition,[
'help' => 'En position libre ajoutez manuellement le module en plaçant deux crochets [] à l\'endroit voulu dans votre page.', 'help' => 'En position libre ajoutez le module en plaçant deux crochets [] à l\'endroit voulu dans votre page.',
'label' => 'Position du module dans la page', 'label' => 'Position du module dans la page',
'selected' => $this->getData(['page', $this->getUrl(2), 'modulePosition']) 'selected' => $this->getData(['page', $this->getUrl(2), 'modulePosition'])
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col6"> > <div class="col6">
<?php echo template::file('pageIconUrl', [ <?php echo template::file('pageIconUrl', [
'label' => 'Icône du menu', 'label' => 'Icône du menu',
'value' => $this->getData(['page', $this->getUrl(2), 'iconUrl']) 'value' => $this->getData(['page', $this->getUrl(2), 'iconUrl'])
@ -85,36 +89,6 @@
'value' => $this->getData(['page', $this->getUrl(2), 'content']) 'value' => $this->getData(['page', $this->getUrl(2), 'content'])
]); ?> ]); ?>
<div class="row"> <div class="row">
<div class="col6">
<div class="block" id="PageEditMenu">
<h4>Menu</h4>
<?php if($this->getHierarchy($this->getUrl(2), false)): ?>
<?php echo template::hidden('pageEditParentPageId', [
'value' => $this->getData(['page', $this->getUrl(2), 'parentPageId'])
]); ?>
<?php else: ?>
<?php echo template::select('pageEditParentPageId', $module::$pagesNoParentId, [
'label' => 'Page parent',
'selected' => $this->getData(['page', $this->getUrl(2), 'parentPageId'])
]); ?>
<?php endif; ?>
<?php echo template::select('pageEditPosition', [], [
'label' => 'Position'
]); ?>
<div class="row">
<div class="col6">
<?php echo template::checkbox('pageEditTargetBlank', true, 'Nouvel onglet', [
'checked' => $this->getData(['page', $this->getUrl(2), 'targetBlank'])
]); ?>
</div>
<div class="col6">
<?php echo template::checkbox('pageDisable', true, 'Page inactive', [
'checked' => $this->getData(['page', $this->getUrl(2), 'disable'])
]); ?>
</div>
</div>
</div>
</div>
<div class="col6"> <div class="col6">
<div class="block"> <div class="block">
<h4>Mise en page</h4> <h4>Mise en page</h4>
@ -144,24 +118,95 @@
'selected' => $this->getData(['page', $this->getUrl(2), 'barRight']) 'selected' => $this->getData(['page', $this->getUrl(2), 'barRight'])
]); ?> ]); ?>
<?php endif; ?> <?php endif; ?>
<div class="row">
<div class="col12">
<?php echo template::select('pageEditDisplayMenu', $module::$displayMenu, [
'label' => 'Configuration du menu vertical',
'selected' => $this->getData(['page', $this->getUrl(2), 'displayMenu'])
]); ?>
</div>
</div>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::checkbox('pageEditHideTitle', true, 'Masquer le titre ', [ <?php echo template::checkbox('pageEditHideTitle', true, 'Titre masquée', [
'checked' => $this->getData(['page', $this->getUrl(2), 'hideTitle']) 'checked' => $this->getData(['page', $this->getUrl(2), 'hideTitle'])
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::checkbox('pageEditbreadCrumb', true, 'Fil d\'Ariane', [ <?php echo template::checkbox('pageEditbreadCrumb', true, 'Fil d\'Ariane', [
'checked' => $this->getData(['page', $this->getUrl(2), 'breadCrumb']) 'checked' => $this->getData(['page', $this->getUrl(2), 'breadCrumb'])
]); ?> ]); ?>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="col6">
<div class="block" id="PageEditMenu">
<h4>Emplacements</h4>
<?php if($this->getHierarchy($this->getUrl(2), false)): ?>
<?php echo template::hidden('pageEditParentPageId', [
'value' => $this->getData(['page', $this->getUrl(2), 'parentPageId'])
]); ?>
<?php else: ?>
<?php echo template::select('pageEditParentPageId', $module::$pagesNoParentId, [
'label' => 'Page parent',
'selected' => $this->getData(['page', $this->getUrl(2), 'parentPageId'])
]); ?>
<?php endif; ?>
<?php echo template::select('pageEditPosition', [], [
'label' => 'Position',
'help' => 'Une page non affichée n\'apparaît pas dans les menus mais comme \'Page orpheline\' dans la liste des pages.'
]); ?>
<div class="row">
<div class="col6">
<?php echo template::checkbox('pageEditTargetBlank', true, 'Nouvel onglet', [
'checked' => $this->getData(['page', $this->getUrl(2), 'targetBlank'])
]); ?>
</div>
<div class="col6">
<?php echo template::checkbox('pageEditDisable', true, 'Désactivée', [
'checked' => $this->getData(['page', $this->getUrl(2), 'disable']),
'help' => 'Une page désactivée figure dans le menu sans être cliquable.'
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block" id="PageEditMenuSpecial">
<h4>Options avancées d'emplacements</h4>
<div class="row">
<div class="col12">
<?php echo template::checkbox('pageEditHideMenuChildren', true, 'Masquer les pages enfants de cette page dans le menu principal', [
'checked' => $this->getData(['page', $this->getUrl(2), 'hideMenuChildren']),
'help' => 'Utilisez cette option pour afficher uniquement les pages enfants dans un `sous-menu de page parente` placé dans une barre latérale.'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php echo template::checkbox('pageEditHideMenuHead', true, 'Masquer cette page dans le menu principal, l\'afficher dans le menu d\'une barre latérale', [
'checked' => $this->getData(['page', $this->getUrl(2), 'hideMenuHead']),
'help' => 'Pour masquer la page totalement (ex : page en construction), dans `Position`, sélectionnez `Ne pas afficher`.'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php echo template::checkbox('pageEditHideMenuSide', true, 'Masquer cette page dans le menu d`une barre latérale, l\'afficher dans le menu principal', [
'checked' => $this->getData(['page', $this->getUrl(2), 'hideMenuSide']),
'help' => 'Pour masquer la page totalement (ex : page en construction), dans `Position`, sélectionnez `Ne pas afficher`.'
]); ?>
</div>
</div>
</div>
</div>
</div> </div>
<div class='row'> <div class='row'>
<div class="block"> <div class="block">
<h4>Options avancées</h4> <h4>Autres options</h4>
<div class='col6'> <div class='col6'>
<?php echo template::select('pageEditGroup', self::$groupPublics, [ <?php echo template::select('pageEditGroup', self::$groupPublics, [
'label' => 'Groupe requis pour accéder à la page :', 'label' => 'Groupe requis pour accéder à la page :',
@ -181,4 +226,4 @@
</div> </div>
</div> </div>
</div> </div>
<?php echo template::formClose(); ?> <?php echo template::formClose(); ?>

View File

@ -2,17 +2,17 @@
<?php foreach($this->getHierarchy() as $parentId => $childIds): ?> <?php foreach($this->getHierarchy() as $parentId => $childIds): ?>
<li> <li>
<?php if ($this->getData(['page', $parentId, 'disable']) == false || <?php if ($this->getData(['page', $parentId, 'disable']) == false ||
$this->getData(['page', $parentId, 'block']) !== 'bar' || $this->getData(['page', $parentId, 'block']) == 'bar' ||
$this->getUser('group') >= $module::$actions[$action]) { ?> $this->getUser('group') >= $module::$actions[$action]) { ?>
<a href="<?php echo helper::baseUrl() . $parentId; ?>"><?php echo $this->getData(['page', $parentId, 'title']); ?></a> <a href="<?php echo helper::baseUrl() . $parentId; ?>"><?php echo $this->getData(['page', $parentId, 'title']); ?></a>
<?php } else { ?> <?php } else { ?>
<?php echo $this->getData(['page', $parentId, 'title']); }?> <?php echo $this->getData(['page', $parentId, 'title']); }?>
<ul> <ul>
<?php foreach($childIds as $childId): ?> <?php foreach($childIds as $childId): ?>
<li> <li>
<?php if ($this->getData(['page', $childId, 'disable']) == false || <?php if ($this->getData(['page', $childId, 'disable']) == false ||
$this->getData(['page', $childId, 'block']) == 'bar' || $this->getData(['page', $childId, 'block']) == 'bar' ||
$this->getUser('group') >= $module::$actions[$action]) { ?> $this->getUser('group') >= $module::$actions[$action]) { ?>
<a href="<?php echo helper::baseUrl() . $childId; ?>"><?php echo $this->getData(['page', $childId, 'title']); ?></a> <a href="<?php echo helper::baseUrl() . $childId; ?>"><?php echo $this->getData(['page', $childId, 'title']); ?></a>
<?php } else { ?> <?php } else { ?>
<?php echo $this->getData(['page', $childId, 'title']); }?> <?php echo $this->getData(['page', $childId, 'title']); }?>

View File

@ -12,11 +12,11 @@
* Grille du site * Grille du site
* Barres et page * Barres et page
*/ */
#contentleft { #contentLeft {
} }
#contentright { #contentRight {
} }
#contentsite { #contentSite {
} }
/* Bannière */ /* Bannière */
@ -43,6 +43,18 @@ nav a:hover {
nav a.active { nav a.active {
} }
/* Menu latéral */
/* aspect des puces */
ul #menuSide {
}
/* Block menu à droite */
#menuSideRight {
}
/* Block menu à gauchle */
#menuSideLeft {
}
/* Bas de page */ /* Bas de page */
footer { footer {
} }

View File

@ -85,7 +85,7 @@ class theme extends common {
'15px' => 'Très grande' '15px' => 'Très grande'
]; ];
public static $footerPositions = [ public static $footerPositions = [
'hide' => 'Cachée', 'hide' => 'Caché',
'site' => 'Dans le site', 'site' => 'Dans le site',
'body' => 'En dessous du site' 'body' => 'En dessous du site'
]; ];
@ -105,11 +105,11 @@ class theme extends common {
'2.4vmax' => 'Très grande (240%)' '2.4vmax' => 'Très grande (240%)'
]; ];
public static $headerHeights = [ public static $headerHeights = [
'100px' => 'Très petite', '100px' => 'Très petite (100px) ',
'150px' => 'Petite', '150px' => 'Petite (150px)',
'200px' => 'Moyenne', '200px' => 'Moyenne (200px)',
'300px' => 'Grande', '300px' => 'Grande (300px)',
'400px' => 'Très grande' '400px' => 'Très grande (400px)'
]; ];
public static $headerPositions = [ public static $headerPositions = [
'body' => 'Au dessus du site', 'body' => 'Au dessus du site',
@ -290,7 +290,9 @@ class theme extends common {
'font' => $this->getInput('themeFooterFont'), 'font' => $this->getInput('themeFooterFont'),
'fontSize' => $this->getInput('themeFooterFontSize'), 'fontSize' => $this->getInput('themeFooterFontSize'),
'fontWeight' => $this->getInput('themeFooterFontWeight'), 'fontWeight' => $this->getInput('themeFooterFontWeight'),
'displayVersion' => $this->getInput('themefooterDisplayVersion', helper::FILTER_BOOLEAN) 'displayVersion' => $this->getInput('themefooterDisplayVersion', helper::FILTER_BOOLEAN),
'displaySiteMap' => $this->getInput('themefooterDisplaySiteMap', helper::FILTER_BOOLEAN),
'displayCopyright' => $this->getInput('themefooterDisplayCopyright', helper::FILTER_BOOLEAN)
]]); ]]);
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
@ -578,4 +580,4 @@ class theme extends common {
} }
return ($zipFilename); return ($zipFilename);
} }
} }

View File

@ -18,7 +18,7 @@
<h4>Couleur</h4> <h4>Couleur</h4>
<?php echo template::text('themeBodyBackgroundColor', [ <?php echo template::text('themeBodyBackgroundColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence', 'help' => 'Le curseur horizontal règle le niveau de transparence.',
'label' => 'Fond', 'label' => 'Fond',
'value' => $this->getData(['theme', 'body', 'backgroundColor']) 'value' => $this->getData(['theme', 'body', 'backgroundColor'])
]); ?> ]); ?>

View File

@ -131,6 +131,38 @@ $("#themeFooterLoginLink").on("change", function() {
$("#footerLoginLink").hide(); $("#footerLoginLink").hide();
} }
}).trigger("change"); }).trigger("change");
// Numéro de version
$("#themefooterDisplayVersion").on("change", function() {
if($(this).is(":checked")) {
$("#footerDisplayVersion").show();
}
else {
$("#footerDisplayVersion").hide();
}
}).trigger("change");
// Numéro de version
$("#themefooterDisplayCopyright").on("change", function() {
if($(this).is(":checked")) {
$("#footerDisplayCopyright").show();
}
else {
$("#footerDisplayCopyright").hide();
}
}).trigger("change");
// Site Map
$("#themefooterDisplaySiteMap").on("change", function() {
if($(this).is(":checked")) {
$("#footerDisplaySiteMap").show();
}
else {
$("#footerDisplaySiteMap").hide();
}
}).trigger("change");
// Numéro de version // Numéro de version
$("#themefooterDisplayVersion").on("change", function() { $("#themefooterDisplayVersion").on("change", function() {
@ -158,4 +190,4 @@ $("#themeFooterPosition").on("change", function() {
$("#themeFooterMargin").prop("checked", false).trigger("change"); $("#themeFooterMargin").prop("checked", false).trigger("change");
}); });
} }
}).trigger("change"); }).trigger("change");

View File

@ -73,7 +73,7 @@
<div class="col3"> <div class="col3">
<?php echo template::select('themeFooterFontSize', $module::$footerFontSizes, [ <?php echo template::select('themeFooterFontSize', $module::$footerFontSizes, [
'label' => 'Taille', 'label' => 'Taille',
'help' => 'Proportionnelle à celle définie dans le site', 'help' => 'Proportionnelle à celle définie dans le site.',
'selected' => $this->getData(['theme', 'footer', 'fontSize']) 'selected' => $this->getData(['theme', 'footer', 'fontSize'])
]); ?> ]); ?>
</div> </div>
@ -101,24 +101,11 @@
'label' => 'Contenu (texte ou HTML)', 'label' => 'Contenu (texte ou HTML)',
'value' => $this->getData(['theme', 'footer', 'text']) 'value' => $this->getData(['theme', 'footer', 'text'])
]); ?> ]); ?>
<div class="row">
<div class="col6">
<?php echo template::checkbox('themeFooterLoginLink', true, 'Lien de connexion', [
'checked' => $this->getData(['theme', 'footer', 'loginLink']),
'help' => 'Visible seulement lorsque vous n\'êtes pas connecté.'
]); ?>
</div>
<div class="col6">
<?php echo template::checkbox('themefooterDisplayVersion', true, 'Afficher le numéro de version', [
'checked' => $this->getData(['theme', 'footer','displayVersion'])
]); ?>
<div>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col4"> <div class="col6">
<div class="block"> <div class="block">
<h4>Contenu personnalisé</h4> <h4>Contenu personnalisé</h4>
<?php echo template::select('themeFooterTextPosition', $module::$footerblocks, [ <?php echo template::select('themeFooterTextPosition', $module::$footerblocks, [
@ -132,7 +119,7 @@
</div> </div>
</div> </div>
<div class="col4"> <div class="col6">
<div class="block"> <div class="block">
<h4>Réseaux sociaux</h4> <h4>Réseaux sociaux</h4>
<?php echo template::select('themeFooterSocialsPosition', $module::$footerblocks, [ <?php echo template::select('themeFooterSocialsPosition', $module::$footerblocks, [
@ -145,18 +132,49 @@
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="col4">
<div class="block">
<h4>Copyright</h4>
<?php echo template::select('themeFooterCopyrightPosition', $module::$footerblocks, [
'label' => 'Emplacement',
'selected' => $this->getData(['theme', 'footer', 'copyrightPosition'])
]); ?>
<?php echo template::select('themeFooterCopyrightAlign', $module::$aligns, [
'label' => 'Alignement horizontal',
'selected' => $this->getData(['theme', 'footer', 'copyrightAlign'])
]); ?>
</div>
</div>
</div> </div>
<?php echo template::formClose(); ?> <div class="row">
<div class="col12">
<div class="block">
<h4>Copyright</h4>
<div class="row">
<div class="col5">
<?php echo template::select('themeFooterCopyrightPosition', $module::$footerblocks, [
'label' => 'Emplacement',
'selected' => $this->getData(['theme', 'footer', 'copyrightPosition'])
]); ?>
<?php echo template::select('themeFooterCopyrightAlign', $module::$aligns, [
'label' => 'Alignement horizontal',
'selected' => $this->getData(['theme', 'footer', 'copyrightAlign'])
]); ?>
</div>
<div class="col6 offset1">
<p>Afficher les éléments suivants :</p>
<div class="row">
<?php echo template::checkbox('themefooterDisplayCopyright', true, 'Mention "Motorisé par"', [
'checked' => $this->getData(['theme', 'footer','displayCopyright'])
]); ?>
</div>
<div class="row">
<?php echo template::checkbox('themefooterDisplayVersion', true, 'Numéro de version', [
'checked' => $this->getData(['theme', 'footer','displayVersion'])
]); ?>
</div>
<div class="row">
<?php echo template::checkbox('themefooterDisplaySiteMap', true, 'Plan du site', [
'checked' => $this->getData(['theme', 'footer', 'displaySiteMap']),
'help' => 'Un plan du site permet un meilleur référencement.'
]); ?>
</div>
<div class="row">
<?php echo template::checkbox('themeFooterLoginLink', true, 'Lien de connexion', [
'checked' => $this->getData(['theme', 'footer', 'loginLink'])
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<?php echo template::formClose(); ?>

View File

@ -20,7 +20,7 @@
<div class="col6"> <div class="col6">
<?php echo template::text('themeHeaderBackgroundColor', [ <?php echo template::text('themeHeaderBackgroundColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence', 'help' => 'Le curseur horizontal règle le niveau de transparence.',
'label' => 'Fond', 'label' => 'Fond',
'value' => $this->getData(['theme', 'header', 'backgroundColor']) 'value' => $this->getData(['theme', 'header', 'backgroundColor'])
]); ?> ]); ?>
@ -28,7 +28,7 @@
<div class="col6"> <div class="col6">
<?php echo template::text('themeHeaderTextColor', [ <?php echo template::text('themeHeaderTextColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence', 'help' => 'Le curseur horizontal règle le niveau de transparence.',
'label' => 'Texte', 'label' => 'Texte',
'value' => $this->getData(['theme', 'header', 'textColor']) 'value' => $this->getData(['theme', 'header', 'textColor'])
]); ?> ]); ?>
@ -92,7 +92,7 @@
<div class="col3"> <div class="col3">
<?php echo template::select('themeHeaderFontSize', $module::$headerFontSizes, [ <?php echo template::select('themeHeaderFontSize', $module::$headerFontSizes, [
'label' => 'Taille', 'label' => 'Taille',
'help' => 'Proportionnelle à celle définie dans le site', 'help' => 'Proportionnelle à celle définie dans le site.',
'selected' => $this->getData(['theme', 'header', 'fontSize']) 'selected' => $this->getData(['theme', 'header', 'fontSize'])
]); ?> ]); ?>
</div> </div>

View File

@ -20,7 +20,7 @@
<div class="col6"> <div class="col6">
<?php echo template::text('themeMenuBackgroundColor', [ <?php echo template::text('themeMenuBackgroundColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence', 'help' => 'Le curseur horizontal règle le niveau de transparence.',
'label' => 'Fond', 'label' => 'Fond',
'value' => $this->getData(['theme', 'menu', 'backgroundColor']) 'value' => $this->getData(['theme', 'menu', 'backgroundColor'])
]); ?> ]); ?>
@ -28,7 +28,7 @@
<div class="col6"> <div class="col6">
<?php echo template::text('themeMenuTextColor', [ <?php echo template::text('themeMenuTextColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence', 'help' => 'Le curseur horizontal règle le niveau de transparence.',
'label' => 'Texte', 'label' => 'Texte',
'value' => $this->getData(['theme', 'menu', 'textColor']) 'value' => $this->getData(['theme', 'menu', 'textColor'])
]); ?> ]); ?>
@ -40,8 +40,7 @@
<div class="block"> <div class="block">
<h4>Contenu</h4> <h4>Contenu</h4>
<?php echo template::checkbox('themeMenuLoginLink', true, 'Lien de connexion', [ <?php echo template::checkbox('themeMenuLoginLink', true, 'Lien de connexion', [
'checked' => $this->getData(['theme', 'menu', 'loginLink']), 'checked' => $this->getData(['theme', 'menu', 'loginLink'])
'help' => 'Visible seulement sur cette page et lorsque vous n\'êtes pas connecté (non recommandé).'
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -125,4 +124,4 @@
</div> </div>
</div> </div>
</div> </div>
<?php echo template::formClose(); ?> <?php echo template::formClose(); ?>

View File

@ -20,7 +20,7 @@
<div class="col4"> <div class="col4">
<?php echo template::text('themeSiteBackgroundColor', [ <?php echo template::text('themeSiteBackgroundColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence', 'help' => 'Le curseur horizontal règle le niveau de transparence.',
'label' => 'Fond', 'label' => 'Fond',
'value' => $this->getData(['theme', 'site', 'backgroundColor']) 'value' => $this->getData(['theme', 'site', 'backgroundColor'])
]); ?> ]); ?>
@ -28,7 +28,7 @@
<div class="col4"> <div class="col4">
<?php echo template::text('themeTextTextColor', [ <?php echo template::text('themeTextTextColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence', 'help' => 'Le curseur horizontal règle le niveau de transparence.',
'label' => 'Texte', 'label' => 'Texte',
'value' => $this->getData(['theme', 'text', 'textColor']) 'value' => $this->getData(['theme', 'text', 'textColor'])
]); ?> ]); ?>
@ -36,7 +36,7 @@
<div class="col4"> <div class="col4">
<?php echo template::text('themeTitleTextColor', [ <?php echo template::text('themeTitleTextColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence', 'help' => 'Le curseur horizontal règle le niveau de transparence.',
'label' => 'Titres', 'label' => 'Titres',
'value' => $this->getData(['theme', 'title', 'textColor']) 'value' => $this->getData(['theme', 'title', 'textColor'])
]); ?> ]); ?>
@ -46,7 +46,7 @@
<div class="col4 offset2"> <div class="col4 offset2">
<?php echo template::text('themeButtonBackgroundColor', [ <?php echo template::text('themeButtonBackgroundColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence', 'help' => 'Le curseur horizontal règle le niveau de transparence.',
'label' => 'Boutons', 'label' => 'Boutons',
'value' => $this->getData(['theme', 'button', 'backgroundColor']) 'value' => $this->getData(['theme', 'button', 'backgroundColor'])
]); ?> ]); ?>
@ -54,7 +54,7 @@
<div class="col4"> <div class="col4">
<?php echo template::text('themeLinkTextColor', [ <?php echo template::text('themeLinkTextColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence', 'help' => 'Le curseur horizontal règle le niveau de transparence.',
'label' => 'Liens', 'label' => 'Liens',
'value' => $this->getData(['theme', 'link', 'textColor']) 'value' => $this->getData(['theme', 'link', 'textColor'])
]); ?> ]); ?>

540
core/vendor/sitemap/SitemapGenerator.php vendored Normal file
View File

@ -0,0 +1,540 @@
<?php
namespace Icamys\SitemapGenerator;
class SitemapGenerator
{
const MAX_FILE_SIZE = 10485760;
const MAX_URLS_PER_SITEMAP = 50000;
const URL_PARAM_LOC = 0;
const URL_PARAM_LASTMOD = 1;
const URL_PARAM_CHANGEFREQ = 2;
const URL_PARAM_PRIORITY = 3;
/**
* Name of sitemap file
* @var string
* @access public
*/
public $sitemapFileName = "sitemap.xml";
/**
* Name of sitemap index file
* @var string
* @access public
*/
public $sitemapIndexFileName = "sitemap-index.xml";
/**
* Robots file name
* @var string
* @access public
*/
public $robotsFileName = "robots.txt";
/**
* Quantity of URLs per single sitemap file.
* According to specification max value is 50.000.
* If Your links are very long, sitemap file can be bigger than 10MB,
* in this case use smaller value.
* @var int
* @access public
*/
public $maxURLsPerSitemap = self::MAX_URLS_PER_SITEMAP;
/**
* Quantity of sitemaps per index file.
* According to specification max value is 50.000
* If Your index file is very long, index file can be bigger than 10MB,
* in this case use smaller value.
* @see http://www.sitemaps.org/protocol.html
* @var int
* @access public
*/
public $maxSitemaps = 50000;
/**
* If true, two sitemap files (.xml and .xml.gz) will be created and added to robots.txt.
* If true, .gz file will be submitted to search engines.
* If quantity of URLs will be bigger than 50.000, option will be ignored,
* all sitemap files except sitemap index will be compressed.
* @var bool
* @access public
*/
public $createGZipFile = false;
/**
* URL to Your site.
* Script will use it to send sitemaps to search engines.
* @var string
* @access private
*/
private $baseURL;
/**
* Base path. Relative to script location.
* Use this if Your sitemap and robots files should be stored in other
* directory then script.
* @var string
* @access private
*/
private $basePath;
/**
* Version of this class
* @var string
* @access private
*/
private $classVersion = "1.0.0";
/**
* Search engines URLs
* @var array of strings
* @access private
*/
private $searchEngines = array(
array(
"http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid=USERID&url=",
"http://search.yahooapis.com/SiteExplorerService/V1/ping?sitemap="
),
"http://www.google.com/webmasters/tools/ping?sitemap=",
"http://submissions.ask.com/ping?sitemap=",
"http://www.bing.com/webmaster/ping.aspx?siteMap="
);
/**
* Array with urls
* @var \SplFixedArray of strings
* @access private
*/
private $urls;
/**
* Array with sitemap
* @var array of strings
* @access private
*/
private $sitemaps;
/**
* Array with sitemap index
* @var array of strings
* @access private
*/
private $sitemapIndex;
/**
* Current sitemap full URL
* @var string
* @access private
*/
private $sitemapFullURL;
/**
* @var \DOMDocument
*/
private $document;
/**
* Constructor.
* @param string $baseURL You site URL, with / at the end.
* @param string|null $basePath Relative path where sitemap and robots should be stored.
*/
public function __construct($baseURL, $basePath = "")
{
$this->urls = new \SplFixedArray();
$this->baseURL = $baseURL;
$this->basePath = $basePath;
$this->document = new \DOMDocument("1.0");
$this->document->preserveWhiteSpace = false;
$this->document->formatOutput = true;
}
/**
* Use this to add many URL at one time.
* Each inside array can have 1 to 4 fields.
* @param $urlsArray
* @throws \InvalidArgumentException
*/
public function addUrls($urlsArray)
{
if (!is_array($urlsArray)) {
throw new \InvalidArgumentException("Array as argument should be given.");
}
foreach ($urlsArray as $url) {
$this->addUrl(
isset($url[0]) ? $url[0] : null,
isset($url[1]) ? $url[1] : null,
isset($url[2]) ? $url[2] : null,
isset($url[3]) ? $url[3] : null
);
}
}
/**
* Use this to add single URL to sitemap.
* @param string $url URL
* @param \DateTime $lastModified When it was modified, use ISO 8601
* @param string $changeFrequency How often search engines should revisit this URL
* @param string $priority Priority of URL on You site
* @see http://en.wikipedia.org/wiki/ISO_8601
* @see http://php.net/manual/en/function.date.php
* @throws \InvalidArgumentException
*/
public function addUrl($url, \DateTime $lastModified = null, $changeFrequency = null, $priority = null)
{
if ($url == null) {
throw new \InvalidArgumentException("URL is mandatory. At least one argument should be given.");
}
$urlLength = extension_loaded('mbstring') ? mb_strlen($url) : strlen($url);
if ($urlLength > 2048) {
throw new \InvalidArgumentException(
"URL length can't be bigger than 2048 characters.
Note, that precise url length check is guaranteed only using mb_string extension.
Make sure Your server allow to use mbstring extension."
);
}
$tmp = new \SplFixedArray(1);
$tmp[self::URL_PARAM_LOC] = $url;
if (isset($lastModified)) {
$tmp->setSize(2);
$tmp[self::URL_PARAM_LASTMOD] = $lastModified->format(\DateTime::ATOM);
}
if (isset($changeFrequency)) {
$tmp->setSize(3);
$tmp[self::URL_PARAM_CHANGEFREQ] = $changeFrequency;
}
if (isset($priority)) {
$tmp->setSize(4);
$tmp[self::URL_PARAM_PRIORITY] = $priority;
}
if ($this->urls->getSize() === 0) {
$this->urls->setSize(1);
} else {
if ($this->urls->getSize() === $this->urls->key()) {
$this->urls->setSize($this->urls->getSize() * 2);
}
}
$this->urls[$this->urls->key()] = $tmp;
$this->urls->next();
}
/**
* @throws \BadMethodCallException
* @throws \InvalidArgumentException
* @throws \LengthException
*/
public function createSitemap()
{
if (!isset($this->urls)) {
throw new \BadMethodCallException("To create sitemap, call addUrl or addUrls function first.");
}
if ($this->maxURLsPerSitemap > self::MAX_URLS_PER_SITEMAP) {
throw new \InvalidArgumentException(
"More than " . self::MAX_URLS_PER_SITEMAP . " URLs per single sitemap is not allowed."
);
}
$generatorInfo = '<!-- generated-on="' . date('c') . '" -->';
$sitemapHeader = '<?xml version="1.0" encoding="UTF-8"?>' . $generatorInfo . '
<urlset
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' . "\r\n" . '
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9' . "\n" . '
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"' . "\n" . '
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
</urlset>';
$sitemapIndexHeader = '<?xml version="1.0" encoding="UTF-8"?>' . $generatorInfo . '
<sitemapindex
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd"
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
</sitemapindex>';
$nullUrls = 0;
foreach ($this->urls as $url) {
if (is_null($url)) {
$nullUrls++;
}
}
$nonEmptyUrls = $this->urls->getSize() - $nullUrls;
$chunks = ceil($nonEmptyUrls / $this->maxURLsPerSitemap);
for ($chunkCounter = 0; $chunkCounter < $chunks; $chunkCounter++) {
$xml = new \SimpleXMLElement($sitemapHeader);
for ($urlCounter = $chunkCounter * $this->maxURLsPerSitemap;
$urlCounter < ($chunkCounter + 1) * $this->maxURLsPerSitemap && $urlCounter < $nonEmptyUrls;
$urlCounter++
) {
$row = $xml->addChild('url');
$row->addChild(
'loc',
htmlspecialchars($this->baseURL . $this->urls[$urlCounter][self::URL_PARAM_LOC], ENT_QUOTES, 'UTF-8')
);
if ($this->urls[$urlCounter]->getSize() > 1) {
$row->addChild('lastmod', $this->urls[$urlCounter][self::URL_PARAM_LASTMOD]);
}
if ($this->urls[$urlCounter]->getSize() > 2) {
$row->addChild('changefreq', $this->urls[$urlCounter][self::URL_PARAM_CHANGEFREQ]);
}
if ($this->urls[$urlCounter]->getSize() > 3) {
$row->addChild('priority', $this->urls[$urlCounter][self::URL_PARAM_PRIORITY]);
}
}
if (strlen($xml->asXML()) > self::MAX_FILE_SIZE) {
throw new \LengthException(
"Sitemap size equals to " . strlen($xml->asXML())
. " bytes is more than 10MB (" . self::MAX_FILE_SIZE . " bytes),
please decrease maxURLsPerSitemap variable."
);
}
$this->sitemaps[] = $xml->asXML();
}
if (count($this->sitemaps) > $this->maxSitemaps) {
throw new \LengthException(
"Sitemap index can contain {$this->maxSitemaps} sitemaps.
Perhaps You trying to submit too many maps."
);
}
if (count($this->sitemaps) > 1) {
for ($i = 0; $i < count($this->sitemaps); $i++) {
$this->sitemaps[$i] = array(
str_replace(".xml", ($i + 1) . ".xml", $this->sitemapFileName),
$this->sitemaps[$i]
);
}
$xml = new \SimpleXMLElement($sitemapIndexHeader);
foreach ($this->sitemaps as $sitemap) {
$row = $xml->addChild('sitemap');
$row->addChild('loc', $this->baseURL . "/" . $this->getSitemapFileName(htmlentities($sitemap[0])));
$row->addChild('lastmod', date('c'));
}
$this->sitemapFullURL = $this->baseURL . "/" . $this->sitemapIndexFileName;
$this->sitemapIndex = array(
$this->sitemapIndexFileName,
$xml->asXML()
);
} else {
$this->sitemapFullURL = $this->baseURL . "/" . $this->getSitemapFileName();
$this->sitemaps[0] = array(
$this->sitemapFileName,
$this->sitemaps[0]
);
}
}
/**
* Returns created sitemaps as array of strings.
* Use it You want to work with sitemap without saving it as files.
* @return array of strings
* @access public
*/
public function toArray()
{
if (isset($this->sitemapIndex)) {
return array_merge(array($this->sitemapIndex), $this->sitemaps);
} else {
return $this->sitemaps;
}
}
/**
* Will write sitemaps as files.
* @access public
* @throws \BadMethodCallException
*/
public function writeSitemap()
{
if (!isset($this->sitemaps)) {
throw new \BadMethodCallException("To write sitemap, call createSitemap function first.");
}
if (isset($this->sitemapIndex)) {
$this->document->loadXML($this->sitemapIndex[1]);
$this->writeFile($this->document->saveXML(), $this->basePath, $this->sitemapIndex[0], true);
foreach ($this->sitemaps as $sitemap) {
$this->writeFile($sitemap[1], $this->basePath, $sitemap[0]);
}
} else {
$this->document->loadXML($this->sitemaps[0][1]);
$this->writeFile($this->document->saveXML(), $this->basePath, $this->sitemaps[0][0], true);
$this->writeFile($this->sitemaps[0][1], $this->basePath, $this->sitemaps[0][0]);
}
}
private function getSitemapFileName($name = null)
{
if (!$name) {
$name = $this->sitemapFileName;
}
if ($this->createGZipFile) {
$name .= ".gz";
}
return $name;
}
/**
* Save file.
* @param string $content
* @param string $filePath
* @param string $fileName
* @param bool $noGzip
* @return bool
* @access private
*/
private function writeFile($content, $filePath, $fileName, $noGzip = false)
{
if (!$noGzip && $this->createGZipFile) {
return $this->writeGZipFile($content, $filePath, $fileName);
}
$file = fopen($filePath . $fileName, 'w');
fwrite($file, $content);
return fclose($file);
}
/**
* Save GZipped file.
* @param string $content
* @param string $filePath
* @param string $fileName
* @return bool
* @access private
*/
private function writeGZipFile($content, $filePath, $fileName)
{
$fileName .= '.gz';
$file = gzopen($filePath . $fileName, 'w');
gzwrite($file, $content);
return gzclose($file);
}
/**
* If robots.txt file exist, will update information about newly created sitemaps.
* If there is no robots.txt will, create one and put into it information about sitemaps.
* @access public
* @throws \BadMethodCallException
*/
public function updateRobots()
{
if (!isset($this->sitemaps)) {
throw new \BadMethodCallException("To update robots.txt, call createSitemap function first.");
}
$sampleRobotsFile = "User-agent: *\nAllow: /";
if (file_exists($this->basePath . $this->robotsFileName)) {
$robotsFile = explode("\n", file_get_contents($this->basePath . $this->robotsFileName));
$robotsFileContent = "";
foreach ($robotsFile as $key => $value) {
if (substr($value, 0, 8) == 'Sitemap:') {
unset($robotsFile[$key]);
} else {
$robotsFileContent .= $value . "\n";
}
}
$robotsFileContent .= "Sitemap: $this->sitemapFullURL";
if (!isset($this->sitemapIndex)) {
$robotsFileContent .= "\nSitemap: " . $this->getSitemapFileName($this->sitemapFullURL);
}
file_put_contents($this->basePath . $this->robotsFileName, $robotsFileContent);
} else {
$sampleRobotsFile = $sampleRobotsFile . "\n\nSitemap: " . $this->sitemapFullURL;
if (!isset($this->sitemapIndex)) {
$sampleRobotsFile .= "\nSitemap: " . $this->getSitemapFileName($this->sitemapFullURL);
}
file_put_contents($this->basePath . $this->robotsFileName, $sampleRobotsFile);
}
}
/**
* Will inform search engines about newly created sitemaps.
* Google, Ask, Bing and Yahoo will be noticed.
* If You don't pass yahooAppId, Yahoo still will be informed,
* but this method can be used once per day. If You will do this often,
* message that limit was exceeded will be returned from Yahoo.
* @param string $yahooAppId Your site Yahoo appid.
* @return array of messages and http codes from each search engine
* @access public
* @throws \BadMethodCallException
*/
public function submitSitemap($yahooAppId = null)
{
if (!isset($this->sitemaps)) {
throw new \BadMethodCallException("To submit sitemap, call createSitemap function first.");
}
if (!extension_loaded('curl')) {
throw new \BadMethodCallException("cURL library is needed to do submission.");
}
$searchEngines = $this->searchEngines;
$searchEngines[0] = isset($yahooAppId) ?
str_replace("USERID", $yahooAppId, $searchEngines[0][0]) :
$searchEngines[0][1];
$result = array();
for ($i = 0; $i < count($searchEngines); $i++) {
$submitSite = curl_init($searchEngines[$i] . htmlspecialchars($this->sitemapFullURL, ENT_QUOTES, 'UTF-8'));
curl_setopt($submitSite, CURLOPT_RETURNTRANSFER, true);
$responseContent = curl_exec($submitSite);
$response = curl_getinfo($submitSite);
$submitSiteShort = array_reverse(explode(".", parse_url($searchEngines[$i], PHP_URL_HOST)));
$result[] = array(
"site" => $submitSiteShort[1] . "." . $submitSiteShort[0],
"fullsite" => $searchEngines[$i] . htmlspecialchars($this->sitemapFullURL, ENT_QUOTES, 'UTF-8'),
"http_code" => $response['http_code'],
"message" => str_replace("\n", " ", strip_tags($responseContent))
);
}
return $result;
}
/**
* Returns array of URLs
*
* Converts internal SplFixedArray to array
* @return array
*/
public function getUrls()
{
$urls = $this->urls->toArray();
/**
* @var int $key
* @var \SplFixedArray $urlSplArr
*/
foreach ($urls as $key => $urlSplArr) {
if (!is_null($urlSplArr)) {
$urlArr = $urlSplArr->toArray();
$url = [];
foreach ($urlArr as $paramIndex => $paramValue) {
switch ($paramIndex) {
case static::URL_PARAM_LOC:
$url['loc'] = $paramValue;
break;
case static::URL_PARAM_CHANGEFREQ:
$url['changefreq'] = $paramValue;
break;
case static::URL_PARAM_LASTMOD:
$url['lastmod'] = $paramValue;
break;
case static::URL_PARAM_PRIORITY:
$url['priority'] = $paramValue;
break;
default:
break;
}
}
$urls[$key] = $url;
}
}
return $urls;
}
public function countUrls()
{
return $this->urls->getSize();
}
}

6
core/vendor/swiper/inc.json vendored Normal file
View File

@ -0,0 +1,6 @@
[
"swiper.min.css",
"swiper.css.php",
"swiper.min.js",
"init.js"
]

23
core/vendor/swiper/init.js vendored Normal file
View File

@ -0,0 +1,23 @@
$(document).ready(function() {
var mySwiper = new Swiper('.swiper-container', {
//direction: 'vertical',
speed:1000,
spaceBetween: 20,
roundLengths:true,
loop: true,
autoplay: {
//reverseDirection: true,
delay: 6000,
disableOnInteraction: false,
},
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
keyboard: {
enabled: true,
},
mousewheel: true,
});
});

2
core/vendor/swiper/swiper.css.php vendored Normal file
View File

@ -0,0 +1,2 @@
<?php header('content-type: text/css');?>
.swiper-container{margin:auto;max-width:<?php echo $_COOKIE["SwiperMaxWidth"];?>;}

25
core/vendor/swiper/swiper.min.css vendored Normal file

File diff suppressed because one or more lines are too long

13
core/vendor/swiper/swiper.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -34,8 +34,8 @@ tinymce.init({
// Target pour lightbox // Target pour lightbox
rel_list: [ rel_list: [
{title: 'None', value: ''}, {title: 'None', value: ''},
{title: 'Popup Lity', value: 'data-lity'}, {title: 'Popup intégrée (Lity)', value: 'data-lity'},
{title: 'Diaporama SimpleLightbox', value: 'gallery'} {title: 'Diaporama d\'images (SimpleLightbox)', value: 'gallery'}
], ],
// Titre des image // Titre des image
image_title: true, image_title: true,
@ -155,6 +155,11 @@ tinymce.init({
title: "Grille asymétrique : 10 - 2", title: "Grille asymétrique : 10 - 2",
url: baseUrl + "core/vendor/tinymce/templates/col10-2.html", url: baseUrl + "core/vendor/tinymce/templates/col10-2.html",
description: "Grille adaptative sur 12 colonnes, sur mobile elles passent les unes en dessous des autres." description: "Grille adaptative sur 12 colonnes, sur mobile elles passent les unes en dessous des autres."
},
{
title: "Exemple Swiper",
url: baseUrl + "core/vendor/tinymce/templates/swiper.html",
description: "Exemple Swiper."
} }
] ]
}); });

View File

@ -1 +1 @@
[{"title":"Accueil","value":"?accueil","menu":[{"title":"Enfant","value":"?enfant"},{"title":"Mise en page","value":"?mise-en-page"}]},{"title":"Blog","value":"?blog"},{"title":"Galeries","value":"?galeries"},{"title":"Site de Zwii","value":"?site-de-zwii"},{"title":"Contact","value":"?contact"}] [{"title":"Accueil","value":"?accueil","menu":[{"title":"Enfant","value":"?enfant"},{"title":"Mise en page","value":"?mise-en-page"},{"title":"Menu lat\u00e9ral","value":"?menu-lateral"}]},{"title":"Priv\u00e9e","value":"?privee"},{"title":"Blog","value":"?blog"},{"title":"Galeries","value":"?galeries"},{"title":"Site de Zwii","value":"?site-de-zwii"},{"title":"Contact","value":"?contact"}]

View File

@ -0,0 +1,19 @@
<p>Pour éditer ce slide d'images, basculez l'affichage en mode code source puis remplacez les noms des images par les vôtres en respectant les chemins d'accès.</p>
<div id="swiper" class="swiper-container swiper-container-horizontal">
<div class="swiper-wrapper">
<div class="swiper-slide swiper-slide-active"><a href="site/file/source/galerie/space/cosmos.jpg" target="_blank" data-lity rel="noopener"><img title="Cosmos" src="site/file/source/galerie/space/cosmos.jpg" /></a>
<div class="swiper-text">Le cosmos</div>
</div>
<div class="swiper-slide swiper-slide-active"><a href="site/file/source/galerie/space/nebula.jpg" target="_blank" data-lity rel="noopener"><img title="Nebula" src="site/file/source/galerie/space/nebula.jpg" /></a>
<div class="swiper-text">Une nébuleuse</div>
</div>
<!-- copiez collez ce dernier élément pour ajouter des images, remplacez les valeurs en majuscules par les vôtres.
L'hyperlien sur l'image et la légende ne sont pas obligatoires
<div class="swiper-slide swiper-slide-active"><a href="site/file/source/NOM_IMAGE.jpg" target="_blank" data-lity rel="noopener"><img title="TITRE" src="site/file/source/galerie/space/NOM_IMAGE.jpg" /></a>
<div class="swiper-text">LEGENDE</div>
</div>
-->
</div>
<div id="swiper-button-prev" class="swiper-button-prev swiper-button-white"> </div>
<div id="swiper-button-next" class="swiper-button-next swiper-button-white"> </div>
</div>

85
core/vendor/zwiico/css/animation.css vendored Normal file
View File

@ -0,0 +1,85 @@
/*
Animation example, for spinners
*/
.animate-spin {
-moz-animation: spin 2s infinite linear;
-o-animation: spin 2s infinite linear;
-webkit-animation: spin 2s infinite linear;
animation: spin 2s infinite linear;
display: inline-block;
}
@-moz-keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@-webkit-keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@-o-keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@-ms-keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}

43
core/vendor/zwiico/css/zwiico-codes.css vendored Normal file
View File

@ -0,0 +1,43 @@
.zwiico-logout:before { content: '\e800'; } /* '' */
.zwiico-check:before { content: '\e801'; } /* '' */
.zwiico-cancel:before { content: '\e802'; } /* '' */
.zwiico-plus:before { content: '\e803'; } /* '' */
.zwiico-minus:before { content: '\e804'; } /* '' */
.zwiico-help:before { content: '\e805'; } /* '' */
.zwiico-pencil:before { content: '\e806'; } /* '' */
.zwiico-gear:before { content: '\e807'; } /* '' */
.zwiico-eye:before { content: '\e808'; } /* '' */
.zwiico-up:before { content: '\e809'; } /* '' */
.zwiico-folder:before { content: '\e80a'; } /* '' */
.zwiico-download:before { content: '\e80b'; } /* '' */
.zwiico-left:before { content: '\e80c'; } /* '' */
.zwiico-users:before { content: '\e80d'; } /* '' */
.zwiico-user:before { content: '\e80e'; } /* '' */
.zwiico-comment:before { content: '\e80f'; } /* '' */
.zwiico-home:before { content: '\e810'; } /* '' */
.zwiico-mimi:before { content: '\e811'; } /* '' */
.zwiico-down:before { content: '\e812'; } /* '' */
.zwiico-lock:before { content: '\e813'; } /* '' */
.zwiico-chat:before { content: '\e814'; } /* '' */
.zwiico-eye-off:before { content: '\e815'; } /* '' */
.zwiico-update:before { content: '\e816'; } /* '' */
.zwiico-upload:before { content: '\e817'; } /* '' */
.zwiico-down-open:before { content: '\e818'; } /* '' */
.zwiico-left-open:before { content: '\e819'; } /* '' */
.zwiico-cogs:before { content: '\e81a'; } /* '' */
.zwiico-cog-alt:before { content: '\e81b'; } /* '' */
.zwiico-trash:before { content: '\e81c'; } /* '' */
.zwiico-spin:before { content: '\e831'; } /* '' */
.zwiico-twitter:before { content: '\f099'; } /* '' */
.zwiico-facebook:before { content: '\f09a'; } /* '' */
.zwiico-menu:before { content: '\f0c9'; } /* '' */
.zwiico-sort:before { content: '\f0dc'; } /* '' */
.zwiico-linkedin:before { content: '\f0e1'; } /* '' */
.zwiico-download-cloud:before { content: '\f0ed'; } /* '' */
.zwiico-upload-cloud:before { content: '\f0ee'; } /* '' */
.zwiico-code:before { content: '\f121'; } /* '' */
.zwiico-youtube:before { content: '\f167'; } /* '' */
.zwiico-instagram:before { content: '\f16d'; } /* '' */
.zwiico-brush:before { content: '\f1fc'; } /* '' */
.zwiico-pinterest:before { content: '\f231'; } /* '' */

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,43 @@
.zwiico-logout { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe800;&nbsp;'); }
.zwiico-check { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe801;&nbsp;'); }
.zwiico-cancel { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe802;&nbsp;'); }
.zwiico-plus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe803;&nbsp;'); }
.zwiico-minus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe804;&nbsp;'); }
.zwiico-help { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe805;&nbsp;'); }
.zwiico-pencil { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe806;&nbsp;'); }
.zwiico-gear { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe807;&nbsp;'); }
.zwiico-eye { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe808;&nbsp;'); }
.zwiico-up { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe809;&nbsp;'); }
.zwiico-folder { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80a;&nbsp;'); }
.zwiico-download { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80b;&nbsp;'); }
.zwiico-left { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80c;&nbsp;'); }
.zwiico-users { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80d;&nbsp;'); }
.zwiico-user { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80e;&nbsp;'); }
.zwiico-comment { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80f;&nbsp;'); }
.zwiico-home { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe810;&nbsp;'); }
.zwiico-mimi { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe811;&nbsp;'); }
.zwiico-down { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe812;&nbsp;'); }
.zwiico-lock { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe813;&nbsp;'); }
.zwiico-chat { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe814;&nbsp;'); }
.zwiico-eye-off { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe815;&nbsp;'); }
.zwiico-update { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe816;&nbsp;'); }
.zwiico-upload { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe817;&nbsp;'); }
.zwiico-down-open { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe818;&nbsp;'); }
.zwiico-left-open { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe819;&nbsp;'); }
.zwiico-cogs { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81a;&nbsp;'); }
.zwiico-cog-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81b;&nbsp;'); }
.zwiico-trash { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81c;&nbsp;'); }
.zwiico-spin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe831;&nbsp;'); }
.zwiico-twitter { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf099;&nbsp;'); }
.zwiico-facebook { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf09a;&nbsp;'); }
.zwiico-menu { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c9;&nbsp;'); }
.zwiico-sort { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0dc;&nbsp;'); }
.zwiico-linkedin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e1;&nbsp;'); }
.zwiico-download-cloud { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ed;&nbsp;'); }
.zwiico-upload-cloud { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ee;&nbsp;'); }
.zwiico-code { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf121;&nbsp;'); }
.zwiico-youtube { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf167;&nbsp;'); }
.zwiico-instagram { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf16d;&nbsp;'); }
.zwiico-brush { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf1fc;&nbsp;'); }
.zwiico-pinterest { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf231;&nbsp;'); }

54
core/vendor/zwiico/css/zwiico-ie7.css vendored Normal file
View File

@ -0,0 +1,54 @@
[class^="zwiico-"], [class*=" zwiico-"] {
font-family: 'zwiico';
font-style: normal;
font-weight: normal;
/* fix buttons height */
line-height: 1em;
/* you can be more comfortable with increased icons size */
/* font-size: 120%; */
}
.zwiico-logout { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe800;&nbsp;'); }
.zwiico-check { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe801;&nbsp;'); }
.zwiico-cancel { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe802;&nbsp;'); }
.zwiico-plus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe803;&nbsp;'); }
.zwiico-minus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe804;&nbsp;'); }
.zwiico-help { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe805;&nbsp;'); }
.zwiico-pencil { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe806;&nbsp;'); }
.zwiico-gear { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe807;&nbsp;'); }
.zwiico-eye { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe808;&nbsp;'); }
.zwiico-up { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe809;&nbsp;'); }
.zwiico-folder { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80a;&nbsp;'); }
.zwiico-download { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80b;&nbsp;'); }
.zwiico-left { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80c;&nbsp;'); }
.zwiico-users { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80d;&nbsp;'); }
.zwiico-user { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80e;&nbsp;'); }
.zwiico-comment { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80f;&nbsp;'); }
.zwiico-home { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe810;&nbsp;'); }
.zwiico-mimi { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe811;&nbsp;'); }
.zwiico-down { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe812;&nbsp;'); }
.zwiico-lock { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe813;&nbsp;'); }
.zwiico-chat { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe814;&nbsp;'); }
.zwiico-eye-off { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe815;&nbsp;'); }
.zwiico-update { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe816;&nbsp;'); }
.zwiico-upload { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe817;&nbsp;'); }
.zwiico-down-open { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe818;&nbsp;'); }
.zwiico-left-open { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe819;&nbsp;'); }
.zwiico-cogs { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81a;&nbsp;'); }
.zwiico-cog-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81b;&nbsp;'); }
.zwiico-trash { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81c;&nbsp;'); }
.zwiico-spin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe831;&nbsp;'); }
.zwiico-twitter { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf099;&nbsp;'); }
.zwiico-facebook { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf09a;&nbsp;'); }
.zwiico-menu { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c9;&nbsp;'); }
.zwiico-sort { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0dc;&nbsp;'); }
.zwiico-linkedin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e1;&nbsp;'); }
.zwiico-download-cloud { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ed;&nbsp;'); }
.zwiico-upload-cloud { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ee;&nbsp;'); }
.zwiico-code { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf121;&nbsp;'); }
.zwiico-youtube { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf167;&nbsp;'); }
.zwiico-instagram { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf16d;&nbsp;'); }
.zwiico-brush { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf1fc;&nbsp;'); }
.zwiico-pinterest { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf231;&nbsp;'); }

99
core/vendor/zwiico/css/zwiico.css vendored Normal file
View File

@ -0,0 +1,99 @@
@font-face {
font-family: 'zwiico';
src: url('../font/zwiico.eot?50739598');
src: url('../font/zwiico.eot?50739598#iefix') format('embedded-opentype'),
url('../font/zwiico.woff2?50739598') format('woff2'),
url('../font/zwiico.woff?50739598') format('woff'),
url('../font/zwiico.ttf?50739598') format('truetype'),
url('../font/zwiico.svg?50739598#zwiico') format('svg');
font-weight: normal;
font-style: normal;
}
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
/*
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'zwiico';
src: url('../font/zwiico.svg?50739598#zwiico') format('svg');
}
}
*/
[class^="zwiico-"]:before, [class*=" zwiico-"]:before {
font-family: "zwiico";
font-style: normal;
font-weight: normal;
speak: none;
display: inline-block;
text-decoration: inherit;
width: 1em;
margin-right: .2em;
text-align: center;
/* opacity: .8; */
/* For safety - reset parent styles, that can break glyph codes*/
font-variant: normal;
text-transform: none;
/* fix buttons height, for twitter bootstrap */
line-height: 1em;
/* Animation center compensation - margins should be symmetric */
/* remove if not needed */
margin-left: .2em;
/* you can be more comfortable with increased icons size */
/* font-size: 120%; */
/* Font smoothing. That was taken from TWBS */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
/* Uncomment for 3D effect */
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
}
.zwiico-logout:before { content: '\e800'; } /* '' */
.zwiico-check:before { content: '\e801'; } /* '' */
.zwiico-cancel:before { content: '\e802'; } /* '' */
.zwiico-plus:before { content: '\e803'; } /* '' */
.zwiico-minus:before { content: '\e804'; } /* '' */
.zwiico-help:before { content: '\e805'; } /* '' */
.zwiico-pencil:before { content: '\e806'; } /* '' */
.zwiico-gear:before { content: '\e807'; } /* '' */
.zwiico-eye:before { content: '\e808'; } /* '' */
.zwiico-up:before { content: '\e809'; } /* '' */
.zwiico-folder:before { content: '\e80a'; } /* '' */
.zwiico-download:before { content: '\e80b'; } /* '' */
.zwiico-left:before { content: '\e80c'; } /* '' */
.zwiico-users:before { content: '\e80d'; } /* '' */
.zwiico-user:before { content: '\e80e'; } /* '' */
.zwiico-comment:before { content: '\e80f'; } /* '' */
.zwiico-home:before { content: '\e810'; } /* '' */
.zwiico-mimi:before { content: '\e811'; } /* '' */
.zwiico-down:before { content: '\e812'; } /* '' */
.zwiico-lock:before { content: '\e813'; } /* '' */
.zwiico-chat:before { content: '\e814'; } /* '' */
.zwiico-eye-off:before { content: '\e815'; } /* '' */
.zwiico-update:before { content: '\e816'; } /* '' */
.zwiico-upload:before { content: '\e817'; } /* '' */
.zwiico-down-open:before { content: '\e818'; } /* '' */
.zwiico-left-open:before { content: '\e819'; } /* '' */
.zwiico-cogs:before { content: '\e81a'; } /* '' */
.zwiico-cog-alt:before { content: '\e81b'; } /* '' */
.zwiico-trash:before { content: '\e81c'; } /* '' */
.zwiico-spin:before { content: '\e831'; } /* '' */
.zwiico-twitter:before { content: '\f099'; } /* '' */
.zwiico-facebook:before { content: '\f09a'; } /* '' */
.zwiico-menu:before { content: '\f0c9'; } /* '' */
.zwiico-sort:before { content: '\f0dc'; } /* '' */
.zwiico-linkedin:before { content: '\f0e1'; } /* '' */
.zwiico-download-cloud:before { content: '\f0ed'; } /* '' */
.zwiico-upload-cloud:before { content: '\f0ee'; } /* '' */
.zwiico-code:before { content: '\f121'; } /* '' */
.zwiico-youtube:before { content: '\f167'; } /* '' */
.zwiico-instagram:before { content: '\f16d'; } /* '' */
.zwiico-brush:before { content: '\f1fc'; } /* '' */
.zwiico-pinterest:before { content: '\f231'; } /* '' */

Binary file not shown.

View File

@ -1,7 +1,7 @@
<?xml version="1.0" standalone="no"?> <?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg"> <svg xmlns="http://www.w3.org/2000/svg">
<metadata>Copyright (C) 2018 by original authors @ fontello.com</metadata> <metadata>Copyright (C) 2019 by original authors @ fontello.com</metadata>
<defs> <defs>
<font id="zwiico" horiz-adv-x="1000" > <font id="zwiico" horiz-adv-x="1000" >
<font-face font-family="zwiico" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" /> <font-face font-family="zwiico" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
@ -50,7 +50,19 @@
<glyph glyph-name="eye-off" unicode="&#xe815;" d="M310 105l43 79q-48 35-76 88t-27 114q0 67 34 125-128-65-213-197 94-144 239-209z m217 424q0 11-8 19t-19 7q-70 0-120-50t-50-119q0-11 8-19t19-8 19 8 8 19q0 48 34 82t82 34q11 0 19 8t8 19z m202 106q0-4 0-5-59-105-176-316t-176-316l-28-50q-5-9-15-9-7 0-75 39-9 6-9 16 0 7 25 49-80 36-147 96t-117 137q-11 17-11 38t11 39q86 131 212 207t277 76q50 0 100-10l31 54q5 9 15 9 3 0 10-3t18-9 18-10 18-10 10-7q9-5 9-15z m21-249q0-78-44-142t-117-91l157 280q4-25 4-47z m250-72q0-19-11-38-22-36-61-81-84-96-194-149t-234-53l41 74q119 10 219 76t169 171q-65 100-158 164l35 63q53-36 102-85t81-103q11-19 11-39z" horiz-adv-x="1000" /> <glyph glyph-name="eye-off" unicode="&#xe815;" d="M310 105l43 79q-48 35-76 88t-27 114q0 67 34 125-128-65-213-197 94-144 239-209z m217 424q0 11-8 19t-19 7q-70 0-120-50t-50-119q0-11 8-19t19-8 19 8 8 19q0 48 34 82t82 34q11 0 19 8t8 19z m202 106q0-4 0-5-59-105-176-316t-176-316l-28-50q-5-9-15-9-7 0-75 39-9 6-9 16 0 7 25 49-80 36-147 96t-117 137q-11 17-11 38t11 39q86 131 212 207t277 76q50 0 100-10l31 54q5 9 15 9 3 0 10-3t18-9 18-10 18-10 10-7q9-5 9-15z m21-249q0-78-44-142t-117-91l157 280q4-25 4-47z m250-72q0-19-11-38-22-36-61-81-84-96-194-149t-234-53l41 74q119 10 219 76t169 171q-65 100-158 164l35 63q53-36 102-85t81-103q11-19 11-39z" horiz-adv-x="1000" />
<glyph glyph-name="arrows-cw" unicode="&#xe816;" d="M843 261q0-3 0-4-36-150-150-243t-267-93q-81 0-157 31t-136 88l-72-72q-11-11-25-11t-25 11-11 25v250q0 14 11 25t25 11h250q14 0 25-11t10-25-10-25l-77-77q40-36 90-57t105-20q74 0 139 37t104 99q6 10 30 66 4 13 16 13h107q8 0 13-6t5-12z m14 446v-250q0-14-10-25t-26-11h-250q-14 0-25 11t-10 25 10 25l77 77q-82 77-194 77-75 0-140-37t-104-99q-6-10-29-66-5-13-17-13h-111q-7 0-13 6t-5 12v4q36 150 151 243t268 93q81 0 158-31t137-88l72 72q11 11 25 11t26-11 10-25z" horiz-adv-x="857.1" /> <glyph glyph-name="update" unicode="&#xe816;" d="M843 261q0-3 0-4-36-150-150-243t-267-93q-81 0-157 31t-136 88l-72-72q-11-11-25-11t-25 11-11 25v250q0 14 11 25t25 11h250q14 0 25-11t10-25-10-25l-77-77q40-36 90-57t105-20q74 0 139 37t104 99q6 10 30 66 4 13 16 13h107q8 0 13-6t5-12z m14 446v-250q0-14-10-25t-26-11h-250q-14 0-25 11t-10 25 10 25l77 77q-82 77-194 77-75 0-140-37t-104-99q-6-10-29-66-5-13-17-13h-111q-7 0-13 6t-5 12v4q36 150 151 243t268 93q81 0 158-31t137-88l72 72q11 11 25 11t26-11 10-25z" horiz-adv-x="857.1" />
<glyph glyph-name="upload" unicode="&#xe817;" d="M714 29q0 14-10 25t-25 10-25-10-11-25 11-25 25-11 25 11 10 25z m143 0q0 14-10 25t-26 10-25-10-10-25 10-25 25-11 26 11 10 25z m72 125v-179q0-22-16-38t-38-16h-821q-23 0-38 16t-16 38v179q0 22 16 38t38 15h238q12-31 39-51t62-20h143q34 0 61 20t40 51h238q22 0 38-15t16-38z m-182 361q-9-22-33-22h-143v-250q0-15-10-25t-25-11h-143q-15 0-25 11t-11 25v250h-143q-23 0-33 22-9 22 8 39l250 250q10 10 25 10t25-10l250-250q18-17 8-39z" horiz-adv-x="928.6" />
<glyph glyph-name="down-open" unicode="&#xe818;" d="M939 399l-414-413q-10-11-25-11t-25 11l-414 413q-11 11-11 26t11 25l93 92q10 11 25 11t25-11l296-296 296 296q11 11 25 11t26-11l92-92q11-11 11-25t-11-26z" horiz-adv-x="1000" />
<glyph glyph-name="left-open" unicode="&#xe819;" d="M654 682l-297-296 297-297q10-10 10-25t-10-25l-93-93q-11-10-25-10t-25 10l-414 415q-11 10-11 25t11 25l414 414q10 11 25 11t25-11l93-93q10-10 10-25t-10-25z" horiz-adv-x="714.3" />
<glyph glyph-name="cogs" unicode="&#xe81a;" d="M0 245l0 97 94 8q8 30 23 55l-60 74 68 69 74-61q26 16 55 23l8 94 97 0 10-94q29-7 55-23l74 61 68-69-60-74q16-25 23-55l94-8 0-97-94-10q-7-29-23-55l60-72-68-70-74 60q-26-15-55-23l-10-94-97 0-8 94q-29 8-55 23l-74-60-68 70 60 72q-15 26-23 55z m221 49q0-37 26-64t64-26 63 26 26 64-26 63-63 26-64-26-26-63z m318 238l8 72 70-2q8 22 20 39l-37 57 54 45 49-49q20 10 41 14l14 66 72-8-2-68q22-8 39-22l57 39 45-54-49-49q10-20 12-43l68-14-8-70-68 0q-8-20-22-37l39-59-56-45-47 49q-22-8-43-12l-14-66-70 6 0 70q-20 8-37 20l-59-37-45 54 49 49q-8 20-12 41z m31-445l6 50 49 0q6 16 14 28l-26 43 37 33 36-37q13 8 29 10l10 48 48-5 0-49q16-6 28-16l41 27 31-41-35-35q6-13 10-29l47-12-6-51-49 0q-4-15-14-27l28-43-40-33-35 37q-13-8-29-10l-10-49-49 6 0 51q-13 4-27 14l-41-28-31 41 35 36q-6 13-8 29z m118 13q-4-21 8-36t32-17 34 9 17 34-10 35-31 18l-6 0q-17 0-31-12t-13-31z m17 451q-4-27 14-48t45-25 48 15 23 45-14 48-44 24l-7 0q-26 0-44-17t-21-42z" horiz-adv-x="1000" />
<glyph glyph-name="cog-alt" unicode="&#xe81b;" d="M500 350q0 59-42 101t-101 42-101-42-42-101 42-101 101-42 101 42 42 101z m429-286q0 29-22 51t-50 21-50-21-21-51q0-29 21-50t50-21 51 21 21 50z m0 572q0 29-22 50t-50 21-50-21-21-50q0-30 21-51t50-21 51 21 21 51z m-215-235v-103q0-6-4-11t-8-6l-87-14q-6-19-18-42 19-27 50-64 4-6 4-11 0-7-4-11-12-17-46-50t-43-33q-7 0-12 4l-64 50q-21-11-43-17-6-60-13-87-4-13-17-13h-104q-6 0-11 4t-5 10l-13 85q-19 6-42 18l-66-50q-4-4-11-4-6 0-12 4-80 75-80 90 0 5 4 10 5 8 23 30t26 34q-13 24-20 46l-85 13q-5 1-9 5t-4 11v104q0 5 4 10t9 6l86 14q7 19 18 42-19 27-50 64-4 6-4 11 0 7 4 12 12 16 46 49t44 33q6 0 12-4l64-50q19 10 43 18 6 60 13 86 3 13 16 13h104q6 0 11-4t6-10l13-85q19-6 42-17l65 49q5 4 12 4 6 0 11-4 81-75 81-90 0-4-4-10-7-9-24-30t-25-34q13-27 19-46l85-12q6-2 9-6t4-11z m357-298v-78q0-9-83-17-6-15-16-29 28-63 28-77 0-2-2-4-68-40-69-40-5 0-26 27t-29 37q-11-1-17-1t-17 1q-7-11-29-37t-25-27q-1 0-69 40-3 2-3 4 0 14 29 77-10 14-17 29-83 8-83 17v78q0 9 83 18 7 16 17 29-29 63-29 77 0 2 3 4 2 1 19 11t33 19 17 9q4 0 25-26t29-38q12 1 17 1t17-1q28 40 51 63l4 1q2 0 69-39 2-2 2-4 0-14-28-77 9-13 16-29 83-9 83-18z m0 572v-78q0-9-83-18-6-15-16-29 28-63 28-77 0-2-2-4-68-39-69-39-5 0-26 26t-29 38q-11-1-17-1t-17 1q-7-12-29-38t-25-26q-1 0-69 39-3 2-3 4 0 14 29 77-10 14-17 29-83 9-83 18v78q0 9 83 17 7 16 17 29-29 63-29 77 0 2 3 4 2 1 19 11t33 19 17 9q4 0 25-26t29-37q12 1 17 1t17-1q28 39 51 62l4 1q2 0 69-39 2-2 2-4 0-14-28-77 9-13 16-29 83-8 83-17z" horiz-adv-x="1071.4" />
<glyph glyph-name="trash" unicode="&#xe81c;" d="M50 458q122-70 330-70t330 70l-54-486q-2-14-35-36t-100-43-141-21-140 21-100 43-36 36z m488 300q94-18 158-55t64-71l0-10q0-58-112-99t-268-41-268 41-112 99l0 10q0 34 64 71t158 55l42 48q22 26 70 26l92 0q52 0 70-26z m-54-112l84 0q-92 110-104 126-14 16-32 16l-102 0q-22 0-32-16l-106-126 84 0 64 66 82 0z" horiz-adv-x="760" />
<glyph glyph-name="spin" unicode="&#xe831;" d="M46 144l0 0c0 0-1 0-1 0-8 18-15 37-21 55-6 19-11 38-15 58-19 99-8 203 35 298 3 6 10 8 15 5 1 0 2 0 2-1l0 0 80-59c5-3 6-9 4-14-5-12-9-25-12-37-4-13-7-26-9-40-11-67-3-137 23-201 2-5 0-10-4-13l0 0-80-56c-5-4-12-2-16 3-1 0-1 1-1 2l0 0z m120 574l0 0c0 1 0 1 0 1 15 13 30 25 46 37 16 11 33 22 51 31 89 50 192 72 297 60 6-1 10-6 10-13 0-1-1-1-1-2l0 0-31-94c-2-5-8-8-13-7-13 0-27 0-40 0-14-1-27-2-40-4-68-11-133-40-186-84-4-3-10-3-14 0l0 0-79 58c-5 3-6 11-2 16 0 0 1 1 2 1l0 0z m588 65l0 0c0 0 1 0 1 0 17-10 34-21 50-32 16-12 31-25 46-38 74-69 127-160 148-262 2-6-2-12-9-13-1 0-1 0-2 0l0 0-100 1c-5 0-10 4-11 9-3 13-8 26-12 38-5 12-10 25-17 36-31 61-78 113-137 150-5 3-6 8-5 13l0 0 31 92c2 6 9 9 15 7 1 0 2-1 2-1l0 0z m244-535l0 0c0 0 0 0 0 0-4-20-9-39-15-57-7-19-14-37-22-55-44-92-114-170-205-221-6-3-13-1-16 4 0 1-1 2-1 2l0 0-30 94c-2 6 1 12 6 14 11 7 22 15 32 23 11 9 21 18 30 27 49 48 84 109 101 176 2 5 6 8 11 8l0 0 98-1c6 0 11-5 11-11 0-1 0-2 0-3l0 0z m-438-395l0 0c0 0 0 0 0 0-20-2-40-3-60-3-20 0-40 1-59 4-102 12-198 54-276 125-5 4-5 11 0 16 0 0 1 1 1 1l0 0 81 58c5 3 12 2 16-2 10-8 20-16 32-23 11-7 22-14 34-20 62-31 131-45 200-41 6 0 10-3 12-8l0 0 29-92c2-6-1-12-7-14-1-1-2-1-3-1l0 0z" horiz-adv-x="1000" /> <glyph glyph-name="spin" unicode="&#xe831;" d="M46 144l0 0c0 0-1 0-1 0-8 18-15 37-21 55-6 19-11 38-15 58-19 99-8 203 35 298 3 6 10 8 15 5 1 0 2 0 2-1l0 0 80-59c5-3 6-9 4-14-5-12-9-25-12-37-4-13-7-26-9-40-11-67-3-137 23-201 2-5 0-10-4-13l0 0-80-56c-5-4-12-2-16 3-1 0-1 1-1 2l0 0z m120 574l0 0c0 1 0 1 0 1 15 13 30 25 46 37 16 11 33 22 51 31 89 50 192 72 297 60 6-1 10-6 10-13 0-1-1-1-1-2l0 0-31-94c-2-5-8-8-13-7-13 0-27 0-40 0-14-1-27-2-40-4-68-11-133-40-186-84-4-3-10-3-14 0l0 0-79 58c-5 3-6 11-2 16 0 0 1 1 2 1l0 0z m588 65l0 0c0 0 1 0 1 0 17-10 34-21 50-32 16-12 31-25 46-38 74-69 127-160 148-262 2-6-2-12-9-13-1 0-1 0-2 0l0 0-100 1c-5 0-10 4-11 9-3 13-8 26-12 38-5 12-10 25-17 36-31 61-78 113-137 150-5 3-6 8-5 13l0 0 31 92c2 6 9 9 15 7 1 0 2-1 2-1l0 0z m244-535l0 0c0 0 0 0 0 0-4-20-9-39-15-57-7-19-14-37-22-55-44-92-114-170-205-221-6-3-13-1-16 4 0 1-1 2-1 2l0 0-30 94c-2 6 1 12 6 14 11 7 22 15 32 23 11 9 21 18 30 27 49 48 84 109 101 176 2 5 6 8 11 8l0 0 98-1c6 0 11-5 11-11 0-1 0-2 0-3l0 0z m-438-395l0 0c0 0 0 0 0 0-20-2-40-3-60-3-20 0-40 1-59 4-102 12-198 54-276 125-5 4-5 11 0 16 0 0 1 1 1 1l0 0 81 58c5 3 12 2 16-2 10-8 20-16 32-23 11-7 22-14 34-20 62-31 131-45 200-41 6 0 10-3 12-8l0 0 29-92c2-6-1-12-7-14-1-1-2-1-3-1l0 0z" horiz-adv-x="1000" />
@ -60,10 +72,14 @@
<glyph glyph-name="menu" unicode="&#xf0c9;" d="M857 100v-71q0-15-10-25t-26-11h-785q-15 0-25 11t-11 25v71q0 15 11 25t25 11h785q15 0 26-11t10-25z m0 286v-72q0-14-10-25t-26-10h-785q-15 0-25 10t-11 25v72q0 14 11 25t25 10h785q15 0 26-10t10-25z m0 285v-71q0-14-10-25t-26-11h-785q-15 0-25 11t-11 25v71q0 15 11 26t25 10h785q15 0 26-10t10-26z" horiz-adv-x="857.1" /> <glyph glyph-name="menu" unicode="&#xf0c9;" d="M857 100v-71q0-15-10-25t-26-11h-785q-15 0-25 11t-11 25v71q0 15 11 25t25 11h785q15 0 26-11t10-25z m0 286v-72q0-14-10-25t-26-10h-785q-15 0-25 10t-11 25v72q0 14 11 25t25 10h785q15 0 26-10t10-25z m0 285v-71q0-14-10-25t-26-11h-785q-15 0-25 11t-11 25v71q0 15 11 26t25 10h785q15 0 26-10t10-26z" horiz-adv-x="857.1" />
<glyph glyph-name="googleplus" unicode="&#xf0d5;" d="M802 341q0-117-49-207t-138-142-206-51q-83 0-159 32t-131 87-87 131-32 159 32 159 87 131 131 87 159 32q160 0 274-107l-111-107q-65 63-163 63-69 0-127-34t-92-94-34-130 34-130 92-94 127-34q46 0 85 13t64 32 44 43 27 47 12 41h-232v141h386q7-36 7-68z m484 68v-118h-117v-116h-117v116h-117v118h117v116h117v-116h117z" horiz-adv-x="1285.7" />
<glyph glyph-name="sort" unicode="&#xf0dc;" d="M571 243q0-15-10-25l-250-250q-11-11-25-11t-25 11l-250 250q-11 10-11 25t11 25 25 11h500q14 0 25-11t10-25z m0 214q0-14-10-25t-25-11h-500q-15 0-25 11t-11 25 11 25l250 250q10 11 25 11t25-11l250-250q10-10 10-25z" horiz-adv-x="571.4" /> <glyph glyph-name="sort" unicode="&#xf0dc;" d="M571 243q0-15-10-25l-250-250q-11-11-25-11t-25 11l-250 250q-11 10-11 25t11 25 25 11h500q14 0 25-11t10-25z m0 214q0-14-10-25t-25-11h-500q-15 0-25 11t-11 25 11 25l250 250q10 11 25 11t25-11l250-250q10-10 10-25z" horiz-adv-x="571.4" />
<glyph glyph-name="linkedin" unicode="&#xf0e1;" d="M195 501v-553h-184v553h184z m12 171q0-41-29-68t-75-27h-1q-46 0-74 27t-28 68q0 41 29 68t75 27 74-27 29-68z m650-407v-317h-183v296q0 59-23 92t-71 33q-35 0-58-19t-36-48q-6-17-6-45v-309h-184q1 223 1 361t0 165l-1 27h184v-80h-1q11 18 23 31t31 29 49 24 64 9q95 0 153-63t58-186z" horiz-adv-x="857.1" />
<glyph glyph-name="download-cloud" unicode="&#xf0ed;" d="M714 332q0 8-5 13t-13 5h-125v196q0 8-5 13t-12 5h-108q-7 0-12-5t-5-13v-196h-125q-8 0-13-5t-5-13q0-8 5-13l196-196q5-5 13-5t13 5l196 196q5 6 5 13z m357-125q0-89-62-151t-152-63h-607q-103 0-177 73t-73 177q0 72 39 134t105 92q-1 17-1 24 0 118 84 202t202 84q87 0 159-49t105-129q40 35 93 35 59 0 101-42t42-101q0-43-23-77 72-17 119-76t46-133z" horiz-adv-x="1071.4" />
<glyph glyph-name="upload-cloud" unicode="&#xf0ee;" d="M714 368q0 8-5 13l-196 196q-5 5-13 5t-13-5l-196-196q-5-6-5-13 0-8 5-13t13-5h125v-196q0-8 5-13t12-5h108q7 0 12 5t5 13v196h125q8 0 13 5t5 13z m357-161q0-89-62-151t-152-63h-607q-103 0-177 73t-73 177q0 72 39 134t105 92q-1 17-1 24 0 118 84 202t202 84q87 0 159-49t105-129q40 35 93 35 59 0 101-42t42-101q0-43-23-77 72-17 119-76t46-133z" horiz-adv-x="1071.4" />
<glyph glyph-name="code" unicode="&#xf121;" d="M344 69l-28-28q-5-5-12-5t-13 5l-260 261q-6 5-6 12t6 13l260 260q5 6 13 6t12-6l28-28q6-5 6-13t-6-12l-219-220 219-219q6-6 6-13t-6-13z m330 596l-208-721q-2-7-9-11t-13-1l-34 9q-8 3-11 9t-2 14l209 720q2 8 8 11t13 2l35-10q7-2 11-9t1-13z m367-363l-260-261q-6-5-13-5t-13 5l-28 28q-5 6-5 13t5 13l219 219-219 220q-5 5-5 12t5 13l28 28q6 6 13 6t13-6l260-260q5-5 5-13t-5-12z" horiz-adv-x="1071.4" /> <glyph glyph-name="code" unicode="&#xf121;" d="M344 69l-28-28q-5-5-12-5t-13 5l-260 261q-6 5-6 12t6 13l260 260q5 6 13 6t12-6l28-28q6-5 6-13t-6-12l-219-220 219-219q6-6 6-13t-6-13z m330 596l-208-721q-2-7-9-11t-13-1l-34 9q-8 3-11 9t-2 14l209 720q2 8 8 11t13 2l35-10q7-2 11-9t1-13z m367-363l-260-261q-6-5-13-5t-13 5l-28 28q-5 6-5 13t5 13l219 219-219 220q-5 5-5 12t5 13l28 28q6 6 13 6t13-6l260-260q5-5 5-13t-5-12z" horiz-adv-x="1071.4" />
<glyph glyph-name="youtube" unicode="&#xf167;" d="M542 156v-118q0-37-22-37-13 0-25 12v168q12 12 25 12 22 0 22-37z m189-1v-25h-51v25q0 38 25 38t26-38z m-540 122h60v52h-174v-52h59v-318h55v318z m161-318h50v276h-50v-211q-17-23-32-23-10 0-11 11-1 2-1 20v203h-50v-218q0-28 5-41 7-21 32-21 27 0 57 34v-30z m240 83v110q0 41-5 55-10 31-40 31-28 0-52-30v121h-50v-370h50v27q25-31 52-31 30 0 40 31 5 15 5 56z m188 6v7h-51q0-29-1-34-4-20-22-20-26 0-26 38v49h100v57q0 44-15 65-22 28-59 28-38 0-60-28-15-21-15-65v-96q0-44 16-65 22-29 60-29 40 0 60 30 10 15 12 30 1 5 1 33z m-339 509v117q0 39-24 39t-24-39v-117q0-39 24-39t24 39z m401-419q0-131-14-195-8-33-33-56t-57-25q-102-12-309-12t-310 12q-32 3-57 25t-32 56q-15 62-15 195 0 131 15 195 7 33 32 56t57 26q103 11 310 11t309-11q33-4 58-26t32-56q14-62 14-195z m-557 712h57l-67-223v-151h-56v151q-8 42-34 119-21 57-37 104h60l39-147z m207-186v-97q0-46-16-66-21-29-59-29-37 0-59 29-15 21-15 66v97q0 45 15 66 22 28 59 28 38 0 59-28 16-21 16-66z m187 91v-279h-51v31q-30-35-58-35-25 0-33 21-4 13-4 42v220h51v-205q0-19 0-20 2-12 12-12 15 0 32 24v213h51z" horiz-adv-x="857.1" /> <glyph glyph-name="youtube" unicode="&#xf167;" d="M542 156v-118q0-37-22-37-13 0-25 12v168q12 12 25 12 22 0 22-37z m189-1v-25h-51v25q0 38 25 38t26-38z m-540 122h60v52h-174v-52h59v-318h55v318z m161-318h50v276h-50v-211q-17-23-32-23-10 0-11 11-1 2-1 20v203h-50v-218q0-28 5-41 7-21 32-21 27 0 57 34v-30z m240 83v110q0 41-5 55-10 31-40 31-28 0-52-30v121h-50v-370h50v27q25-31 52-31 30 0 40 31 5 15 5 56z m188 6v7h-51q0-29-1-34-4-20-22-20-26 0-26 38v49h100v57q0 44-15 65-22 28-59 28-38 0-60-28-15-21-15-65v-96q0-44 16-65 22-29 60-29 40 0 60 30 10 15 12 30 1 5 1 33z m-339 509v117q0 39-24 39t-24-39v-117q0-39 24-39t24 39z m401-419q0-131-14-195-8-33-33-56t-57-25q-102-12-309-12t-310 12q-32 3-57 25t-32 56q-15 62-15 195 0 131 15 195 7 33 32 56t57 26q103 11 310 11t309-11q33-4 58-26t32-56q14-62 14-195z m-557 712h57l-67-223v-151h-56v151q-8 42-34 119-21 57-37 104h60l39-147z m207-186v-97q0-46-16-66-21-29-59-29-37 0-59 29-15 21-15 66v97q0 45 15 66 22 28 59 28 38 0 59-28 16-21 16-66z m187 91v-279h-51v31q-30-35-58-35-25 0-33 21-4 13-4 42v220h51v-205q0-19 0-20 2-12 12-12 15 0 32 24v213h51z" horiz-adv-x="857.1" />

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +1,4 @@
[ [
"css/zwiico.min.css", "css/zwiico.css",
"init.css" "init.css"
] ]

View File

@ -37,7 +37,7 @@ class blog extends common {
public static $users = []; public static $users = [];
const BLOG_VERSION = '1.4'; const BLOG_VERSION = '1.7';
/** /**
* Édition * Édition
@ -52,6 +52,8 @@ class blog extends common {
// Crée l'article // Crée l'article
$this->setData(['module', $this->getUrl(0), $articleId, [ $this->setData(['module', $this->getUrl(0), $articleId, [
'closeComment' => $this->getInput('blogAddCloseComment', helper::FILTER_BOOLEAN), 'closeComment' => $this->getInput('blogAddCloseComment', helper::FILTER_BOOLEAN),
'mailNotification' => $this->getInput('blogEditMailNotification', helper::FILTER_BOOLEAN),
'groupNotification' => $this->getInput('blogEditGroupNotification', helper::FILTER_INT),
'comment' => [], 'comment' => [],
'content' => $this->getInput('blogAddContent', null), 'content' => $this->getInput('blogAddContent', null),
'picture' => $this->getInput('blogAddPicture', helper::FILTER_STRING_SHORT, true), 'picture' => $this->getInput('blogAddPicture', helper::FILTER_STRING_SHORT, true),
@ -258,6 +260,8 @@ class blog extends common {
} }
$this->setData(['module', $this->getUrl(0), $articleId, [ $this->setData(['module', $this->getUrl(0), $articleId, [
'closeComment' => $this->getInput('blogEditCloseComment'), 'closeComment' => $this->getInput('blogEditCloseComment'),
'mailNotification' => $this->getInput('blogEditMailNotification', helper::FILTER_BOOLEAN),
'groupNotification' => $this->getInput('blogEditGroupNotification', helper::FILTER_INT),
'comment' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'comment']), 'comment' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'comment']),
'content' => $this->getInput('blogEditContent', null), 'content' => $this->getInput('blogEditContent', null),
'picture' => $this->getInput('blogEditPicture', helper::FILTER_STRING_SHORT, true), 'picture' => $this->getInput('blogEditPicture', helper::FILTER_STRING_SHORT, true),
@ -333,12 +337,42 @@ class blog extends common {
'createdOn' => time(), 'createdOn' => time(),
'userId' => $this->getInput('blogArticleUserId'), 'userId' => $this->getInput('blogArticleUserId'),
]]); ]]);
// Valeurs en sortie
$this->addOutput([ // Envoi d'une notification aux administrateurs
'redirect' => helper::baseUrl() . $this->getUrl() . '#comment', // Init tableau
'notification' => 'Commentaire ajouté', $to = [];
'state' => true // Liste des destinataires
]); foreach($this->getData(['user']) as $userId => $user) {
if ($user['group'] >= $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'groupNotification']) ) {
$to[] = $user['mail'];
}
}
// Envoi du mail $sent code d'erreur ou de réusssite
if ($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'mailNotification']) === true) {
$sent = $this->sendMail(
$to,
'Nouveau commentaire',
'Bonjour' . ' <strong>' . $user['firstname'] . ' ' . $user['lastname'] . '</strong>,<br><br>' .
'Nouveau commentaire déposé sur la page "' . $this->getData(['page', $this->getUrl(0), 'title']) . '" :<br><br>'
);
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl() . '#comment',
//'notification' => 'Commentaire ajouté',
//'state' => true
'notification' => ($sent === true ? 'Commentaire ajouté et une notification envoyée' : 'Commentaire ajouté, erreur de notification : <br/>' . $sent),
'state' => ($sent === true ? true : null)
]);
} else {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl() . '#comment',
'notification' => 'Commentaire ajouté',
'state' => true
]);
}
} }
// Ids des commentaires par ordre de publication // Ids des commentaires par ordre de publication
$commentIds = array_keys(helper::arrayCollumn($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'comment']), 'createdOn', 'SORT_DESC')); $commentIds = array_keys(helper::arrayCollumn($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'comment']), 'createdOn', 'SORT_DESC'));

View File

@ -10,6 +10,18 @@
* @link http://zwiicms.com/ * @link http://zwiicms.com/
*/ */
// Lien de connexion
$("#blogEditMailNotification").on("change", function() {
if($(this).is(":checked")) {
$("#formConfigGroup").show();
}
else {
$("#formConfigGroup").hide();
}
}).trigger("change");
/** /**
* Soumission du formulaire pour enregistrer en brouillon * Soumission du formulaire pour enregistrer en brouillon
*/ */

View File

@ -78,6 +78,14 @@
<?php echo template::checkbox('blogEditCloseComment', true, 'Fermer les commentaires', [ <?php echo template::checkbox('blogEditCloseComment', true, 'Fermer les commentaires', [
'checked' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'closeComment']) 'checked' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'closeComment'])
]); ?> ]); ?>
<?php echo template::checkbox('blogEditMailNotification', true, 'Notifier quand un commentaire est déposé :', [
'checked' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'mailNotification'])
]); ?>
<?php echo template::select('blogEditGroupNotification', $module::$groupNews, [
'label' => '',
'selected' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'groupNotification']),
'help' => 'Editeurs = éditeurs + administrateurs<br/> Membres = membres + éditeurs + administrateurs'
]); ?>
</div> </div>
</div> </div>
</div> </div>

View File

@ -329,7 +329,7 @@ class form extends common {
$to = []; $to = [];
if ($group > 0){ if ($group > 0){
foreach($this->getData(['user']) as $userId => $user) { foreach($this->getData(['user']) as $userId => $user) {
if($user['group'] === $group) { if($user['group'] >= $group) {
$to[] = $user['mail']; $to[] = $user['mail'];
} }
} }

View File

@ -96,8 +96,9 @@
<div class="row"> <div class="row">
<div class="col6 offset1"> <div class="col6 offset1">
<?php echo template::select('formConfigGroup', $groupMembers, [ <?php echo template::select('formConfigGroup', $groupMembers, [
'label' => 'Un groupe de membres :', 'label' => 'Les groupes hiérarchiques à partir du groupe :',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'group']) 'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'group']),
'help' => 'Editeurs = éditeurs + administrateurs<br/> Membres = membres + éditeurs + administrateurs'
]); ?> ]); ?>
</div> </div>
</div> </div>

View File

@ -1,3 +1,3 @@
# Bloque l'accès aux sauvegardes # Bloque l'accès aux sauvegardes
Order deny,allow Order deny,allow
Deny from all Deny from all

View File

@ -7,4 +7,4 @@
<Files .htaccess> <Files .htaccess>
Order deny,allow Order deny,allow
Deny from all Deny from all
</Files> </Files>

View File

@ -1,5 +1,3 @@
# Bloque l'accès htaccess # Bloque l'accès aux sauvegardes
<Files .htaccess> Order deny,allow
Order deny,allow Deny from all
Deny from all
</Files>