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

[EDGE] Couleur de fond pour les annonces

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

WinaTickets
WinaTickets
https://www.pmturf.com/

MessageWinaTickets Lun 20 Avr 2020 - 5:26

  • Version du forum :
    EDGE
  • Templates modifiés :
    oui
  • Navigateur :
    Chrome
Bonjour 
Serait t'il possible de modifier la couleur de fond pour les annonces 
qui prend toute la surface exemple 

[EDGE] Couleur de fond pour les annonces 2020-017

merci beaucoup 
amicalement serge


Dernière édition par WinaTickets le Lun 20 Avr 2020 - 18:56, édité 2 fois
Milouze14
Milouze14
Fondateur

https://www.milouze14.net/

MessageMilouze14 Lun 20 Avr 2020 - 16:53

Hello Serge,

tu peux tester ceci:

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



Recherches ceci:

Code:

{topics_list_box.row.TOPIC_TYPE}

Supprimes et remplaces par:
Code:

<span class="M14_topic_type">{topics_list_box.row.TOPIC_TYPE}</span>

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


Ensuite le script:


Modules/HTML&JAVASCRIPT/Gestion des codes Javascript/Créer un nouveau Javascript

Mettre un titre explicite.
Cocher sur les sous-forums


Déposer ceci:

Code:

$(function(){
$('span.M14_topic_type strong:contains(Annonce:)').each(function(){
$(this).closest('.posts-section').addClass('Annonce');
});});

Penser a cliquer sur le bouton Valid

Chaque annonce recevra la class "Annonce".



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

Ajouter ceci:

Code:

.posts-section.Annonce
{
 background-color:pink;
}



Penser a cliquer sur le bouton [EDGE] Couleur de fond pour les annonces Sans_t10

Normalement tu dois avoir un fond rose.
Bon je sais ce n'est pas terrible,mais bon changes comme bon te semble la couleur désirée.





WinaTickets
WinaTickets
https://www.pmturf.com/

MessageWinaTickets Lun 20 Avr 2020 - 17:45

Bonjour mon milouze alors j'ai essayé et rien n'y fait regarde :

topic list box: 
Code:
<!-- BEGIN topics_list_box -->
<!-- BEGIN row -->
<!-- BEGIN header_table -->
   <!-- BEGIN multi_selection -->
      <script type="text/javascript">

      function check_uncheck_main_{topics_list_box.row.header_table.BOX_ID}()
      {
         alert('MAIN');

         var all_checked = true;

         for (i = 0; (i < document.{topics_list_box.FORMNAME}.elements.length) && all_checked; i++)
         {
            if (document.{topics_list_box.FORMNAME}.elements[i].name == '{topics_list_box.FIELDNAME}[]{topics_list_box.row.header_table.BOX_ID}')
            {
               all_checked = document.{topics_list_box.FORMNAME}.elements[i].checked;
            }
         }

         document.{topics_list_box.FORMNAME}.all_mark_{topics_list_box.row.header_table.BOX_ID}.checked = all_checked;
      }

      function check_uncheck_all_{topics_list_box.row.header_table.BOX_ID}()
      {
         alert('ALL');

         for (i = 0; i < document.{topics_list_box.FORMNAME}.length; i++)
         {
            if (document.{topics_list_box.FORMNAME}.elements[i].name == '{topics_list_box.FIELDNAME}[]{topics_list_box.row.header_table.BOX_ID}')
            {
               document.{topics_list_box.FORMNAME}.elements[i].checked = document.{topics_list_box.FORMNAME}.all_mark_{topics_list_box.row.header_table.BOX_ID}.checked;
            }
         }
      }

      </script>
   <!-- END multi_selection -->

   <div class="forum-category topicslist announcement">
     <div class="title">
        <!-- BEGIN multi_selection -->
         <input onclick="check_uncheck_all_{topics_list_box.row.header_table.BOX_ID}();" type="checkbox" name="all_mark_{topics_list_box.row.header_table.BOX_ID}" value="0" />
         <!-- END multi_selection -->
         {topics_list_box.row.L_TITLE}
      </div>

