Milouze14
Fondateur

![[PHPBB2] Afficher une couleur de fond pour chaque catégorie Empty](https://2img.net/i/empty.gif) | Sujet: [PHPBB2] Afficher une couleur de fond pour chaque catégorie Dim 31 Déc 2017 - 18:42 | |
|  , l'astuce consiste a mettre une balise span avec un style de couleur à chaque catégorie dans votre P.A. A partir de là on va coloriser chaque catégorie  . Pour les couleurs, vous avez une palette de choix: http://www.code-couleur.com/Il est impératif de séparer les catégories sur l'index (quelque soit le mode choisi): Affichage/ Page d'acceuil/ Structure et hiérarchie/ Niveau de compression de l'indexSéparer les catégories sur l'index : L'aperçu imagé sur l'index: ![[PHPBB2] Afficher une couleur de fond pour chaque catégorie 186](https://i.servimg.com/u/f62/11/26/21/37/186.jpg) L'aperçu sur la liste des sujets: ![[PHPBB2] Afficher une couleur de fond pour chaque catégorie 232](https://i.servimg.com/u/f62/11/26/21/37/232.jpg) L'aperçu sur un sujet: Général/ Catégories et Forums/ Catégories et Forums/ La catégorie en questionÉditez chaque catégorie Exemple avec la catégorie "Premiere catégorie". Elle sera donc : Changer le "black" par la couleur désirée. - Code:
-
<span class="M14_Cat"style="color:black">Premiere catégorie</span> Pensez a cliquer sur  . Attention la css est assez conséquente les ami(e)s , il n'y en a pas  . Modules/ HTML JAVASCRIPT/ Gestion des codes JavascriptCréer un nouveau javascriptMettre un titre explicite.Cochez sur l'index, les sous forums et les sujetsDéposez ceci: - Code:
-
$(function(){ $('.secondarytitle h2 span.M14_Cat').each(function(){ var M14_colorCat=$(this).css('color'); $(this).closest('table').find('th').css('background-image','none'); $(this).closest('table').find('th').css('backgroundColor',M14_colorCat); $(this).closest('table').find('th,.secondarytitle h2 span.M14_Cat').css('color','white'); $(this).closest('table').css('borderColor',M14_colorCat); }); $('.bodyline').each(function(){ var M14_colorListe=$(this).find('td.nav .M14_Cat').css('color'); var M14_colorAriane=$(this).find('td.nav a.nav, div.nav a.nav').css('color'); $(this).find('td.nav a.nav,td.nav .M14_Cat,div.nav a.nav,div.nav .M14_Cat').css('color',M14_colorAriane); $('.forumline th,.catHead,.catBottom').css('background-image','none'); $('.forumline th,.catHead,.catBottom').css('backgroundColor',M14_colorListe); $('.forumline .secondarytitle h2,.forumline th,.cattitle,.catBottom .gensmall,.catBottom .nav ,.catBottom a[href] ,.catBottom .M14_Cat').css('color','white'); $('.forumline').css('borderColor',M14_colorListe); });
});
Pensez a cliquer sur le bouton Valider
Dernière édition par Milouze14 le Lun 29 Nov 2021 - 6:52, édité 2 fois | |
|
Invité Invité

![[PHPBB2] Afficher une couleur de fond pour chaque catégorie Empty](https://2img.net/i/empty.gif) | Sujet: Re: [PHPBB2] Afficher une couleur de fond pour chaque catégorie Mer 10 Jan 2018 - 18:00 | |
| |
|
Benjamin.d
Milouzien

![[PHPBB2] Afficher une couleur de fond pour chaque catégorie Empty](https://2img.net/i/empty.gif) | Sujet: Re: [PHPBB2] Afficher une couleur de fond pour chaque catégorie Jeu 25 Jan 2018 - 19:37 | |
| | |
|
damieng59
Milouzien

![[PHPBB2] Afficher une couleur de fond pour chaque catégorie Empty](https://2img.net/i/empty.gif) | Sujet: Re: [PHPBB2] Afficher une couleur de fond pour chaque catégorie Ven 26 Jan 2018 - 3:58 | |
| | |
|
EslamLove
Milouzien

![[PHPBB2] Afficher une couleur de fond pour chaque catégorie Empty](https://2img.net/i/empty.gif) | Sujet: Re: [PHPBB2] Afficher une couleur de fond pour chaque catégorie Ven 27 Avr 2018 - 19:18 | |
| | |
|
dragon594
Milouzien

![[PHPBB2] Afficher une couleur de fond pour chaque catégorie Empty](https://2img.net/i/empty.gif) | Sujet: Re: [PHPBB2] Afficher une couleur de fond pour chaque catégorie Mer 13 Juin 2018 - 23:15 | |
| | |
|
hamesashek
Milouzien

![[PHPBB2] Afficher une couleur de fond pour chaque catégorie Empty](https://2img.net/i/empty.gif) | Sujet: Re: [PHPBB2] Afficher une couleur de fond pour chaque catégorie Sam 4 Aoû 2018 - 5:31 | |
| | |
|
ThunderTB
Milouzien

![[PHPBB2] Afficher une couleur de fond pour chaque catégorie Empty](https://2img.net/i/empty.gif) | Sujet: Re: [PHPBB2] Afficher une couleur de fond pour chaque catégorie Jeu 23 Aoû 2018 - 20:34 | |
| | |
|
kristhyane
Milouzien

![[PHPBB2] Afficher une couleur de fond pour chaque catégorie Empty](https://2img.net/i/empty.gif) | Sujet: Re: [PHPBB2] Afficher une couleur de fond pour chaque catégorie Lun 26 Nov 2018 - 11:54 | |
| | |
|
Ptite_Perle
Milouzien

![[PHPBB2] Afficher une couleur de fond pour chaque catégorie Empty](https://2img.net/i/empty.gif) | Sujet: Re: [PHPBB2] Afficher une couleur de fond pour chaque catégorie Dim 7 Avr 2019 - 14:55 | |
| | |
|
Ambroise
Milouzien

![[PHPBB2] Afficher une couleur de fond pour chaque catégorie Empty](https://2img.net/i/empty.gif) | Sujet: Re: [PHPBB2] Afficher une couleur de fond pour chaque catégorie Dim 7 Avr 2019 - 18:25 | |
| | |
|
.Volubal.
Milouzien

![[PHPBB2] Afficher une couleur de fond pour chaque catégorie Empty](https://2img.net/i/empty.gif) | Sujet: Re: [PHPBB2] Afficher une couleur de fond pour chaque catégorie Mar 9 Avr 2019 - 20:38 | |
| | |
|
ThunderTB
Milouzien

![[PHPBB2] Afficher une couleur de fond pour chaque catégorie Empty](https://2img.net/i/empty.gif) | Sujet: Re: [PHPBB2] Afficher une couleur de fond pour chaque catégorie Dim 26 Mai 2019 - 1:15 | |
| | |
|
Contenu sponsorisé
![[PHPBB2] Afficher une couleur de fond pour chaque catégorie Empty](https://2img.net/i/empty.gif) | Sujet: Re: [PHPBB2] Afficher une couleur de fond pour chaque catégorie ![[PHPBB2] Afficher une couleur de fond pour chaque catégorie Empty](https://2img.net/i/empty.gif) | |
| |
|