Code apparence colonne des catégories

2 participants

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

Résolu Code apparence colonne des catégories

Message par silvia2 Mer 9 Mar 2011 - 18:25

    Bonsoir Very Happy

    Je m'adresse à vous car j'ai de nouveau besoin d'aide car je suis à la recherche de deux petits codes.
    Le premier, qui permettrait de regrouper en une seule colonne les différentes informations suivantes : nombre de messages, nombre de sujet, nom du dernier sujet posté, nom du dernier posteur, etc...
    Le second, qui permettrait d'encadrer tout ce contenu afin de le différencier de la couleur du reste des cellules.

    Voici un exemple afin que vous compreniez mieux de quoi je veux parler :

    Code apparence colonne des catégories 750045Sanstitre2

    Merci par avance I love you




Dernière édition par silvia2 le Mer 9 Mar 2011 - 20:08, édité 1 fois
silvia2

silvia2
****

Féminin
Messages : 248
Inscrit(e) le : 03/06/2007

http://www.throwndice.com/
silvia2 a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Code apparence colonne des catégories

Message par Anzu Mer 9 Mar 2011 - 18:32

Bonsoir,

Tout d'abord, avez vous supprimé les colonnes "sujets" et "messages" ? Si oui, il me faudrait le code de votre template index box ainsi que la CSS.

Pour l'encadré, vous le voulez arrondi ? carré ? Quelle couleur ?

Cordialement.
Anzu

Anzu
Membre actif

Féminin
Messages : 20685
Inscrit(e) le : 30/08/2007

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

Résolu Re: Code apparence colonne des catégories

Message par silvia2 Mer 9 Mar 2011 - 19:18

Merci pour votre réponse I love you

Non, je n'ai pas encore supprimé ces colonnes, je ne sais pas vraiment comme faire ... A tous les coups c'est tout simple mais je ne m'y connais pas trop Razz Voulez vous quand même mon CSS et mon template ?

Pour l'encadré, si possible carré, donc droit, et noir.
silvia2

silvia2
****

Féminin
Messages : 248
Inscrit(e) le : 03/06/2007

http://www.throwndice.com/
silvia2 a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Code apparence colonne des catégories

Message par Anzu Mer 9 Mar 2011 - 19:22

Si votre template est modifié, oui il me le faut ainsi que la css, sinon pas besoin ^^
Pour la suppression des colonnes, il y a un tuto: https://forum.forumactif.com/t261562-suppression-des-colonnes-sujets-et-messages#2348647
Mais si vous n'êtes pas à l'aise avec les codes, autant je le fasse.
Anzu

Anzu
Membre actif

Féminin
Messages : 20685
Inscrit(e) le : 30/08/2007

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

Résolu Re: Code apparence colonne des catégories

Message par silvia2 Mer 9 Mar 2011 - 19:26

Et bien j'ai un peu peur de faire une bétise Razz
Si cela ne vous dérange pas de le faire à ma place, je vous en serais très reconnaissante I love you
Mon template n'a en effet pas été modifié Smile
silvia2

silvia2
****

Féminin
Messages : 248
Inscrit(e) le : 03/06/2007

http://www.throwndice.com/
silvia2 a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Code apparence colonne des catégories

Message par Anzu Mer 9 Mar 2011 - 19:29

D'accord ^^

Dernières précisions:

> Les éléments doivent être positionnés comment ? (ordre)

Anzu

Anzu
Membre actif

Féminin
Messages : 20685
Inscrit(e) le : 30/08/2007

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

Résolu Re: Code apparence colonne des catégories

Message par silvia2 Mer 9 Mar 2011 - 19:56

Et bien ... comme dans l'exemple, pourquoi pas I love you
C'est à dire :
- nom du sujet
- date
- nom du posteur
- nombre de messages
-nombre de sujets

Merci par avance I love you
silvia2

silvia2
****

Féminin
Messages : 248
Inscrit(e) le : 03/06/2007

http://www.throwndice.com/
silvia2 a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Code apparence colonne des catégories

Message par Anzu Mer 9 Mar 2011 - 20:00

Première Etape: Suppression des colonnes sujets et messages.

Tuto

Ce qui nous donne:

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%" border="0" cellspacing="1" cellpadding="0">
   <tr>
      <th colspan="{catrow.tablehead.INC_SPAN}" nowrap="nowrap" width="100%" class="secondarytitle"> {catrow.tablehead.L_FORUM} </th>

      <th nowrap="nowrap" width="150"><div style="width:150px;">{L_LASTPOST}</div></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}" 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" colspan="{catrow.forumrow.INC_SPAN}" valign="top" width="100%" height="50">
         <table width="100%"><tbody><tr><td><h{catrow.forumrow.LEVEL} class="hierarchy">
            <span class="forumlink">
              <a class="forumlink" href="{catrow.forumrow.U_VIEWFORUM}">{catrow.forumrow.FORUM_NAME}</a>

            </span>
        </h{catrow.forumrow.LEVEL}></td><td style="padding-left: 40px; text-align: right;" class="gensmall">{catrow.forumrow.POSTS} messages dans {catrow.forumrow.TOPICS} sujets.</td></tr></tbody></table>
         <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 -->
            {catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}
         </span>
      </td>
   
      <td class="row3 over" align="center" valign="middle" height="50">
         <span class="gensmall">{catrow.forumrow.LAST_POST}</span>
      </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 -->


Deuxième Etape: On repère notre fameux " X sujets & Messages "


Qui est:
Code:
{catrow.forumrow.POSTS} messages dans {catrow.forumrow.TOPICS} sujets.

Troisième Etape: On repère la colonne derniers messages, et précisément la variable qui concerne les derniers messages (last post)

Qui est:
Code:
<td class="row3 over" align="center" valign="middle" height="50">
         <span class="gensmall">{catrow.forumrow.LAST_POST}</span>
      </td>

Puis on insère notre élement, ce qui donne (on met un <br /> pour éviter que ce soit trop "collé"

Code:
<td class="row3 over" align="center" valign="middle" height="50">
         <span class="gensmall">{catrow.forumrow.LAST_POST} <br />{catrow.forumrow.POSTS} messages dans {catrow.forumrow.TOPICS} sujets.</span>
      </td>

Quatrième étape: mise en place du cadre


Qui se placera dans ce contenu:

Code:
<td class="row3 over" align="center" valign="middle" height="50">
         <span class="gensmall">{catrow.forumrow.LAST_POST} <br />{catrow.forumrow.POSTS} messages dans {catrow.forumrow.TOPICS} sujets.</span>
      </td>

Le principe est de mettre une div avec un border, et une couleur de fond.

Code:
<td class="row3 over" align="center" valign="middle" height="50">
         <div style="border: 1px solid #ffffff; background-color: #000000;"><span class="gensmall">{catrow.forumrow.LAST_POST} <br />{catrow.forumrow.POSTS} messages dans {catrow.forumrow.TOPICS} sujets.</span></div>
      </td>

Au final, on obtient:

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%" border="0" cellspacing="1" cellpadding="0">
   <tr>
      <th colspan="{catrow.tablehead.INC_SPAN}" nowrap="nowrap" width="100%" class="secondarytitle"> {catrow.tablehead.L_FORUM} </th>

      <th nowrap="nowrap" width="150"><div style="width:150px;">{L_LASTPOST}</div></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}" 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" colspan="{catrow.forumrow.INC_SPAN}" valign="top" width="100%" height="50">
          <table width="100%"><tbody><tr><td><h{catrow.forumrow.LEVEL} class="hierarchy">
                <span class="forumlink">
                  <a class="forumlink" href="{catrow.forumrow.U_VIEWFORUM}">{catrow.forumrow.FORUM_NAME}</a>

                </span>
            </h{catrow.forumrow.LEVEL}></td><td style="padding-left: 40px; text-align: right;" class="gensmall"></td></tr></tbody></table>
         <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 -->
            {catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}
         </span>
      </td>

      <td class="row3 over" align="center" valign="middle" height="50">
         <div style="border: 1px solid #ffffff; background-color: #000000;"><span class="gensmall">{catrow.forumrow.LAST_POST} <br />{catrow.forumrow.POSTS} messages dans {catrow.forumrow.TOPICS} sujets.</div></span>
      </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 -->

Au niveau des couleurs, on peut encore changer, je ne savais pas si vous vouliez un fond (en image ou autre), donc j'ai fait au plus simple.

Cordialement.
Anzu

Anzu
Membre actif

Féminin
Messages : 20685
Inscrit(e) le : 30/08/2007

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

Résolu Re: Code apparence colonne des catégories

Message par silvia2 Mer 9 Mar 2011 - 20:08

Tout est parfait I love you
Je vous remercie pour la clarté de vos réponses qui m'ont permis d'en savoir un peu plus sur comment modifier un template.
Merci pour tout.

Problème résolu Smile
silvia2

silvia2
****

Féminin
Messages : 248
Inscrit(e) le : 03/06/2007

http://www.throwndice.com/
silvia2 a été remercié(e) par l'auteur de ce sujet.

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


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