<!-- END header_table -->

<!-- BEGIN header_row -->
      <div class="title">{topics_list_box.row.L_TITLE}</div>
<!-- END header_row -->

<!-- BEGIN topic -->

   <!-- BEGIN table_sticky -->
  </div>
   <div class="forum-category topicslist">
     <div class="title">
      <!-- BEGIN multi_selection -->
      <input onclick="check_uncheck_all_{topics_list_box.row.header_table.BOX_ID}();" type="checkbox" name="all_mark_{topics_list_box.row.header_table.BOX_ID}" value="0" />
      <!-- END multi_selection -->
      {topics_list_box.row.topic.table_sticky.L_TITLE}
   </div>
   <!-- END table_sticky -->
    <div class="forum-block color-primary">
      <div class="forum-block-inner">
         <!-- BEGIN single_selection -->
           <span class="merge-box"><input type="radio" name="{topics_list_box.FIELDNAME}" value="{topics_list_box.row.FID}" {topics_list_box.row.L_SELECT} /></span>
           <!-- END single_selection -->

        <div class="forum-status" title="{topics_list_box.row.L_TOPIC_FOLDER_ALT}" style="background-image:url('{topics_list_box.row.TOPIC_FOLDER_IMG}');">
        </div>

        <div class="forum-info" {topics_list_box.row.ICON}>
           <span class="newpost-img">{topics_list_box.row.NEWEST_POST_IMG}</span>
              <span class="participated">{topics_list_box.row.PARTICIPATE_POST_IMG}</span>
             <span class="topic-type"><span class="M14_topic_type">{topics_list_box.row.TOPIC_TYPE}</span></span>
          <h2 class="topic-title">
            <a class="topictitle" href="{topics_list_box.row.U_VIEW_TOPIC}">{topics_list_box.row.TOPIC_TITLE}</a>
          </h2>

              <!-- BEGIN switch_description -->
              <div class="topic-desc">{topics_list_box.row.topic.switch_description.TOPIC_DESCRIPTION}</div>
              <!-- END switch_description -->

             <div class="topic-info">
            {topics_list_box.row.GOTO_PAGE_NEW}
                <span class="topic-author">{topics_list_box.row.L_BY} <strong>{topics_list_box.row.TOPIC_AUTHOR}</strong></span>
                <!-- BEGIN nav_tree -->{topics_list_box.row.TOPIC_NAV_TREE_NEW}<!-- END nav_tree -->
          </div>
        </div>

        <div class="forum-stats">

          <div class="posts">
            <span class="number">{topics_list_box.row.REPLIES}</span><br/>
            <small>{L_REPLIES}</small>
          </div>

          <div class="views">
            <span class="number">{topics_list_box.row.VIEWS}</span><br/>
            <small>{L_VIEWS}</small>
          </div>

        </div>

        <div class="forum-lastpost">
          <!-- BEGIN avatar -->
          <span class="lastpost-avatar">{topics_list_box.row.topic.avatar.LAST_POST_AVATAR}</span>
          <div style="float:left;">
          <!-- END avatar -->
                <span>{topics_list_box.row.LAST_POST_AUTHOR}&nbsp;
               {topics_list_box.row.LAST_POST_IMG}<br style="clear:left;" />{topics_list_box.row.LAST_POST_TIME}</span>
          <!-- BEGIN avatar -->
          </div>
          <!-- END avatar -->

        </div>

           <!-- BEGIN multi_selection -->
           <input onclick="javascript:check_uncheck_main_{topics_list_box.row.BOX_ID}();" type="checkbox" name="{topics_list_box.FIELDNAME}[]{topics_list_box.row.BOX_ID}" value="{topics_list_box.row.FID}" {topics_list_box.row.L_SELECT} />
           <!-- END multi_selection -->

        <div class="clear"></div>
      </div>
    </div>
<!-- END topic -->
<!-- BEGIN no_topics -->
<div class="forum-block">
  <strong>{topics_list_box.row.L_NO_TOPICS}</strong>
</div>
<!-- END no_topics -->

