Astuces Forumactif
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
Membres connectés récemment
Voir tous les membres

[PHPBB2] Personnaliser le bouton "j'aime"

Voir le sujet précédent Voir le sujet suivant Aller en bas

Ombi
Ombi
https://vieminimaliste.forumactif.com/

MessageOmbi Jeu 29 Avr 2021 - 9:09

  • Version du forum :
    PHPBB2
  • Templates modifiés :
    oui
  • Navigateur :
    Chrome
Coucou Philippe,

Je reviens vers toi car j'ai activé le bouton j'aime sur mon fofo donc j'ai l'onglet par défaut de forumactif et j'aurais souhaité aboutir à ce rendu [PHPBB2] Personnaliser le bouton "j'aime" Captur32 [PHPBB2] Personnaliser le bouton "j'aime" Captur33 merci  [PHPBB2] Personnaliser le bouton "j'aime" 1f60a 

Très belle journée ^^


Dernière édition par Ombi le Jeu 29 Avr 2021 - 11:00, édité 1 fois

Milouze14 aime ce message

Milouze14
Milouze14
Fondateur

https://www.milouze14.net/

MessageMilouze14 Jeu 29 Avr 2021 - 9:40

Coucou Ombi,
il va falloir intervenir dans le template, mais avant tout pourrais tu me donner les couleurs de fond et de police afin que je procède aux tests.

Édit: tu as activé juste le bouton "J'aime "?
Ombi
Ombi
https://vieminimaliste.forumactif.com/

MessageOmbi Jeu 29 Avr 2021 - 10:01

Coucou Philippe,

Oui j'ai juste activé le bouton  clin oeil

Voici le template :


Pour les codes couleurs :

Fond foncé => #756363

Fond vert => #B2CF84

Police en blanc et pour la famille, je partirais sur du 'Lora', serif ;-)

Un grand merci Philippe clin oeil


Dernière édition par Ombi le Jeu 29 Avr 2021 - 11:00, édité 1 fois
Milouze14
Milouze14
Fondateur

https://www.milouze14.net/

MessageMilouze14 Jeu 29 Avr 2021 - 10:18

Alors pour les modifications dans le template:

Dans le template viewtopic_body:
Affichage/Templates/Général/viewtopic_body

Recherches ceci:
Code:

<!-- BEGIN switch_likes_active -->
            <tr><td colspan="2">
               <div class="fa_like_div">
                  <!-- BEGIN switch_like_list -->
                  {postrow.displayed.switch_likes_active.switch_like_list.D_LIKE_LIST}
                  <!-- END switch_like_list -->
                  <!-- BEGIN switch_dislike_list -->
                  {postrow.displayed.switch_likes_active.switch_dislike_list.D_DISLIKE_LIST}
                  <!-- END switch_dislike_list -->
               <button class="rep-button {postrow.displayed.switch_likes_active.C_VOTE_LIKE}"  data-href="{postrow.displayed.switch_likes_active.U_VOTE_LIKE}" data-href-rm="{postrow.displayed.switch_likes_active.U_VOTE_RM_LIKE}">
                  <svg width="15px" height="15px" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M320 1344q0-26-19-45t-45-19q-27 0-45.5 19t-18.5 45q0 27 18.5 45.5t45.5 18.5q26 0 45-18.5t19-45.5zm160-512v640q0 26-19 45t-45 19h-288q-26 0-45-19t-19-45v-640q0-26 19-45t45-19h288q26 0 45 19t19 45zm1184 0q0 86-55 149 15 44 15 76 3 76-43 137 17 56 0 117-15 57-54 94 9 112-49 181-64 76-197 78h-129q-66 0-144-15.5t-121.5-29-120.5-39.5q-123-43-158-44-26-1-45-19.5t-19-44.5v-641q0-25 18-43.5t43-20.5q24-2 76-59t101-121q68-87 101-120 18-18 31-48t17.5-48.5 13.5-60.5q7-39 12.5-61t19.5-52 34-50q19-19 45-19 46 0 82.5 10.5t60 26 40 40.5 24 45 12 50 5 45 .5 39q0 38-9.5 76t-19 60-27.5 56q-3 6-10 18t-11 22-8 24h277q78 0 135 57t57 135z" fill="#666"/></svg>
                  <span>{postrow.displayed.switch_likes_active.L_LIKE}</span>{postrow.displayed.switch_likes_active.COUNT_VOTE_LIKE}
               </button>
               <!-- BEGIN switch_dislike_button -->
               <button class="rep-button {postrow.displayed.switch_likes_active.switch_dislike_button.C_VOTE_DISLIKE}" data-href="{postrow.displayed.switch_likes_active.switch_dislike_button.U_VOTE_DISLIKE}" data-href-rm="{postrow.displayed.switch_likes_active.switch_dislike_button.U_VOTE_RM_LIKE}">
                  <svg width="15px" height="15px" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M320 576q0 26-19 45t-45 19q-27 0-45.5-19t-18.5-45q0-27 18.5-45.5t45.5-18.5q26 0 45 18.5t19 45.5zm160 512v-640q0-26-19-45t-45-19h-288q-26 0-45 19t-19 45v640q0 26 19 45t45 19h288q26 0 45-19t19-45zm1129-149q55 61 55 149-1 78-57.5 135t-134.5 57h-277q4 14 8 24t11 22 10 18q18 37 27 57t19 58.5 10 76.5q0 24-.5 39t-5 45-12 50-24 45-40 40.5-60 26-82.5 10.5q-26 0-45-19-20-20-34-50t-19.5-52-12.5-61q-9-42-13.5-60.5t-17.5-48.5-31-48q-33-33-101-120-49-64-101-121t-76-59q-25-2-43-20.5t-18-43.5v-641q0-26 19-44.5t45-19.5q35-1 158-44 77-26 120.5-39.5t121.5-29 144-15.5h129q133 2 197 78 58 69 49 181 39 37 54 94 17 61 0 117 46 61 43 137 0 32-15 76z" fill="#666"/></svg>
                  <span>{postrow.displayed.switch_likes_active.switch_dislike_button.L_DISLIKE}</span>{postrow.displayed.switch_likes_active.switch_dislike_button.COUNT_VOTE_DISLIKE}
               </button>
               <!-- END switch_dislike_button -->
            </div></td></tr>
            <!-- END switch_likes_active -->



