Merge branch '8.3.13'

This commit is contained in:
fredtempez 2018-09-09 11:47:24 +02:00
commit c4db6ca600
17 changed files with 118 additions and 166 deletions

View File

@ -1,10 +1,11 @@
# Cache le PHPSESSID de l'url
# Cache le PHPSESSID de l'url
SetEnv SESSION_USE_TRANS_SID 0
# Bloque l'accès à la liste des fichiers
Options -Indexes
# Attention, surtout ne rien modifier ci-dessous !
<<<<<<< HEAD
# URL rewriting
<ifModule mod_rewrite.c>
RewriteEngine on
@ -13,3 +14,6 @@ Options -Indexes
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L]
</ifModule>
=======
# URL rewriting
>>>>>>> 8.3.13

View File

@ -1,5 +1,13 @@
# ChangeLog
Préversion 8.3.13 :
* Modifications :
- Bannière "responsive", nouvelles options de positionnement
- Bouton Edit dans Blog
- Options de position des menus selon la position de la bannière
- Mise à jour TinyMCE
## version 8.3.12 :
* Modification :
- bouton de retour dans la page d'un article de blog

View File

@ -24,7 +24,7 @@ class common {
const GROUP_MEMBER = 1;
const GROUP_MODERATOR = 2;
const GROUP_ADMIN = 3;
const ZWII_VERSION = '8.3.12';
const ZWII_VERSION = '8.3.13';
public static $actions = [];
public static $coreModuleIds = [
@ -325,9 +325,8 @@ class common {
'textColor' => 'rgba(33, 34, 35, 1)',
'textHide' => false,
'textTransform' => 'none',
// Menu Image
'linkHome' => 'false'
// Menu Image
'linkHome' => 'false',
'imageContainer' => 'auto'
],
'link' => [
'textColor' => 'rgba(74, 105, 189, 1)'
@ -862,6 +861,13 @@ class common {
$this->setData(['core', 'dataVersion', 826]);
$this->SaveData();
}
// Version 8.3.13
if($this->getData(['core', 'dataVersion']) < 8313) {
$this->setData(['theme','header','imageContainer','auto']);
$this->setData(['core', 'dataVersion', 8313]);
$this->SaveData();
}
}
}
@ -970,7 +976,11 @@ class core extends common {
$css .= 'header{margin:20px 20px 0 20px}';
}
}
$css .= 'header{background-size:' . $this->getData(['theme','header','imageContainer']).'}';
$css .= 'header{background-color:' . $colors['normal'] . ';height:' . $this->getData(['theme', 'header', 'height']) . ';line-height:' . $this->getData(['theme', 'header', 'height']) . ';text-align:' . $this->getData(['theme', 'header', 'textAlign']) . '}';
// Modif CrowueWeb pour la bannière
$css .= '@media (max-width: 767px) {header{height:' . $this->getData(['theme', 'header', 'height'])/2 . 'px;line-height:' . $this->getData(['theme', 'header', 'height'])/2 . 'px;}}';
// Fin modif Croque Web
if($themeHeaderImage = $this->getData(['theme', 'header', 'image'])) {
$css .= 'header{background-image:url("../file/source/' . $themeHeaderImage . '");background-position:' . $this->getData(['theme', 'header', 'imagePosition']) . ';background-repeat:' . $this->getData(['theme', 'header', 'imageRepeat']) . '}';
}

View File