<!-- BEGIN bottom -->
</div>
<!-- END bottom -->
<!-- BEGIN spacer --><br /><!-- END spacer -->
<!-- END row -->
<!-- END topics_list_box -->

java sur les sous forums 
Code:
$(function(){
$('span.M14_topic_type strong:contains(Annonce:)').each(function(){
$(this).closest('.posts-section').addClass('Annonce');
});});

le css :
Code:
/* couleur annonces */
.posts-section.Annonce
{
 background-color:pink;
}

ps: si tu pouvait en jaune ihihhi je suis daltonien je verrai que sa pète lol merci encore
Milouze14
Milouze14
Fondateur

https://www.milouze14.net/

MessageMilouze14 Lun 20 Avr 2020 - 18:05

Pour la couleur, remplaces pink par yellow.
Ce qui deviendra:
Code:
/* couleur annonces */
.posts-section.Annonce
{
background-color:yellow;
}

Merci de mettre le lien de ton forum dans ton profil Serge.
WinaTickets
WinaTickets
https://www.pmturf.com/

MessageWinaTickets Lun 20 Avr 2020 - 18:11

Bonjour
merci milouze je viens de suite mettre mon profil à jour , pour les annonces 
cela ne change rien regarde :
[EDGE] Couleur de fond pour les annonces 2020-024

merci
Milouze14
Milouze14
Fondateur

https://www.milouze14.net/

MessageMilouze14 Lun 20 Avr 2020 - 18:18

Tu es sous Edge et non AmesomeBB Serge!!!!!!!!!!!!!!!!!
Milouze14
Milouze14
Fondateur

https://www.milouze14.net/

MessageMilouze14 Lun 20 Avr 2020 - 18:21

Remplaces le script par celui-ci:
Code:
$(function(){
$('span.M14_topic_type strong:contains(Annonce:)').each(function(){
$(this).closest('.forum-block-inner').addClass('Annonce');
});});

Et remplaces la c.s.s par celle-ci:
Code:
/* couleur annonces */
.forum-block-inner.Annonce
{
background-color:yellow;
}
WinaTickets
WinaTickets
https://www.pmturf.com/

MessageWinaTickets Lun 20 Avr 2020 - 18:44

ohhhhhhhhhhhhhhhhhhhhh purée t'es un gény merci infiniment et pourrait maintenant faire la même chose en vert clair pour les annonces global en rouge avec tout en écriture blanche si possible 
[EDGE] Couleur de fond pour les annonces 2020-025
Milouze14
Milouze14
Fondateur

https://www.milouze14.net/

MessageMilouze14 Lun 20 Avr 2020 - 18:52

Remplaces le script par celui-ci:
Code:
   $(function(){
    $('span.M14_topic_type strong:contains(Annonce:)').each(function(){
    $(this).closest('.forum-block-inner').addClass('Annonce');
    });
    $('span.M14_topic_type strong:contains(Annonce globale:)').each(function(){
    $(this).closest('.forum-block-inner').addClass('AnnonceGlob');
    });

});


Puis ajoutes ceci dans ta feuille de style:

Code:


/* couleur annonces globales */
.forum-block-inner.AnnonceGlob
{
background-color:#2BD440;
color:white;
}
.forum-block-inner.AnnonceGlob strong
{
color:red!important;
}
.forum-block-inner.AnnonceGlob a.topictitle
{
color:white!important;
}


Dernière édition par Milouze14 le Lun 20 Avr 2020 - 18:55, édité 1 fois
WinaTickets
WinaTickets
https://www.pmturf.com/

MessageWinaTickets Lun 20 Avr 2020 - 18:55

super merci merciiiiiiiiiiiiiiiiiiii pleins de bisous et surtout merci encore parfait!
Milouze14
Milouze14
Fondateur

https://www.milouze14.net/

MessageMilouze14 Lun 20 Avr 2020 - 18:56

De rien Serge.
Milouze14
Milouze14
Fondateur

https://www.milouze14.net/

MessageMilouze14 Lun 20 Avr 2020 - 18:56


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