Supprimes et remplaces par:
Code:


<!-- BEGIN switch_likes_active -->
            <tr><td colspan="2">
               <div class="fa_like_div">
                  
               <button class="rep-button {postrow.displayed.switch_likes_active.C_VOTE_LIKE}"  data-href="{postrow.displayed.switch_likes_active.U_VOTE_LIKE}" data-href-rm="{postrow.displayed.switch_likes_active.U_VOTE_RM_LIKE}">
                  <svg width="15px" height="15px" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M320 1344q0-26-19-45t-45-19q-27 0-45.5 19t-18.5 45q0 27 18.5 45.5t45.5 18.5q26 0 45-18.5t19-45.5zm160-512v640q0 26-19 45t-45 19h-288q-26 0-45-19t-19-45v-640q0-26 19-45t45-19h288q26 0 45 19t19 45zm1184 0q0 86-55 149 15 44 15 76 3 76-43 137 17 56 0 117-15 57-54 94 9 112-49 181-64 76-197 78h-129q-66 0-144-15.5t-121.5-29-120.5-39.5q-123-43-158-44-26-1-45-19.5t-19-44.5v-641q0-25 18-43.5t43-20.5q24-2 76-59t101-121q68-87 101-120 18-18 31-48t17.5-48.5 13.5-60.5q7-39 12.5-61t19.5-52 34-50q19-19 45-19 46 0 82.5 10.5t60 26 40 40.5 24 45 12 50 5 45 .5 39q0 38-9.5 76t-19 60-27.5 56q-3 6-10 18t-11 22-8 24h277q78 0 135 57t57 135z" fill="#666"/></svg>
                  <span>{postrow.displayed.switch_likes_active.L_LIKE}</span>{postrow.displayed.switch_likes_active.COUNT_VOTE_LIKE}
               </button>
               <!-- BEGIN switch_dislike_button -->
               <button class="rep-button {postrow.displayed.switch_likes_active.switch_dislike_button.C_VOTE_DISLIKE}" data-href="{postrow.displayed.switch_likes_active.switch_dislike_button.U_VOTE_DISLIKE}" data-href-rm="{postrow.displayed.switch_likes_active.switch_dislike_button.U_VOTE_RM_LIKE}">
                  <svg width="15px" height="15px" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M320 576q0 26-19 45t-45 19q-27 0-45.5-19t-18.5-45q0-27 18.5-45.5t45.5-18.5q26 0 45 18.5t19 45.5zm160 512v-640q0-26-19-45t-45-19h-288q-26 0-45 19t-19 45v640q0 26 19 45t45 19h288q26 0 45-19t19-45zm1129-149q55 61 55 149-1 78-57.5 135t-134.5 57h-277q4 14 8 24t11 22 10 18q18 37 27 57t19 58.5 10 76.5q0 24-.5 39t-5 45-12 50-24 45-40 40.5-60 26-82.5 10.5q-26 0-45-19-20-20-34-50t-19.5-52-12.5-61q-9-42-13.5-60.5t-17.5-48.5-31-48q-33-33-101-120-49-64-101-121t-76-59q-25-2-43-20.5t-18-43.5v-641q0-26 19-44.5t45-19.5q35-1 158-44 77-26 120.5-39.5t121.5-29 144-15.5h129q133 2 197 78 58 69 49 181 39 37 54 94 17 61 0 117 46 61 43 137 0 32-15 76z" fill="#666"/></svg>
                  <span>{postrow.displayed.switch_likes_active.switch_dislike_button.L_DISLIKE}</span>{postrow.displayed.switch_likes_active.switch_dislike_button.COUNT_VOTE_DISLIKE}
               </button>
               <!-- END switch_dislike_button -->
                                          <!-- BEGIN switch_like_list -->
                  {postrow.displayed.switch_likes_active.switch_like_list.D_LIKE_LIST}
                  <!-- END switch_like_list -->
                  <!-- BEGIN switch_dislike_list -->
                  {postrow.displayed.switch_likes_active.switch_dislike_list.D_DISLIKE_LIST}
                  <!-- END switch_dislike_list -->
            </div></td></tr>
            <!-- END switch_likes_active -->




