Détails des sujets qui n'apparaît qu'occasionnellement

2 participants

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

Résolu Détails des sujets qui n'apparaît qu'occasionnellement

Message par Necro Seth Ven 6 Sep 2013 - 18:52

Bonjour !

Alors alors...
C'est un problème qui apparaît aléatoirement, et je cherche, mais ne trouve rien, un sale bug, quoi. C'est peut-être un truc tout bête... Enfin voilà, voici mon problème en image :

Spoiler:

Donc, c'est la date et l'auteur du dernier message qui n'apparait qu'une fois de temps en temps, aléatoirement, que ce soit sur des sujets locked ou non, encore moins sur les annonces... Donc le but du jeu, c'est d'y refaire apparaitre sur tous les sujets, parce que c'est tout de même bien gênant...

Voici donc le template modifié :
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}() {
   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}() {
   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 -->
<center><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
          <th colspan="3" nowrap="nowrap" width="100%" class="secondarytitle" style="margin-left: 20px;">     Annonces et Sujets </th>
      </tr></table>

<table class="tourcat" width="700px" border="0" cellspacing="5" cellpadding="10" padding="5">
   <tr>
      <!-- BEGIN multi_selection -->
      <th align="center" nowrap="nowrap" width="20"><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" /></th>
   <!-- END multi_selection -->
   </tr>
   <!-- BEGIN pagination -->
   <tr>
      <td class="row1" colspan="7" align="right"><span class="gensmall">{PAGINATION}</span></td>
   </tr>
   <!-- END pagination -->
   <!-- END header_table --><!-- BEGIN header_row -->
   <tr>
      <td class="row3" colspan="{topics_list_box.row.COLSPAN}" ><span class="gensmall" > <b>{topics_list_box.row.L_TITLE}</b></span></td>
   </tr>
<!-- END header_row -->

<!-- BEGIN topic -->
  {topics_list_box.row.END_TABLE_STICKY}
   <tr>
      <!-- BEGIN single_selection -->
      <td class="{topics_list_box.row.ROW_CLASS}" align="center" valign="middle" width="20" ><input type="radio" name="{topics_list_box.FIELDNAME}" value="{topics_list_box.row.FID}" {topics_list_box.row.L_SELECT} /></td>
      <!-- END single_selection -->
      
      
      <td width="100%" valign="top">
         <table align="center" class="descrip" style="background-image:url({topics_list_box.row.TOPIC_FOLDER_IMG});"><tr><td width="600px">
            <span class="titlesuj">{topics_list_box.row.NEWEST_POST_IMG}{topics_list_box.row.PARTICIPATE_POST_IMG}{topics_list_box.row.TOPIC_TYPE}
            <h2 class="topic-title">
               <a class="topictitle" href="{topics_list_box.row.U_VIEW_TOPIC}">{topics_list_box.row.TOPIC_TITLE}</a>
                                  </h2></span>
         
         <!-- BEGIN switch_description -->
         <span class="genmed">
            <br /><br>
            {topics_list_box.row.topic.switch_description.TOPIC_DESCRIPTION}</td>
                          <td><span class="postdetails"><center>{topics_list_box.row.LAST_POST_TIME}<br />{topics_list_box.row.LAST_POST_AUTHOR} {topics_list_box.row.LAST_POST_IMG}<br /><br />{topics_list_box.row.GOTO_PAGE}<!-- BEGIN nav_tree -->{topics_list_box.row.TOPIC_NAV_TREE} <!-- END nav_tree --></center></span>
         </span></td></tr>
         <!-- END switch_description -->
         <tr><td colspan="2"><span class="gensmall">{topics_list_box.row.TOPIC_ANNOUNCES_DATES}{topics_list_box.row.TOPIC_CALENDAR_DATES}</span> 
         
                  <span class="gensmall"><center>Auteur : {topics_list_box.row.TOPIC_AUTHOR} Réponses : {topics_list_box.row.REPLIES}</center></span><td><tr>
         </table> </td>
            <!-- BEGIN multi_selection -->
      <td class="row2" align="center" valign="middle"><span class="postdetails"><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} /></span></td>
   <!-- END multi_selection -->
   </tr>
   <!-- END topic --><!-- BEGIN no_topics -->
   <tr>
      <td class="row1" colspan="{topics_list_box.row.COLSPAN}" align="center" valign="middle" height="30"><span class="gen">{topics_list_box.row.L_NO_TOPICS}</span></td>
   </tr>
   <!-- END no_topics --><!-- BEGIN bottom -->
   <tr>
      <td colspan="{topics_list_box.row.COLSPAN}" valign="middle">
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
               <td> <span class="gensmall">{PAGINATION}</span></td>
               <td align="right"><a href="#top">{L_BACK_TO_TOP}</a> </td>
            </tr>
         </table>
      </td>
   </tr>
<!-- END bottom --><!-- BEGIN footer_table -->
</table><!-- END footer_table --><!-- BEGIN spacer --><br class="gensmall" /><!-- END spacer --><!-- END row --><!-- END topics_list_box -->
et le CSS, que je pense inutile pour le coup, qui correspond à l'affichage des sujets :

Code:
/*---------------- AFFICHAGE DES SUJETS ----------------*/
.descrip{
  width: 800px
height : 150px;
overflow : auto;
  padding : 20px;
align : center center;
}

.titlesuj{
  font: Croissant One, sans-serif;,Verdana,Arial,Helvetica;
  margin-left: 25px;
}
Voilà, j'espère que c'est bien clair ><"

Merci d'avance à celui/celle/ceux/celles qui pourrai(en)t m'apporter leur aide


Dernière édition par Necro Seth le Sam 7 Sep 2013 - 12:28, édité 1 fois
Necro Seth

Necro Seth
Nouveau membre

Messages : 18
Inscrit(e) le : 17/04/2013

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

Résolu Re: Détails des sujets qui n'apparaît qu'occasionnellement

Message par Tech Sam 7 Sep 2013 - 12:18

Bonjour,

Vous avez mis le code dans la boucle
Code:
<!-- BEGIN switch_description -->
contenu
<!-- END switch_description -->
qui ne s'affiche que lorsqu'il y a une description au sujet.
Si il n'y a aucune description au sujet, alors le contenu de la boucle ne s'affiche pas.

Il suffit donc de remonter la fermeture de la boucle de quelques lignes
Code:
        <!-- END switch_description -->
juste après cette ligne :
Code:
            {topics_list_box.row.topic.switch_description.TOPIC_DESCRIPTION}</td>
Cordialement.
Tech

Tech
Membre actif

Masculin
Messages : 22683
Inscrit(e) le : 01/12/2007

https://forum.forumactif.com/
Tech a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Détails des sujets qui n'apparaît qu'occasionnellement

Message par Necro Seth Sam 7 Sep 2013 - 12:28

Et ça marche !
J'ai toujours pensé que ces fameuses boucles étaient juste des descriptions en fait. Je te remercie beaucoup pour cette aide !

Sujet résolu !

(Au passage, vous faites du bon boulot sur forumactif, merci pour ce que vous faites !)
Necro Seth

Necro Seth
Nouveau membre

Messages : 18
Inscrit(e) le : 17/04/2013

http://eleusis.forumactif.org/
Necro Seth 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