@ -286,6 +286,9 @@ body > header {
}
header {
position: relative;
margin:0;
padding:0;
}
header span {
display: inline-block;

View File

@ -123,15 +123,20 @@ class theme extends common {
'20px 15px' => 'Grande',
'25px 15px' => 'Très grande'
];
public static $menuPositions = [
'hide' => 'Caché',
public static $menuPositionsSite = [
'site-first' => 'Dans le site avant la bannière',
'site-second' => 'Dans le site après la bannière',
'body-top' => 'Au-dessus et en-dehors du site',
'body-first' => 'Au dessus du site avant la bannière',
'body-second' => 'Au dessus du site après la bannière'
'body-top' => 'Au-dessus et en-dehors du site',
'hide' => 'Caché'
];
public static $menuPositionsBody = [
'body-first' => 'Au dessus du site avant la bannière',
'body-second' => 'Au dessus du site après la bannière',
'body-top' => 'Au-dessus et en-dehors du site',
'hide' => 'Caché'
];
public static $radius = [
'0' => 'Aucun',
'5px' => 'Très léger',
@ -181,6 +186,14 @@ class theme extends common {
'container-large' => 'sur la largeur de la page'
];
public static $headerWide = [
'auto' => 'Automatique',
'contain' => 'Image entière',
'cover' => 'Largeur adaptée au fond',
'100% 100%' => 'Taille adaptée au fond'
];
/**
* Mode avancé
*/
@ -292,11 +305,11 @@ class theme extends common {
'textAlign' => $this->getInput('themeHeaderTextAlign'),
'textColor' => $this->getInput('themeHeaderTextColor'),
'textHide' => $this->getInput('themeHeaderTextHide', helper::FILTER_BOOLEAN),
'textTransform' => $this->getInput('themeHeaderTextTransform'),
// Menu Image
'linkHome' => $this->getInput('themeHeaderlinkHome',helper::FILTER_BOOLEAN)
// Menu Image
'textTransform' => $this->getInput('themeHeaderTextTransform'),
'linkHome' => $this->getInput('themeHeaderlinkHome',helper::FILTER_BOOLEAN),
'imageContainer' => $this->getInput('themeHeaderImageContainer')
]]);
// Valeurs en sortie
$this->addOutput([
'notification' => 'Modifications enregistrées',

View File

@ -16,9 +16,13 @@
$("input, select").on("change", function() {
// Import des polices de caractères
var headerFont = $("#themeHeaderFont").val();
var css = "@import url('https://fonts.googleapis.com/css?family=" + headerFont + "');";
// Adaptation aux média
css += "@media (max-width: 767px) {header{height:" + $("#themeHeaderHeight").val() + "/2;line-height:" + $("#themeHeaderHeight").val() + "/2;}}";
// Couleurs, image, alignement et hauteur de la bannière
css += "header{background-color:" + $("#themeHeaderBackgroundColor").val() + ";text-align:" + $("#themeHeaderTextAlign").val() + ";height:" + $("#themeHeaderHeight").val() + ";line-height:" + $("#themeHeaderHeight").val() + "}";
var themeHeaderImage = $("#themeHeaderImage").val();
if(themeHeaderImage) {
css += "header{background-image:url('<?php echo helper::baseUrl(false); ?>site/file/source/" + themeHeaderImage + "');background-repeat:" + $("#themeHeaderImageRepeat").val() + ";background-position:" + $("#themeHeaderImagePosition").val() + "}";
@ -26,6 +30,8 @@ $("input, select").on("change", function() {
else {
css += "header{background-image:none}";
}
// Adaptation de la bannière
css += "header{background-size:" + $("#themeHeaderImageContainer").val() + "}";
// Taille, couleur, épaisseur et capitalisation du titre de la bannière
css += "header span{color:" + $("#themeHeaderTextColor").val() + ";font-family:'" + headerFont.replace(/\+/g, " ") + "',sans-serif;font-weight:" + $("#themeHeaderFontWeight").val() + ";font-size:" + $("#themeHeaderFontSize").val() + ";text-transform:" + $("#themeHeaderTextTransform").val() + "}";
// Cache le titre de la bannière

View File

@ -57,9 +57,19 @@
]); ?>
</div>
</div>
<?php echo template::checkbox('themeHeaderTextHide', true, 'Cacher le titre du site', [
'checked' => $this->getData(['theme', 'header', 'textHide'])
]); ?>
<div class="row">
<div class="col6">
<?php echo template::checkbox('themeHeaderTextHide', true, 'Cacher le titre du site', [
'checked' => $this->getData(['theme', 'header', 'textHide'])
]); ?>
</div>
<div class="col6">
<?php echo template::select('themeHeaderImageContainer', $module::$headerWide, [
'label' => 'Taille',
'selected' => $this->getData(['theme', 'header', 'imageContainer'])
]); ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -66,10 +66,18 @@
<h4>Configuration</h4>
<div class="row">
<div class="col4">
<?php echo template::select('themeMenuPosition', $module::$menuPositions, [
<?php
if ( $this->getData(['theme', 'header', 'position']) == "site")
{ echo template::select('themeMenuPosition', $module::$menuPositionsSite, [
'label' => 'Position',
'selected' => $this->getData(['theme', 'menu', 'position'])
]); ?>
]);
}else{
echo template::select('themeMenuPosition', $module::$menuPositionsBody, [
'label' => 'Position',
'selected' => $this->getData(['theme', 'menu', 'position'])
]); }
?>
</div>
<div class="col4">
<?php echo template::select('themeMenuHeight', $module::$menuHeights, [

View File

@ -31,6 +31,8 @@ tinymce.init({
extended_valid_elements: "script[language|type|src]",
// Bloque le dimensionnement des médias (car automatiquement en fullsize avec fitvids pour le responsive)
media_dimensions: false,
// Désactiver la dimension des images
// image_dimensions: false,
// Active l'onglet avancé lors de l'ajout d'une image
image_advtab: true,
// Urls absolues

View File

@ -10,4 +10,12 @@
}
#blogArticleOr {
padding: 10px;
}
}
/* Modif CroqueWeb */
@media (max-width: 767px) {
#blogArticlePicture {
height:150px;
max-width: 100%;}
}
/* fin modif croqueweb */

View File

@ -91,9 +91,30 @@
<?php endforeach; ?>
</div>
</div>
<?php if($this->getUser('group') >= self::GROUP_ADMIN): ?>
<div class="row">
<div class="col5">
<div class="col4">
</div>
<div class="col2">
<?php echo template::button('blogBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->getUrl(0),
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
<div class="col2">
<?php echo template::button('blogEdit', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . '/blog/edit/' . $this->getUrl(1),
'value' => 'Editer'
]); ?>
</div>
<div class="col4">
</div>
</div>
<?php else: ?>
<div class="row">
<div class="col2">
<?php echo template::button('blogBack', [
'class' => 'buttonGrey',
@ -102,7 +123,8 @@
'value' => 'Retour'
]); ?>
</div>
<div class="col5">
<div class="col10">
</div>
</div>
<?php echo $module::$pages; ?>
<?php endif; ?>
<?php echo $module::$pages; ?>

View File

@ -1,72 +0,0 @@
<?php
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @license GNU General Public License, version 3
* @link http://zwiicms.com/
*/
class inclusion extends common {
public static $actions = [
'config' => self::GROUP_MODERATOR,
'index' => self::GROUP_VISITOR
];
/**
* Configuration
*/
public function config() {
// Soumission du formulaire
if($this->isPost()) {
$this->setData(['module', $this->getUrl(0), 'url', $this->getInput('inclusionConfigUrl', helper::FILTER_URL, true)]);
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(),
'notification' => 'Modifications enregistrées',
'state' => true
]);
}
// Valeurs en sortie
$this->addOutput([
'title' => 'Configuration du module',
'view' => 'config'
]);
}
/**
* Accueil
*/
public function index() {
// Message si l'utilisateur peut éditer la page
if(
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
AND $this->getUser('group') >= self::GROUP_MODERATOR
AND $this->getUrl(1) !== 'force'
) {
// Valeurs en sortie
$this->addOutput([
'display' => self::DISPLAY_LAYOUT_BLANK,
'title' => '',
'view' => 'index'
]);
}
// Sinon inclusion
else {
// Incrémente le compteur de clics
$this->setData(['module', $this->getUrl(0), 'count', helper::filter($this->getData(['module', $this->getUrl(0), 'count']) + 1, helper::FILTER_INT)]);
// Valeurs en sortie
$this->addOutput([
'content' => '<iframe src="' . helper::baseUrl(false) . 'site/file/source/' . $this->getData(['module', $this->getUrl(0), 'url']) . '"></iframe>' ,
'state' => true
]);
}
}
}

View File

@ -1,37 +0,0 @@
<?php echo template::formOpen('inclusionConfig'); ?>
<div class="row">
<div class="col2">
<?php echo template::button('inclusionConfigBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(0),
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
<div class="col2 offset8">
<?php echo template::submit('inclusionConfigSubmit'); ?>
</div>
</div>
<div class="row">
<div class="col6">
<div class="block">
<h4>inclusion</h4>
<?php echo template::file('inclusionConfigUrl', [
'label' => 'Lien d\'inclusion',
'placeholder' => helper::baseUrl() . 'site/file/source/',
'value' => $this->getData(['module', $this->getUrl(0), 'url'])
]); ?>
</div>
</div>
<div class="col6">
<div class="block">
<h4>Statistiques</h4>
<?php echo template::text('inclusionConfigCount', [
'disabled' => true,
'label' => 'Nombre de redirections',
'value' => helper::filter($this->getData(['module', $this->getUrl(0), 'count']), helper::FILTER_INT)
]); ?>
</div>
</div>
</div>
<?php echo template::formClose(); ?>

View File

@ -1,32 +0,0 @@
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @license GNU General Public License, version 3
* @link http://zwiicms.com/
*
*
**/
if (document.referrer.indexOf("edit") === -1)
{
core.confirm(
"Souhaitez-vous accéder à l'interface de modification de la page ? En cas de refus, vous serez redirigé vers l'URL saisie dans le module de redirection.",
function() {
$(location).attr("href", "<?php echo helper::baseUrl(); ?>page/edit/<?php echo $this->getUrl(0); ?>");
},
function() {
$(location).attr("href", "<?php echo helper::baseUrl() . $this->getUrl(); ?>/force");
}
);
}
else
{
$(location).attr("href", "<?php echo helper::baseUrl(); ?>");
}

View File

@ -1 +0,0 @@
<!-- Page vide avec un commentaire pour ne pas afficher d'erreur 404 -->

View File

@ -1 +1 @@
/*db413798705aa289e2ec19cf556e4f78*/@import url("https://fonts.googleapis.com/css?family=Open+Sans|Oswald|Oswald");body{background-color:rgba(236,239,241,1);font-family:"Open Sans",sans-serif}a{color:rgba(74,105,189,1)}a:hover{color:rgba(59,90,174,1)}body,.row > div{font-size:14px}body,.block h4,input[type='email'],input[type='text'],input[type='password'],.inputFile,select,textarea,.inputFile,.button.buttonGrey,.button.buttonGrey:hover{color:rgba(33, 34, 35, 1)}.container{max-width:1170px}#site{background-color:rgba(255, 255, 255, 1);border-radius:0;box-shadow:0 #212223}.speechBubble,.button,.button:hover,button[type='submit'],.pagination a,.pagination a:hover,input[type='checkbox']:checked + label:before,input[type='radio']:checked + label:before,.helpContent{background-color:rgba(74,105,189,1);color:white}.helpButton span{color:rgba(74,105,189,1)}input[type='text']:hover,input[type='password']:hover,.inputFile:hover,select:hover,textarea:hover{border-color:rgba(74,105,189,1)}.speechBubble:before{border-color:rgba(74,105,189,1) transparent transparent transparent}.button:hover,button[type='submit']:hover,.pagination a:hover,input[type='checkbox']:not(:active):checked:hover + label:before,input[type='checkbox']:active + label:before,input[type='radio']:checked:hover + label:before,input[type='radio']:not(:checked):active + label:before{background-color:rgba(59,90,174,1)}.helpButton span:hover{color:rgba(59,90,174,1)}.button:active,button[type='submit']:active,.pagination a:active{background-color:rgba(54,85,169,1)}h1,h2,h3,h4,h5,h6{color:rgba(74,105,189,1);font-family:"Oswald",sans-serif;font-weight:normal;text-transform:none}header{background-color:rgba(255,255,255,1);height:150px;line-height:150px;text-align:center}header span{color:rgba(33,34,35,1);font-family:"Oswald",sans-serif;font-weight:normal;font-size:2em;text-transform:none}nav,nav a{background-color:rgba(74,105,189,1)}nav a,#toggle span,nav a:hover{color:rgba(255, 255, 255, 1)}nav a:hover{background-color:rgba(59,90,174,1)}nav a.active{background-color:rgba(54,85,169,1)}#menu{text-align:left}#toggle span,#menu a{padding:15px 10px;font-weight:normal;font-size:1em;text-transform:none}footer{background-color:rgba(255,255,255,1);color:rgba(33, 34, 35, 1)}footer a{color:rgba(33, 34, 35, 1)}footer .container > div{margin:10px 0}#footerSocials{text-align:center}#footerText{text-align:center}#footerCopyright{text-align:center}
/*d1bbb044f9097442bfb4526883c52f2c*/@import url("https://fonts.googleapis.com/css?family=Open+Sans|Oswald|Oswald");body{background-color:rgba(236,239,241,1);font-family:"Open Sans",sans-serif}a{color:rgba(74,105,189,1)}a:hover{color:rgba(59,90,174,1)}body,.row > div{font-size:14px}body,.block h4,input[type='email'],input[type='text'],input[type='password'],.inputFile,select,textarea,.inputFile,.button.buttonGrey,.button.buttonGrey:hover{color:rgba(33, 34, 35, 1)}.container{max-width:1170px}#site{background-color:rgba(255, 255, 255, 1);border-radius:0;box-shadow:0 #212223}.speechBubble,.button,.button:hover,button[type='submit'],.pagination a,.pagination a:hover,input[type='checkbox']:checked + label:before,input[type='radio']:checked + label:before,.helpContent{background-color:rgba(74,105,189,1);color:white}.helpButton span{color:rgba(74,105,189,1)}input[type='text']:hover,input[type='password']:hover,.inputFile:hover,select:hover,textarea:hover{border-color:rgba(74,105,189,1)}.speechBubble:before{border-color:rgba(74,105,189,1) transparent transparent transparent}.button:hover,button[type='submit']:hover,.pagination a:hover,input[type='checkbox']:not(:active):checked:hover + label:before,input[type='checkbox']:active + label:before,input[type='radio']:checked:hover + label:before,input[type='radio']:not(:checked):active + label:before{background-color:rgba(59,90,174,1)}.helpButton span:hover{color:rgba(59,90,174,1)}.button:active,button[type='submit']:active,.pagination a:active{background-color:rgba(54,85,169,1)}h1,h2,h3,h4,h5,h6{color:rgba(74,105,189,1);font-family:"Oswald",sans-serif;font-weight:normal;text-transform:none}header{background-size:auto}header{background-color:rgba(255,255,255,1);height:150px;line-height:150px;text-align:center}@media (max-width: 767px) {header{height:75px;line-height:75px;}}header{background-image:url("../file/source/galerie/landscape/desert.jpg");background-position:center center;background-repeat:no-repeat}header span{color:rgba(33,34,35,1);font-family:"Oswald",sans-serif;font-weight:normal;font-size:2em;text-transform:none}nav,nav a{background-color:rgba(74,105,189,1)}nav a,#toggle span,nav a:hover{color:rgba(255, 255, 255, 1)}nav a:hover{background-color:rgba(59,90,174,1)}nav a.active{background-color:rgba(54,85,169,1)}#menu{text-align:left}#toggle span,#menu a{padding:15px 10px;font-weight:normal;font-size:1em;text-transform:none}footer{background-color:rgba(255,255,255,1);color:rgba(33, 34, 35, 1)}footer a{color:rgba(33, 34, 35, 1)}footer .container > div{margin:10px 0}#footerSocials{text-align:center}#footerText{text-align:center}#footerCopyright{text-align:center}

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB