Enlever le div contenant les liens vers les niveaux inférieurs

2 participants

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

Résolu Enlever le div contenant les liens vers les niveaux inférieurs

Message par Amaryllis-Saphir Mar 25 Mar 2014 - 17:08

Bonjour,

J'ai réussi à organiser mon template pour obtenir ceci :

Enlever le div contenant les liens vers les niveaux inférieurs Cequej11

Maintenant, il me reste à régler ce qui est en rouge sur l'image. C'est-à-dire je ne veux pas que la zone contenant les niveaux inférieurs apparaisse s'il n'y a pas de niveaux inférieurs à afficher.... dans ce cas, l'espace devrait être vide sous "Nos bardes ont raconté X histoire (s).

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 --><table class="forumline" width="100%" style="margin-top:10px; border:2px solid #424c2e;" border="0" cellspacing="1" cellpadding="0">
 <tr>
 <th colspan="5" nowrap="nowrap" width="100%" class="secondarytitle"> {catrow.tablehead.L_FORUM} </th>
 </tr>
 <!-- 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="100%">
 <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>
 <td class="{catrow.cathead.CLASS_ROWPIC}" colspan="3" align="right"> </td>
 </tr>
 <!-- END cathead -->
 <!-- BEGIN forumrow -->
 <tr>
 <!-- BEGIN inc -->
 <td class="{catrow.forumrow.inc.INC_CLASS}" width="46"><img src="{SPACER}" height="0" width="46" alt="." /></td>
 <!-- END inc -->
 <td class="{catrow.forumrow.INC_CLASS}" width="75px" align="center" valign="middle">
 <img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" />
 </td>
 <td class="row1 over" width="450px" colspan="{catrow.forumrow.INC_SPAN}" valign="top" width="100%" height="50">
 <h{catrow.forumrow.LEVEL} class="hierarchy">
 <span class="cattitle">
 <a class="forumlink" href="{catrow.forumrow.U_VIEWFORUM}">{catrow.forumrow.FORUM_NAME}</a><br />
                           </span>
 </h{catrow.forumrow.LEVEL}>
                   <div class="div_conteneur-description">
                        <div class="div_description">
 <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></div>
 </td>
 <td class="row3" width="375px" align="center" valign="top" height="50" colspan="3">
                   <span class="gensmall">Nos bardes ont raconté {catrow.forumrow.TOPICS} histoire (s).</span><br/>
                   <div class="div_conteneur-sousforum">
                        <div class="div_sousforum">
                   <div class="retvirg">{catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}</div>
         <script type="text/javascript">$('.retvirg').each(function(){$(this).html($(this).html().replace(/>, /g,"><br /> "));});</script>
                        </div></div>
                </td>
 </tr>
 <!-- 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><img src="{SPACER}" alt="" height="5" width="1" /><!-- END tablefoot --><!-- END catrow -->

et mon css personnalisé

Code:

.secondarytitle h2
{
font-family:Palatino Linotype;
font-size:18px;
font-weight:bold;
text-align:left;
color:#000000;
}

.titre
{
font-family:Palatino Linotype;
font-size:18px;
font-weight:bold;
text-align:left;
color:#000000;
position:relative; left:25px;
}

.div_description
{
width:475px;
height:100px;
overflow:auto;
padding:3px;
text-align:justify;
}

.div_conteneur-description
{
width:480px;
height:105px;
background-color:#373737;
border:2px solid #444444;
margin-top: 5px;
margin-bottom: 5px;
}

.div_sousforum
{
width:350px;
height:100px;
overflow:auto;
padding:3px;
text-align:justify;
}

.div_conteneur-sousforum
{
width:355px;
height:105px;
background-color:#373737;
border:2px solid #444444;
margin-top: 5px;
margin-bottom: 5px;
}

Mon forum est  ici. Je suis en PHPbb2 avec templates et CSS modifiés.
avatar

Amaryllis-Saphir
Nouveau membre

Messages : 20
Inscrit(e) le : 24/03/2014

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

Résolu Re: Enlever le div contenant les liens vers les niveaux inférieurs

Message par Self Ven 28 Mar 2014 - 18:31

Bonjour,

Reperez le passage:
Code:
                  <div class="div_conteneur-sousforum">
                        <div class="div_sousforum">
                  <div class="retvirg">{catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}</div>
        <script type="text/javascript">$('.retvirg').each(function(){$(this).html($(this).html().replace(/>, /g,"><br /> "));});</script>
                        </div></div>

dans votre template et collez y après le code suivant:
Code:
<!--Script de visibilité des sous forums-->
<script>
    $(function(){
        $('.retvirg').each(function(){
            if($(this).html() == ""){
                $(this).parent().parent().css('display', 'none');
            }
        });
    });
</script>
<!--Fin du script des sous forums-->

Cordialement Smile .
Self

Self
Membre actif

Masculin
Messages : 3853
Inscrit(e) le : 13/06/2013

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

Résolu Re: Enlever le div contenant les liens vers les niveaux inférieurs

Message par Amaryllis-Saphir Sam 29 Mar 2014 - 2:01

Merci! Problème résolu
avatar

Amaryllis-Saphir
Nouveau membre

Messages : 20
Inscrit(e) le : 24/03/2014

http://silvertest.forumactif.com/
Amaryllis-Saphir 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