• Resolved tabasko

    (@tabasko)


    Bonjour,

    Je n’arrive pas à mettre le popup tarteaucitron de “middle” à “bottom” !

    J’ai installé la dernière version du tarteaucitron.
    et j’ai aussi ceci dans mon functions.php (de mon Divi-Child theme)

    <?php
    
    function my_et_enqueue_styles() {
    	wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    	wp_enqueue_script( 'divi', get_stylesheet_directory_uri() . '/js/scripts.js', array( 'jquery', 'divi-custom-script' ), '0.1.1', true );
    }
    add_action( 'wp_enqueue_scripts', 'my_et_enqueue_styles' );
    
    /* === Add your own functions below this line ===
     * -------------------------------------------- */
    
    /**
     * Initialize tarteaucitron
     */
    function tarteaucitron_init() {
        ?>
        <script src="<?= get_stylesheet_directory_uri() ?>/lib/tarteaucitron/tarteaucitron.js"></script>
        <script type="text/javascript">
    tarteaucitron.init({
    "privacyUrl": "",
    "hashtag": "#tarteaucitron", /* L'identifiant permettant l'ouverture du bloc de Tarteaucitron. Laisser tel quel */
    "cookieName": "tarteaucitron", /* Nom du script que nous avons définit à la ligne 3 de la fonction précédente */
    "orientation": "bottom", /* La position de la bannière. Soit en haut soit en bas (top - bottom) */
    "showAlertSmall": true, /* Show the small banner on bottom right */
    "showAlertBig": true, /* Show the small banner on bottom right */
    "cookieslist": true, /* affiche la liste des cookies */
    "adblocker": false, /* affiche une alerte si un adblocker est présent */
    "AcceptAllCta" : true, /* Show the accept all button when highPrivacy on */
    "highPrivacy": true, /* désactive le consentement automatique */
    "handleBrowserDNTRequest": false, /* If Do Not Track == 1, disallow all */
    "removeCredit": true, /* supprime le lien de crédit */
    "moreInfoLink": true, /* affiche un lien "en savoir plus" */
    "useExternalCss": false, /* tel quel, le css de tarteaucitron.css sera chargé */
    "readmoreLink": "/cookiespolicy" /* définit le lien "en savoir plus" */
    			});
        </script>
        <?php
    }
    add_action('wp_head', 'tarteaucitron_init');
    
    /**
     * Add GOOGLE TAG MANAGER and other services using tarteaucitron
     */
    function add_tarteaucitron_services()
    {
    ?>
        <script type="text/javascript">
            tarteaucitron.user.googletagmanagerId = 'UA-XXXXXXXXXXX-1';
            (tarteaucitron.job = tarteaucitron.job || []).push('googletagmanager');
        </script>
    <?
    }
    add_action('wp_footer', 'add_tarteaucitron_services');
    
    ?>

    De ce que je comprends c’est ceci qui détermine la position :
    "orientation": "bottom"

    Du coup je me tourne vers vous pour savoir ce que je fais mal.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author AmauriC

    (@amauric)

    Avec le plugin les réglages sont a faire depuis https://tarteaucitron.io/fr/pro/, il n’y a rien à ajouter dans le functions.php 😉

    Thread Starter tabasko

    (@tabasko)

    Il n’y a rien à faire à part prendre la version pro en somme ?
    J’ai réussi à le customisé en CSS, mais pour le positionnement, y’a rien à faire.

    Donc dans la version gratuite, ça reste en popup ?

    Merci pour votre retour super rapide ! Impressionnant 🙂

    Plugin Author AmauriC

    (@amauric)

    Toute les options sont dispo en version gratuite.

    Désactivez simplement le plugin si vous voulez installer tarteaucitron via le functions.php

    Thread Starter tabasko

    (@tabasko)

    Je pensais que ça fonctionnait conjointement, car lorsque je désactive le plugin, alors je n’ai plus tarteaucitron (ce qui confirme en vrai que les scripts dans functions.php ne sont pas fonctionnels !)

    Il manque les “enqueue” vers les JS tarteaucitron ?
    J’suis pas calé en php du tout

    Ou alors c’est ceci qui est pas correct :
    <script src="<?= get_stylesheet_directory_uri() ?>/lib/tarteaucitron/tarteaucitron.js"></script>

    • This reply was modified 1 year, 7 months ago by tabasko.
    Plugin Author AmauriC

    (@amauric)

    Il manque les fichiers dans /Divi-Child/lib/

    Ils sont téléchargeables ici: https://github.com/AmauriC/tarteaucitron.js/archive/refs/heads/master.zip 😉

    Thread Starter tabasko

    (@tabasko)

    Une fois dézippé j’ai un répertoire tarteaucitron.js-master
    je le renomme lib et je le place dans mon /Divi-Child?

    Plutôt créer et renommer : /lib/tarteaucitron/ ?

    https://snipboard.io/8tnuZq.jpg

    J’ai l’impression que ça fonctionne comme désiré maintenant !
    J’ai désactivé le plugin et tout semble rouler.

    Un grand merci pour votre support Amauri !!!

    • This reply was modified 1 year, 7 months ago by tabasko.
    • This reply was modified 1 year, 7 months ago by tabasko.
    • This reply was modified 1 year, 7 months ago by tabasko.
    Plugin Author AmauriC

    (@amauric)

    Super, content que ce soit réglé : D

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Impossible à mettre en bas :)’ is closed to new replies.