Penses a enregistrer puis à valider en cliquant respectivement sur Enregistr puis Ajout


Je parlais de la couleur de police pas le font style Ombi MdR1 .
Mais on peut l'ajouter .
Par contre ce sera des bordures à la place du fond,
mais tu ne verras pas trop de différence clin oeil .

La css est commentée est optimisée par tes choix de couleurs:


Dans la feuille de style:
Affichage/Images et Couleurs/Couleurs/Feuille de style

Ajouter ceci:

Code:


/*Les boutons j aime*/
.rep-button, .rep-button:active, .rep-button:focus {
    background: none;
    background-color: rgba(0, 0, 0, 0);
    /*background-color: #2c353b;*/
    border: none;
    border-radius: 3px;
    color: #fff!important;
    cursor: pointer;
    display:block;
    font-family: 'Lora', serif ;
    font-size:13px;
    margin: 6px 6px 0 0;
    outline: none;
    padding: 5px 11px;
    position: relative;
  box-shadow:none!important;
}
/*Le bouton j aime remercie*/
.rep-button.fa_liked
{
    background-color: #756363;
  border: 6px solid #B2CF84;
}
/*Le pouce j 'aime remercie*/
.rep-button.fa_liked path{fill:orange!important;}
/*Le bouton j aime non remercie*/
.rep-button.fa_like
{
 background-color: #666;
  border: 6px solid #B2CF84;
}
/*Le pouce j 'aime non remercie*/
.rep-button.fa_like path{fill:#ccc!important;}



Penser a cliquer sur le bouton [PHPBB2] Personnaliser le bouton "j'aime" Sans_t10

Ombi
Ombi
https://vieminimaliste.forumactif.com/

MessageOmbi Jeu 29 Avr 2021 - 10:59

Re coucou Philippe ahhhhh super j'aime beaucoup le rendu merci beaucoup super

Très belle journée fr4

Milouze14
Milouze14
Fondateur

https://www.milouze14.net/

MessageMilouze14 Jeu 29 Avr 2021 - 11:29

De rien Ombi hinhin ,
Très belle journée à toi aussi.


Hello


Sujet résolu et déplacé dans le forum adéquate

A bientôt pour une prochaine demande clin oeil

Voir le sujet précédent Voir le sujet suivant Revenir en haut

Créer un compte ou se connecter pour répondre

Vous devez être membre pour répondre.

S'enregistrer

Rejoignez notre communauté ! C'est facile !


S'enregistrer

Connexion

Vous êtes déjà membre ? Aucun soucis, cliquez ici pour vous connecter.


Connexion

 
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum