From c09dc5058eccbb28a56e404e8e0e77dbcc4e6784 Mon Sep 17 00:00:00 2001 From: RealET <real3t@gmail.com> Date: Sat, 1 May 2021 12:41:11 +0200 Subject: [PATCH] =?UTF-8?q?[Mode=20Cognac]=20Les=20tuiles=20de=20la=20page?= =?UTF-8?q?=20d'accueil=20peuvent=20avoir=20une=20taille=20par=20d=C3=A9fa?= =?UTF-8?q?ut=20parmi=20:=20*=20automatique=20selon=20proportion=20(ancien?= =?UTF-8?q?=20comportement)=20*=201=20colonne=20*=202=20colonnes=20*=203?= =?UTF-8?q?=20colonnes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base/soyezcreateurs.php | 17 +++++++------ formulaires/configurer_soyezcreateurs.html | 11 +++++++++ lang/soyezcreateursprive_fr.php | 7 ++++++ ...sommaire_modeportailcognac_quoideneuf.html | 24 +++++++++---------- 4 files changed, 38 insertions(+), 21 deletions(-) diff --git a/base/soyezcreateurs.php b/base/soyezcreateurs.php index 9e686698..0e79c188 100644 --- a/base/soyezcreateurs.php +++ b/base/soyezcreateurs.php @@ -20,23 +20,22 @@ function soyezcreateurs_declarer_champs_extras($champs = array()) { if (!isset($champs['spip_articles']) or !is_array($champs['spip_articles'])) { $champs['spip_articles'] = array(); } - + $champs['spip_articles']['formatquoi2neuf'] = array( 'saisie' => 'selection', 'options' => array( 'nom' => 'formatquoi2neuf', - 'label' => 'Largeur tuiles accueil', - 'explication' => 'Largeur d\'affichage des images de la zone ALaUne/Agenda/Quoi de neuf du mode Cognac', + 'label' => _T('soyezcreateursprive:cfg_taille_blocs_quoi2neuf_label'), + 'explication' => _T('soyezcreateursprive:cfg_taille_blocs_quoi2neuf_explication'), 'data' => array( - 0 => 'Automatique en fonction des proportions de l\'image (défaut)', - 1 => '1 colonne', - 2 => '2 colonnes', - 3 => '3 colonnes', + 0 => _T('soyezcreateursprive:cfg_taille_blocs_quoi2neuf_defaut'), + 1 => _T('soyezcreateursprive:cfg_taille_blocs_quoi2neuf_1col'), + 2 => _T('soyezcreateursprive:cfg_taille_blocs_quoi2neuf_2col'), + 3 => _T('soyezcreateursprive:cfg_taille_blocs_quoi2neuf_3col'), ), - 'defaut' => '0', + 'defaut' => 0, 'cacher_option_intro' => 'on', 'sql' => 'ENUM(\'0\',\'1\',\'2\',\'3\') NOT NULL DEFAULT \'0\'', - 'rechercher_ponderation' => '2', 'versionner' => 'on', ), 'verifier' => array( diff --git a/formulaires/configurer_soyezcreateurs.html b/formulaires/configurer_soyezcreateurs.html index cea33381..8a631ef5 100755 --- a/formulaires/configurer_soyezcreateurs.html +++ b/formulaires/configurer_soyezcreateurs.html @@ -76,6 +76,17 @@ if (!function_exists('sc_ouinon_default')) { }, defaut=full} )] + [(#SAISIE{radio,taille_blocs_quoi2neuf, + label=<:soyezcreateursprive:cfg_taille_blocs_quoi2neuf_label:>, + data=#ARRAY{ + 0,<:soyezcreateursprive:cfg_taille_blocs_quoi2neuf_automatique:>, + 1,<:soyezcreateursprive:cfg_taille_blocs_quoi2neuf_1col:>, + 2,<:soyezcreateursprive:cfg_taille_blocs_quoi2neuf_2col:>, + 3,<:soyezcreateursprive:cfg_taille_blocs_quoi2neuf_3col:>, + }, + defaut=0, + explication=<:soyezcreateursprive:cfg_taille_blocs_quoi2neuf_explication:>} + )] [(#SAISIE{radio,variante_blocprojet, label=<:soyezcreateursprive:cfg_variante_blocprojet_label:>, data=#ARRAY{ diff --git a/lang/soyezcreateursprive_fr.php b/lang/soyezcreateursprive_fr.php index 7b87b96b..3da1fd49 100644 --- a/lang/soyezcreateursprive_fr.php +++ b/lang/soyezcreateursprive_fr.php @@ -314,6 +314,13 @@ $GLOBALS[$GLOBALS['idx_lang']] = array( 'cfg_sousmenulocaux_ex' => 'Modifie le menu principal pour éventuellement ne pas faire apparaître les sous-rubriques, sauf pour la branche en cours', 'cfg_sousmenulocaux_label' => 'Affichage des sous-rubriques dans le menu principal', 'cfg_systematiquement' => 'Systématiquement', + 'cfg_taille_blocs_quoi2neuf_1col' => '1 colonne', + 'cfg_taille_blocs_quoi2neuf_2col' => '2 colonnes', + 'cfg_taille_blocs_quoi2neuf_3col' => '3 colonnes', + 'cfg_taille_blocs_quoi2neuf_automatique' => 'Automatique en fonction des proportions de l’image', + 'cfg_taille_blocs_quoi2neuf_defaut' => 'Largeur de la configuration de SoyezCréateurs', + 'cfg_taille_blocs_quoi2neuf_explication' => 'Largeur d’affichage des images de la zone ALaUne/Quoi de neuf du mode Cognac', + 'cfg_taille_blocs_quoi2neuf_label' => 'Largeur tuiles accueil', 'cfg_taille_logocontenuprincipal' => 'Taille maximum des logos placés à côté des titres d’une page (article, rubrique, site…)', 'cfg_taille_logos_alaune_blog' => 'Taille maximum des logos à la une en mode blog', 'cfg_taille_logos_derniers_art_blog' => 'Taille maximum des logos des derniers articles en mode blog', diff --git a/noisettes/sommaire/sommaire_modeportailcognac_quoideneuf.html b/noisettes/sommaire/sommaire_modeportailcognac_quoideneuf.html index 1aa67bdd..1b9aa0fa 100644 --- a/noisettes/sommaire/sommaire_modeportailcognac_quoideneuf.html +++ b/noisettes/sommaire/sommaire_modeportailcognac_quoideneuf.html @@ -19,7 +19,7 @@ #SET{blocouvert,oui}] <BOUCLE_articles_recentsAlaUne(ARTICLES){lang}{!par #CONFIG{soyezcreateurs/ordre_quoideneuf,date_modif}}{0,(#CONFIG{soyezcreateurs/nombres_alanune,4})}{doublons}{titre_mot=AlaUne}> [(#SET{logo,[(#LOGO_ARTICLE_SURVOL|sinon{#LOGO_ARTICLE_NORMAL}|sinon{#LOGO_RUBRIQUE_NORMAL}|sinon{[(#CHEMIN{images/placeholder.jpg}|image_focus{308,#CONFIG{soyezcreateurs/hauteur_quoi2neuf,340}})]})]})] - [(#FORMATQUOI2NEUF|non) + [(#FORMATQUOI2NEUF|=={0}|?{#CONFIG{soyezcreateurs/taille_blocs_quoi2neuf,0},#FORMATQUOI2NEUF}|non) [(#SET{largeur,[(#GET{logo}|largeur|sinon{1})]})] [(#SET{hauteur,[(#GET{logo}|hauteur|sinon{1})]})] [(#SET{ratio,[(#GET{largeur}|div{#GET{hauteur}})]})] @@ -27,9 +27,9 @@ [(#GET{ratio}|>{1.8764}|?{#SET{facteur,2}#SET{largeur,638}})] [(#GET{ratio}|>{2.8088}|?{#SET{facteur,3}#SET{largeur,969}})] ] - [(#FORMATQUOI2NEUF|=={1}|?{#SET{facteur,''}#SET{largeur,308}})] - [(#FORMATQUOI2NEUF|=={2}|?{#SET{facteur,2}#SET{largeur,638}})] - [(#FORMATQUOI2NEUF|=={3}|?{#SET{facteur,3}#SET{largeur,969}})] + [(#FORMATQUOI2NEUF|=={0}|?{#CONFIG{soyezcreateurs/taille_blocs_quoi2neuf,0},#FORMATQUOI2NEUF}|=={1}|?{#SET{facteur,''}#SET{largeur,308}})] + [(#FORMATQUOI2NEUF|=={0}|?{#CONFIG{soyezcreateurs/taille_blocs_quoi2neuf,0},#FORMATQUOI2NEUF}|=={2}|?{#SET{facteur,2}#SET{largeur,638}})] + [(#FORMATQUOI2NEUF|=={0}|?{#CONFIG{soyezcreateurs/taille_blocs_quoi2neuf,0},#FORMATQUOI2NEUF}|=={3}|?{#SET{facteur,3}#SET{largeur,969}})] <div class="grid-item[ grid-item-x(#GET{facteur})]"> <div class="content-actus alaune #EDIT{titre}<BOUCLE_RubriqueColoreealaune(HIERARCHIE){id_rubrique}{tout}{type_mot=_CouleurRubrique}{inverse} {0,1}><BOUCLE_CouleurRubriquealaune(MOTS){id_rubrique}{type=_CouleurRubrique}{0,1}> couleurrubrique#ID_MOT</BOUCLE_CouleurRubriquealaune></BOUCLE_RubriqueColoreealaune>"> <a href="#URL_ARTICLE"[ title="(#DESCRIPTIF|attribut_html)"]> @@ -57,7 +57,7 @@ #SET{blocouvert,oui}] <BOUCLE_Breves(BREVES){!par date}{age<120}{lang}> [(#SET{logo,[(#LOGO_BREVE_SURVOL|sinon{#LOGO_BREVE_NORMAL}|sinon{#LOGO_RUBRIQUE_NORMAL}|sinon{[(#CHEMIN{images/placeholder.jpg}|image_focus{308,#CONFIG{soyezcreateurs/hauteur_quoi2neuf,340}})]})]})] - [(#FORMATQUOI2NEUF|non) + [(#FORMATQUOI2NEUF|=={0}|?{#CONFIG{soyezcreateurs/taille_blocs_quoi2neuf,0},#FORMATQUOI2NEUF}|non) [(#SET{largeur,[(#GET{logo}|largeur|sinon{1})]})] [(#SET{hauteur,[(#GET{logo}|hauteur|sinon{1})]})] [(#SET{ratio,[(#GET{largeur}|div{#GET{hauteur}})]})] @@ -65,9 +65,9 @@ [(#GET{ratio}|>{1.8764}|?{#SET{facteur,2}#SET{largeur,638}})] [(#GET{ratio}|>{2.8088}|?{#SET{facteur,3}#SET{largeur,969}})] ] - [(#FORMATQUOI2NEUF|=={1}|?{#SET{facteur,''}#SET{largeur,308}})] - [(#FORMATQUOI2NEUF|=={2}|?{#SET{facteur,2}#SET{largeur,638}})] - [(#FORMATQUOI2NEUF|=={3}|?{#SET{facteur,3}#SET{largeur,969}})] + [(#FORMATQUOI2NEUF|=={0}|?{#CONFIG{soyezcreateurs/taille_blocs_quoi2neuf,0},#FORMATQUOI2NEUF}|=={1}|?{#SET{facteur,''}#SET{largeur,308}})] + [(#FORMATQUOI2NEUF|=={0}|?{#CONFIG{soyezcreateurs/taille_blocs_quoi2neuf,0},#FORMATQUOI2NEUF}|=={2}|?{#SET{facteur,2}#SET{largeur,638}})] + [(#FORMATQUOI2NEUF|=={0}|?{#CONFIG{soyezcreateurs/taille_blocs_quoi2neuf,0},#FORMATQUOI2NEUF}|=={3}|?{#SET{facteur,3}#SET{largeur,969}})] <div class="grid-item[ grid-item-x(#GET{facteur})]"> <div class="content-actus alaune #EDIT{titre}<BOUCLE_RubriqueColoreeBreve(HIERARCHIE){id_rubrique}{tout}{type_mot=_CouleurRubrique}{inverse} {0,1}><BOUCLE_CouleurRubriqueBreve(MOTS){id_rubrique}{type=_CouleurRubrique}{0,1}> couleurrubrique#ID_MOT</BOUCLE_CouleurRubriqueBreve></BOUCLE_RubriqueColoreeBreve>"> <a href="#URL_BREVE"[ title="(#DESCRIPTIF|attribut_html)"]> @@ -159,7 +159,7 @@ #SET{blocouvert,oui}] <BOUCLE_articles_QuoideNeuf(ARTICLES) {!par #CONFIG{soyezcreateurs/ordre_quoideneuf,date_modif}}{0,(#CONFIG{soyezcreateurs/nombres_quoideneuf,5})}{doublons}{lang}> [(#SET{logo,[(#LOGO_ARTICLE_SURVOL|sinon{#LOGO_ARTICLE_NORMAL}|sinon{#LOGO_RUBRIQUE_NORMAL}|sinon{[(#CHEMIN{images/placeholder.jpg}|image_focus{308,#CONFIG{soyezcreateurs/hauteur_quoi2neuf,340}})]})]})] - [(#FORMATQUOI2NEUF|non) + [(#FORMATQUOI2NEUF|=={0}|?{#CONFIG{soyezcreateurs/taille_blocs_quoi2neuf,0},#FORMATQUOI2NEUF}|non) [(#SET{largeur,[(#GET{logo}|largeur|sinon{1})]})] [(#SET{hauteur,[(#GET{logo}|hauteur|sinon{1})]})] [(#SET{ratio,[(#GET{largeur}|div{#GET{hauteur}})]})] @@ -167,9 +167,9 @@ [(#GET{ratio}|>{1.8764}|?{#SET{facteur,2}#SET{largeur,638}})] [(#GET{ratio}|>{2.8088}|?{#SET{facteur,3}#SET{largeur,969}})] ] - [(#FORMATQUOI2NEUF|=={1}|?{#SET{facteur,''}#SET{largeur,308}})] - [(#FORMATQUOI2NEUF|=={2}|?{#SET{facteur,2}#SET{largeur,638}})] - [(#FORMATQUOI2NEUF|=={3}|?{#SET{facteur,3}#SET{largeur,969}})] + [(#FORMATQUOI2NEUF|=={0}|?{#CONFIG{soyezcreateurs/taille_blocs_quoi2neuf,0},#FORMATQUOI2NEUF}|=={1}|?{#SET{facteur,''}#SET{largeur,308}})] + [(#FORMATQUOI2NEUF|=={0}|?{#CONFIG{soyezcreateurs/taille_blocs_quoi2neuf,0},#FORMATQUOI2NEUF}|=={2}|?{#SET{facteur,2}#SET{largeur,638}})] + [(#FORMATQUOI2NEUF|=={0}|?{#CONFIG{soyezcreateurs/taille_blocs_quoi2neuf,0},#FORMATQUOI2NEUF}|=={3}|?{#SET{facteur,3}#SET{largeur,969}})] <div class="grid-item[ grid-item-x(#GET{facteur})]"> <div class="content-actus quoideneuf #EDIT{titre}<BOUCLE_RubriqueColoree(HIERARCHIE){id_rubrique}{tout}{type_mot=_CouleurRubrique}{inverse} {0,1}><BOUCLE_CouleurRubrique(MOTS){id_rubrique}{type=_CouleurRubrique}{0,1}> couleurrubrique#ID_MOT</BOUCLE_CouleurRubrique></BOUCLE_RubriqueColoree>"> <a href="#URL_ARTICLE"[ title="(#DESCRIPTIF|supprimer_tags|attribut_html)"]> -- GitLab