L'avatar du Dernier Message n'apparaît pas

2 participants

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

Résolu L'avatar du Dernier Message n'apparaît pas

Message par N3m0 Mer 7 Déc 2016 - 17:55

Détails techniques


Version du forum : phpBB2
Poste occupé : Fondateur
Navigateur(s) concerné(s) : Mozilla Firefox, Google Chrome
Capture d'écran du problème :
Voir l'image:

Personnes concernées par le problème : Tous les utilisateurs
Problème apparu depuis : 07.12.2016
Lien du forum : http://n3m0.forumactif.org/

Description du problème

Bonjour, bonsoir,
En bidouillant un peu des codes sur mon forum de test, j'ai tenté d'ajouter l'affichage de l'avatar du dernier poster (le cadre du milieu entre le dernier message et l'image) mais aucun avatar n'apparaît, j'ai pourtant bien coché les bonnes cases + mis le codage mais rien.

Le template
Code:
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
        <tr>
        <td valign="bottom">
        <!-- BEGIN switch_user_logged_in -->
        <span class="gensmall">{LAST_VISIT_DATE}<br />
        {CURRENT_TIME}<br />
        </span>
        <!-- END switch_user_logged_in -->
        <div class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a>{NAV_CAT_DESC}</div>
        </td>
        <td class="gensmall" align="right" valign="bottom">
        <!-- BEGIN switch_user_logged_in -->
        <a class="gensmall" href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a><br />
        <a class="gensmall" href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a><br />
        <!-- END switch_user_logged_in -->
        <a class="gensmall" href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a>
        </td>
        </tr>
        </table>

        <!-- BEGIN catrow --><!-- BEGIN tablehead -->
        <div class="topCAT"><div class="tleCAT">{catrow.tablehead.L_FORUM}</div></div>
        <br clear="all" /><!-- END tablehead -->

        <!-- BEGIN cathead -->
        <!-- END cathead -->
   
        <!-- BEGIN forumrow -->
<div class="blocFRM">
   <div class="FRM">
            <div class="tleFRM">
                  <a href="{catrow.forumrow.U_VIEWFORUM}">{catrow.forumrow.FORUM_NAME}</a>
            </div>
          <div class="sjtFRM">{catrow.forumrow.TOPICS} sujets - {catrow.forumrow.POSTS} messages</div>
<div class="dsfFRM">
   <div class="blocSF"></div>
  <div class="sfFRM" id="sfFRM">
    {catrow.forumrow.L_LINKS}
    {catrow.forumrow.LINKS}
    <script type="text/javascript">$('.sfFRM').each(function(){$(this).html($(this).html().replace(/>, /g,"><br /> "));});</script>
  </div>
  <div class="descFRM">{catrow.forumrow.FORUM_DESC}</div>
          </div>
          <div class="lmsgFRM">{catrow.forumrow.LAST_POST}</div>
          <div id="lstavFRM"><div class="lstavFRM">{catrow.forumrow.avatar.LAST_POST_AVATAR}</div></div>
          <div class="imgFRM"><img class="imgFRM" src="{catrow.forumrow.FORUM_FOLDER_IMG}" /></div>
         
  </div>
</div>
        <!-- END forumrow -->
   
        <!-- BEGIN catfoot -->
        <!-- END catfoot -->
   
        <!-- BEGIN tablefoot -->
        <br clear="all" />
        <!-- END tablefoot --><!-- END catrow -->

Le CSS
Code:
      /* TITRES CATEGORIES */
.topCAT {
  width:850px; margin:auto;
}
.tleCAT {
  display:inline-block;
  height:65px;
  width: 850px;
  text-align:center;
  background-image: url(http://sd-2.archive-host.com/membres/images/79875038560126947/Endroth_Road/Test/QEEL.png);
  background-position: center top;
  background-repeat: no-repeat; /* MODIFIABLE */
}
.tleCAT h2 {
  font-size:26px; text-transform:uppercase; letter-spacing:3px;
  font-family:Trajan Pro; color:#b7a4af;
  text-shadow:1px 1px 0px rgba(0,0,0,0.3);/* MODIFIABLE */
}
   /* BLOC FORUMS */
.blocFRM {
  width:850px;
  margin-left:auto; margin-right:auto; margin-top:-10px;
  text-align:center;
}
   /* BLOC FORUM */
.FRM {
  float:left; margin:10px;
  width:400px; height:210px;
}
   /* TITRE FORUM */
.tleFRM {
  width:400px;
  overflow:hidden;
  font-family:Arial;
  letter-spacing: 5px;
  font-style: italic;
  font-size: 15px;
  text-align:right;
  text-transform : lowercase;
}
.tleFRM a {
  color:#b7a4af !important; /* MODIFIABLE */
}
   /* NOMBRE SUJETS ET MESSAGES */
.sjtFRM {
  margin-bottom: -30px;
  margin-left: 15px;
  padding-bottom: 5px;
  text-align: left;
  font-family: verdana;
  font-size:10px;
}
/* NEW ET CO */
.imgFRM{
  display:inline-block;
  vertical-align:top;
  width:158px;
  height:60px;
}
/* AVATAR DERNIER POSTEUR */
#lstavFRM {
  display:inline-block; vertical-align:top; margin:0 5px;
  width:40px; height:60px; overflow:hidden;
  background:#ccc; /* MODIFIABLE */
}
.lstavFRM {
  margin:5px auto 0;
  width:40px; height:50px; overflow:hidden;
}
.lstavFRM img {
  width:40px;
  height: 60px;
}
   /* BLOC DERNIER MESSAGE FORUMS */
.lmsgFRM {
  display:inline-block; vertical-align:top;
  width:190px; height:50px; padding:5px 0;
  background-color:rgba(250,250,250,0.5); /* MODIFIABLE */
  text-align:center; font-size:11px;
}
   /* BLOC DESCRIPTION + SOUS-FORUMS */
.dsfFRM {
  margin:10px auto;
  width:380px;
  height:100px;
  padding:20px 10px 10px 10px;
  background:#554a53;
  box-shadow:0 0 3px rgba(0,0,0,0.2); /* MODIFIABLE */
}
   /* BLOC SOUS-FORUMS */
.blocSF {
  display:inline-block;
  width:160px; height:100px;
}
   /* IMAGE DESCRIPTIVE FORUM */
.descFRM img {
  position:absolute; z-index:3;
  margin-left:-165px;
  width:160px; height:100px;
  transition:all 0.45s ease; -webkit-transition:all 0.45s ease;
}
   /* SOUS-FORUMS */
.sfFRM {
  position:absolute; z-index:5; margin-top:-100px;
  width:140px; height:80px; padding:10px;  overflow:auto;
  text-align:left;
  background-color:rgba(250,250,250,0.5); /* MODIFIABLE */
  opacity:0; transition:all .65s linear; -webkit-transition:all .65s linear;
  text-shadow:1px 1px 0px rgba(250,250,250,0.3);
}
.sfFRM a {
  color:#000000 !important;
  font-size: 12px;/* MODIFIABLE */
}
.sfFRM:hover {
  opacity:1;
}
   /* DESCRIPTION FORUM */
.descFRM {
  display:inline-block;
  width:210px; height:100px; padding:0px 5px; overflow:auto;
  font-size:11px; text-align:justify;
  color:black; /* MODIFIABLE */
}

Je vous remercie d'avance pour votre aide.
Bonne journée/soirée


Dernière édition par N3m0 le Jeu 8 Déc 2016 - 22:42, édité 1 fois
avatar

N3m0
*

Féminin
Messages : 43
Inscrit(e) le : 23/06/2014

http://eterniacity.forumactif.org/
N3m0 a été remercié(e) par l'auteur de ce sujet.

Résolu Re: L'avatar du Dernier Message n'apparaît pas

Message par N3m0 Jeu 8 Déc 2016 - 21:07

Petite up pliz ♥
avatar

N3m0
*

Féminin
Messages : 43
Inscrit(e) le : 23/06/2014

http://eterniacity.forumactif.org/
N3m0 a été remercié(e) par l'auteur de ce sujet.

Résolu Re: L'avatar du Dernier Message n'apparaît pas

Message par Neptunia Jeu 8 Déc 2016 - 22:32

Bonjour ^^


Si vous aviez regardé d'un peu plus près sur la page où vous avez trouvé la base de votre template, vous vous seriez aperçu que chaque fois que Skaemp propose un codage affichant l'avatar, il/elle positionne la variable {catrow.forumrow.avatar.LAST_POST_AVATAR} à l'intérieur de la boucle suivante :
Code:
            <!-- BEGIN avatar -->
...
            <!-- END avatar -->

De plus votre template contient (au minimum) une erreur
Code:
              <div id="lstavFRM"><div class="lstavFRM">{catrow.forumrow.avatar.LAST_POST_AVATAR}</div></div>
La définition d'un id suppose que l'élément est unique sur une page alors qu'ici il sera présent autant de fois qu'il y a de "blocs" sur votre index. Il faut donc utiliser une class et non un ID.

Remplacez la ligne suivante du template :
Code:
              <div id="lstavFRM"><div class="lstavFRM">{catrow.forumrow.avatar.LAST_POST_AVATAR}</div></div>
par :
Code:
              <!-- BEGIN avatar --><div class="lpavaFRM"><div class="lstavFRM">{catrow.forumrow.avatar.LAST_POST_AVATAR}</div></div><!-- END avatar -->

Dans la feuille CSS, remplacez
Code:
#lstavFRM
par
Code:
.lpavaFRM
Neptunia

Neptunia
Membre actif

Féminin
Messages : 17853
Inscrit(e) le : 08/08/2010

https://www.galaxie-series.net/
Neptunia a été remercié(e) par l'auteur de ce sujet.

Résolu Re: L'avatar du Dernier Message n'apparaît pas

Message par N3m0 Jeu 8 Déc 2016 - 22:41

Bonsoir,

Effectivement ça marche mieux ainsi !
Merci beaucoup pour ton aide en tout cas ♥

Du coup problème résolu !
avatar

N3m0
*

Féminin
Messages : 43
Inscrit(e) le : 23/06/2014

http://eterniacity.forumactif.org/
N3m0 a été remercié(e) par l'auteur de ce sujet.

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

- Sujets similaires

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