Liste de sous-forums avec retour à la ligne

2 participants

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

Résolu Liste de sous-forums avec retour à la ligne

Message par Brotherhood Mar 7 Aoû - 19:04

Bonsoir !

Voila mon problème. J'ai trouvé ce code

Code:

              <span id="subforums">{catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}</span>
              <script type="text/javascript">
              jQuery('#subforums').html(jQuery('#subforums').html().replace(/, /g,'<br /> ')).removeAttr('id');
                </script>

afin d'obtenir la liste des sous-forums en liste avec retour à la ligne, à la droite de la description du forum.

Problème, je n'obtiens rien du tout, même en changeant la hierarchie de mon forum. Comme vous pouvez voir sur mon forum test (http://brotherhood.forumactif.fr/), les sous-forums apparaissent mais pas du tout comme souhaité.

Voici mon template index_box :

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 --><center><div class="titrecat">{catrow.tablehead.L_FORUM}</div></center><DIV CLASS="fond_forumline">
 
  <table class="forumline" width="98%" border="0" cellspacing="1" cellpadding="0">
  <!-- END tablehead -->
  <!-- BEGIN cathead -->
  <tr>
      <!-- BEGIN inc -->
      <td class="{catrow.cathead.inc.INC_CLASS}" width="46"><img src="{SPACER}" height="0" width="46" /></td>
      <!-- END inc -->
      <td class="{catrow.cathead.CLASS_CAT}" colspan="{catrow.cathead.INC_SPAN}" width="80%">
        <h{catrow.cathead.LEVEL} class="hierarchy">
                                  <span class="cattitle">
              <a class="cattitle" title="{catrow.cathead.CAT_DESC}" href="{catrow.cathead.U_VIEWCAT}">{catrow.cathead.CAT_TITLE}</a>
            </span>
        </h{catrow.cathead.LEVEL}>
      </td>
          <img src="http://img11.hostingpics.net/pics/529147titre1.png">
      <td class="{catrow.cathead.CLASS_ROWPIC}" colspan="3" align="right"> </td>
 
  <!-- END cathead -->
  <!-- BEGIN forumrow -->
  <tr>
      <!-- BEGIN inc -->
      <td class="{catrow.forumrow.inc.INC_CLASS}" width="98"><img src="{SPACER}" height="94" width="98" alt="." /></td>
      <!-- END inc -->
 
      <td class="row1 over" colspan="{catrow.forumrow.INC_SPAN}" valign="top" width="70%" height="50">
        <h{catrow.forumrow.LEVEL} class="hierarchy">
            <span class="forumlink">
              <a class="forumlink" href="{catrow.forumrow.U_VIEWFORUM}">{catrow.forumrow.FORUM_NAME}</a><br />
            </span>
        </h{catrow.forumrow.LEVEL}>
        <div class="forum-description">
          <span class="genmed">{catrow.forumrow.FORUM_DESC}</span></div>
        <span class="gensmall">
            <!-- BEGIN switch_moderators_links -->
            {catrow.forumrow.switch_moderators_links.L_MODERATOR}{catrow.forumrow.switch_moderators_links.MODERATORS}
            <!-- END switch_moderators_links -->
              <span id="subforums">{catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}</span>
              <script type="text/javascript">
              jQuery('#subforums').html(jQuery('#subforums').html().replace(/, /g,'<br /> ')).removeAttr('id');
                </script>
        </span>
      </td>
   
          <!-- BEGIN forum_link_no -->
 
      <td class="row3 over" align="center" valign="middle" height="50" width="20%">
                <span class="gensmall">{catrow.forumrow.LAST_POST} <br /><br /> <br /> <br /> <img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></span>
           
        <span class="gensmall"><b>{catrow.forumrow.TOPICS}</b> sujets <b>&</b> <b>{catrow.forumrow.POSTS}</b> messages</span><br/><br/></td>
          <!-- END forum_link_no -->
   
  <!-- END forumrow -->
  <!-- BEGIN catfoot -->
  <tr>
      <!-- BEGIN inc -->
      <td class="{catrow.catfoot.inc.INC_CLASS}" width="46"><img src="{SPACER}" height="0" width="46" /></td>
      <!-- END inc -->
      <td class="spaceRow" colspan="{catrow.catfoot.INC_SPAN}" height="1"><img src="{SPACER}" alt="" height="1" width="1" /></td>
  </tr>
  <!-- END catfoot -->
  <!-- BEGIN tablefoot -->
          </table></div><center><img src="http://img15.hostingpics.net/pics/608103bascat2.jpg" alt="" /></center><!-- END tablefoot --><!-- END catrow -->

Merci d'avance et bonne soirée


Dernière édition par Brotherhood le Mer 8 Aoû - 14:24, édité 1 fois
Brotherhood

Brotherhood
**

Féminin
Messages : 83
Inscrit(e) le : 21/05/2008

http://brotherhood.forumsactifs.com
Brotherhood a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Liste de sous-forums avec retour à la ligne

Message par skysky Mer 8 Aoû - 7:03

Bonjour,

Pour commencer, as-tu une hiérachie "séparation des catégories sur l'index > Moyen" ?

Arrow Panneau d'administration
Arrow Affichage
Arrow Page d'accueil
Arrow Structure et hiérarchie
Arrow Séparer les catégories sur l'index
Arrow Choisir "moyen"
Arrow enregistrer

Cela devrait régler une partie du soucis d'affichage.

Si cela ne fonctionne pas ... as tu modifier la partie "hiérarchie" de ton template ?
Code:
<h{catrow.forumrow.LEVEL} class="hierarchy">
ou le css qui va avec ?

EDIT 1 :
Je viens de tester et j'ai trouver ton erreur
C'est un soucis d'affichage hiérarchie.
Tu dois absolument mettre en "séparer les catégories sur l'index" niveau moyen
ca fonctionne sur mon forum test

Bonne journée
skysky

skysky
***

Masculin
Messages : 179
Inscrit(e) le : 04/08/2012

http://skysky.forumactif.com/
skysky a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Liste de sous-forums avec retour à la ligne

Message par Brotherhood Mer 8 Aoû - 13:56

Bonjour ! Tout d'abord, merci de ta réponse.

Pour la hiérarchie que tu m'as indiquée, c'est ce que j'avais au début et ce que je viens de remettre mais ça ne change rien. Ça ne s'affiche toujours pas.

Je n'ai pas modifié cette partie du template, ni le css.

Merci !

EDIT: J'ai trouvé un autre tutoriel, qui semble correspondre à l'effet que je cherche. J'ai donc modifié mon template ainsi :

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 --><center><div class="titrecat">{catrow.tablehead.L_FORUM}</div></center><DIV CLASS="fond_forumline">
 
  <table class="forumline" width="98%" border="0" cellspacing="1" cellpadding="0">
  <!-- END tablehead -->
  <!-- BEGIN cathead -->
  <tr>
      <!-- BEGIN inc -->
      <td class="{catrow.cathead.inc.INC_CLASS}" width="46"><img src="{SPACER}" height="0" width="46" /></td>
      <!-- END inc -->
      <td class="{catrow.cathead.CLASS_CAT}" colspan="{catrow.cathead.INC_SPAN}" width="80%">
        <h{catrow.cathead.LEVEL} class="hierarchy">
                                  <span class="cattitle">
              <a class="cattitle" title="{catrow.cathead.CAT_DESC}" href="{catrow.cathead.U_VIEWCAT}">{catrow.cathead.CAT_TITLE}</a>
            </span>
        </h{catrow.cathead.LEVEL}>
      </td>
          <img src="http://img11.hostingpics.net/pics/529147titre1.png">
      <td class="{catrow.cathead.CLASS_ROWPIC}" colspan="3" align="right"> </td>
 
  <!-- END cathead -->
  <!-- BEGIN forumrow -->
  <tr>
      <!-- BEGIN inc -->
      <td class="{catrow.forumrow.inc.INC_CLASS}" width="98"><img src="{SPACER}" height="94" width="98" alt="." /></td>
      <!-- END inc -->
 
      <td class="row1 over" colspan="{catrow.forumrow.INC_SPAN}" valign="top" width="70%" height="50">
        <h{catrow.forumrow.LEVEL} class="hierarchy">
            <span class="forumlink">
              <a class="forumlink" href="{catrow.forumrow.U_VIEWFORUM}">{catrow.forumrow.FORUM_NAME}</a><br />
            </span>
        </h{catrow.forumrow.LEVEL}>
 
        <!--
  ******************************************************************
  ***** Personnalisation d'affichage des forums et sous-forums *****
  ******************************************************************
      Code proposé par Lostmindy sur CSSActif
      http://www.css-actif.com
  ******************************************************************
-->

<table width="100%" cellspacing="0" cellpadding="0">
  <tr>
      <td valign="top" align="center">
        <div class="forumdesc">
            <span class="genmed">{catrow.forumrow.FORUM_DESC}</span>
            <span class="gensmall">
              <!-- BEGIN switch_moderators_links -->
              {catrow.forumrow.switch_moderators_links.L_MODERATOR}{catrow.forumrow.switch_moderators_links.MODERATORS}
              <!-- END switch_moderators_links -->
            </span>
        </div>
      </td>
      <td valign="top" align="center">
        <div class="listeforums">
            {catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}
        </div>
      </td>
  </tr>
</table>

<!--
  *************************************************
  ***** Fin des personnalisations d'affichage *****
  *************************************************
-->
      </td>
   
          <!-- BEGIN forum_link_no -->
 
      <td class="row3 over" align="center" valign="middle" height="50" width="20%">
                <span class="gensmall">{catrow.forumrow.LAST_POST} <br /><br /> <br /> <br /> <img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></span>
           
        <span class="gensmall"><b>{catrow.forumrow.TOPICS}</b> sujets <b>&</b> <b>{catrow.forumrow.POSTS}</b> messages</span><br/><br/></td>
          <!-- END forum_link_no -->
   
  <!-- END forumrow -->
  <!-- BEGIN catfoot -->
  <tr>
      <!-- BEGIN inc -->
      <td class="{catrow.catfoot.inc.INC_CLASS}" width="46"><img src="{SPACER}" height="0" width="46" /></td>
      <!-- END inc -->
      <td class="spaceRow" colspan="{catrow.catfoot.INC_SPAN}" height="1"><img src="{SPACER}" alt="" height="1" width="1" /></td>
  </tr>
  <!-- END catfoot -->
  <!-- BEGIN tablefoot -->
          </table></div><center><img src="http://img15.hostingpics.net/pics/608103bascat2.jpg" alt="" /></center><!-- END tablefoot --><!-- END catrow -->

Avec ce CSS:

Code:
/******************************************************************
***** Personnalisation d'affichage des forums et sous-forums *****
******************************************************************
  Code proposé par Lostmindy sur CSSActif
  http://www.css-actif.com
*******************************************************************/

/* ** Texte de description des forums ** */
.forumdesc {
  margin-top: 50px;
  margin-right: 300px;
}

/* ** Liste des sous forums ** */
.listeforums {
  /* astuce pour retirer les virgules (ne pas modifier) */
  visibility:hidden;
  font-size:1px;
}

/* ** Liens des sous forums (apparence générale) ** */
.listeforums a {
  /* on rend le texte a nouveau visible (ne pas modifier) */
  visibility:visible;
  font-size:normal;
 
  /* On tansforme les liens en blocs (ne pas modifier) */
  display:block;
 
  /* on précise une largeur (à ajuster) */
  width:150px;

  /* on aligne les liens dans leur 'bloc' (droite, gauche ou centré) */
  text-align:center;
 
  /* on personnalise le texte des liens */
  font-weigh:bold:
  font-variant:small-caps;
  letter-spacing:2px;
 
  /* on personnalise un peu chaque lien-bloc */
  margin:2px; /* marge extérieure, qui sépare les blocs des uns des autres */
  padding:2px;  /* marge intérieure, qui décole le texte des bords */
  border:1px solid #000000; /* une bordure, pourquoi pas ? */
  background:#ffffff;  /* une couleur de fond ! */
}

/* ** Personnalisation liens des sous forums (normal) ** */
.listeforums a:link, .listeforums a:visited {
  color:#990000;
}

/* ** Personnalisation liens des sous forums (survol) ** */
.listeforums a:hover, .listeforums a:active {
  background-color:#000000; /* on change le fond */
  color:#ffffff;  /* et la couleur du texte */
}
*************************************************
***** Fin des personnalisations d'affichage *****
*********** des forums et sous-forums ***********
*************************************************


Mais rien à faire, toujours aucun signe de mes sous-forums, toujours invisibles...

EDIT2 : J'ai réussi à résoudre le problème finalement ! Smile Merci de l'aide, c'est résolu !
Brotherhood

Brotherhood
**

Féminin
Messages : 83
Inscrit(e) le : 21/05/2008

http://brotherhood.forumsactifs.com
Brotherhood 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