AccueilDernières imagesRechercherS'enregistrerConnexion

Forum de graphisme, codage et game design proposant des tutoriels, astuces, libres services et commandes dans les domaines de l'infographie amateur, de l'intégration web (HTML et CSS essentiellement) ainsi que dans la conception de RPG sur forum.

Le deal à ne pas rater :
Pokémon EV06 : où acheter le Bundle Lot 6 Boosters Mascarade ...
Voir le deal

    Cacher le profil sous l'avatar (dévoilé en hover)

    Sparrow-style
    Sparrow-style
    FémininAge : 39Messages : 32055

    Jeu 14 Juin 2012 - 16:26

    Rappel du premier message :

    Bonjour !

    Un petit code pour gagner un peu de place dans le profil des messages souvent très long : cacher le profil ! Contrairement à d'autres codes où celui-ci est mis en spoiler, ici il est présent sous l'avatar du joueur et il faut survoler celui-ci pour voir les informations du profil.

    Le résultat en images :

    Cacher le profil sous l'avatar (dévoilé en hover) - Page 11 953155exemple1 => Cacher le profil sous l'avatar (dévoilé en hover) - Page 11 226061exemple2

    Pour faire ce tutoriel vous aurez besoin de :
    - modifier le template viewtopic_body
    - ajouter un peu de CSS dans votre Feuille CSS
    - définir une taille fixe des avatars pour les membres, donc leur imposer une taille précise qui est dans mon exemple la plus répandue actuellement à savoir 200*320

    Commençons par bouger les choses dans notre template !

    Allez dans Affichage > Templates > Général > viewtopic_body (affichage d'un sujet)

    Repérez à la ligne 90 cette partie là :

    Code:
    <td class="{postrow.displayed.ROW_CLASS}"{postrow.displayed.THANK_BGCOLOR} valign="top" width="150">
             <span class="name"><a name="{postrow.displayed.U_POST_ID}"></a><strong>{postrow.displayed.POSTER_NAME}</strong></span><br />
                <span class="postdetails poster-profile">
                {postrow.displayed.POSTER_RANK}<br />
                {postrow.displayed.RANK_IMAGE}{postrow.displayed.POSTER_AVATAR}<br /><br />
                <!-- BEGIN profile_field -->
                {postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}
                <!-- END profile_field -->
                {postrow.displayed.POSTER_RPG}
             </span><br />
             <img src="http://2img.net/i/fa/empty.gif" alt="" style="width:150px;height:1px" />
          </td>

    Indication : le "td" ouvrant une case de tableau, ceci correspond à toute la case de profil, à droite du message.

    Remplacez ce morceau par ceci :

    Code:
    <!--Début de la modification pour l'apparence de l'avatar avec effet masqué-->

    <td class="{postrow.displayed.ROW_CLASS}"{postrow.displayed.THANK_BGCOLOR} valign="top" width="150">
    <!--Code affichage dernier message posté-->  <a name="{postrow.displayed.U_POST_ID}"></a>
         
                      <span class="rang_mess">{postrow.displayed.RANK_IMAGE}</span>
                 
                      <span class="avatar_mess"><span class="profil_mess"><!-- BEGIN profile_field -->
                {postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}
                <!-- END profile_field -->
                        {postrow.displayed.POSTER_RPG}</span>
                        {postrow.displayed.POSTER_AVATAR}</span>
                 
                      <span class="pseudo_mess">
    <!--Tentative d'ajout du rang-->             
    {postrow.displayed.POSTER_RANK}<br />
    <font size=3><b>{postrow.displayed.POSTER_NAME}</b></font></span>             
               
          </td>



    <!--fin de la modification pour l'apparence de l'avatar avec effet masqué-->

    Constatez que je n'ai pas modifié la structure elle-même, j'ai laissé la case, seul le contenu est bougé.
    N'oubliez pas de valider votre template !


    ▬ Allons ensuite ajouter le CSS

    Allez dans Affichage > Couleurs > Feuille css et copiez ce code :

    Code:
    .avatar_mess
    {
      display: block;
      width: 200px;
      height: 320px;
      margin-left: -10px;
      margin-right: 10px;
      overflow: hidden;
      background: #272726;
      border: 5px solid #3e1d19;
      transform: rotate(-5deg);
      -moz-transform: rotate(-5deg);
      -o-transform: rotate(-5deg);
      -ms-transform: rotate(-5deg);
      -htm-transform: rotate(-5deg);
      -webkit-transform: rotate(-5deg);
      box-shadow: 0px 0px 6px #000000;
      -moz-box-shadow: 0px 0px 6px #000000;
      -o-box-shadow: 0px 0px 6px #000000;
      -htm-box-shadow: 0px 0px 6px #000000;
      -webkit-box-shadow: 0px 0px 6px #000000;
          transform: all;
    -moz-transform: all;
    -o-transform: all;
    -htm-transform: all;
    -webkit-transform: all;
    transition: 1s;
    -moz-transition: 1s;
    -o-transition: 1s;
    -htm-transition: 1s;
    -webkit-transition: 1s;
    }
    .avatar_mess:hover
    {
      margin-left: 5px;
      transform: rotate(0deg);
      -moz-transform: rotate(0deg);
      -o-transform: rotate(0deg);
      -ms-transform: rotate(0deg);
      -htm-transform: rotate(0deg);
      -webkit-transform: rotate(0deg);
          transform: all;
    -moz-transform: all;
    -o-transform: all;
    -htm-transform: all;
    -webkit-transform: all;
    transition: 1s;
    -moz-transition: 1s;
    -o-transition: 1s;
    -htm-transition: 1s;
    -webkit-transition: 1s;
    }
    .profil_mess
    {
      position: absolute;
      display: block;
      width: 190px;
      height: 310px;
      margin: auto;
      padding: 5px;
      overflow: auto;
      background: #6b664e;
      color: #c5bea0;
      font-size: 11px;
      opacity: 0;
      -moz-opacity: 0;
      -khtml-opacity: 0;
      filter: alpha(opacity=0);
          transform: all;
    -moz-transform: all;
    -o-transform: all;
    -htm-transform: all;
    -webkit-transform: all;
    transition: 1s;
    -moz-transition: 1s;
    -o-transition: 1s;
    -htm-transition: 1s;
    -webkit-transition: 1s;
    }
    .profil_mess:hover
    {
      opacity: 1;
      -moz-opacity: 1;
      -khtml-opacity: 1;
      filter: alpha(opacity=100);
          transform: all;
    -moz-transform: all;
    -o-transform: all;
    -htm-transform: all;
    -webkit-transform: all;
    transition: 1s;
    -moz-transition: 1s;
    -o-transition: 1s;
    -htm-transition: 1s;
    -webkit-transition: 1s;
    }
    .pseudo_mess
    {
      display: block;
      position: relative;
      z-index: 2;
      width: 190px;
      margin-top: -15px;
      margin-left: 10px;
      text-align: center;
      font-size: 18px;
      font-family: courier;
      font-weight: bold;
      text-shadow: 0px 0px 3px #c5bea0;
      background: #94855c;
      padding-top: 5px;
      border-left: 3px solid #371e1a;
      border-right: 3px solid #371e1a;
      border-top: 1px solid #371e1a;
      border-bottom: 1px solid #371e1a;
      box-shadow: 0px 0px 3px #000000;
      -moz-box-shadow: 0px 0px 3px #000000;
      -o-box-shadow: 0px 0px 3px #000000;
      -htm-box-shadow: 0px 0px 3px #000000;
      -webkit-box-shadow: 0px 0px 3px #000000;
    }

    Vous pouvez ensuite adapter les couleurs de cadre, fond ou ombre portée, la police, etc...


    Si vous utilisez ce tutoriel pour votre forum, merci de mettre un crédit à Never-Utopia ! Cela ne représente pas grand chose pour vous, mais beaucoup pour nous Wink

    Merci de laisser un message pour donner vos impressions, commentaires et/ou remerciements ^^
    Si vous avez des problèmes avec ce LS, venez poster ici.


    Dernière édition par Onyx le Sam 5 Mai 2018 - 23:25, édité 4 fois (Raison : Merci à ninouee pour la correction d'un oublie d'élément du code)



    sign
    avatar
    .erin
    FémininAge : 29Messages : 28

    Ven 19 Sep 2014 - 13:53

    merci
    Lenalee
    Lenalee
    FémininAge : 34Messages : 40

    Sam 20 Sep 2014 - 15:12

    merci beaucoup
    Meuh Pffeuh
    Meuh Pffeuh
    FémininAge : 24Messages : 37

    Jeu 25 Sep 2014 - 18:00

    est-ce normal que je ne vois pas les avatars sur mon forum, avec ce code ?
    Nanou0001
    Nanou0001
    FémininAge : 39Messages : 50

    Ven 26 Sep 2014 - 12:13

    je suis preneuse merci pour le tuto
    lala zhang
    lala zhang
    FémininAge : 33Messages : 377

    Sam 27 Sep 2014 - 14:29

    Merci pour le partage
    Liquid Dreams
    Liquid Dreams
    FémininAge : 34Messages : 38

    Jeu 2 Oct 2014 - 22:37

    Merci pour ce magnifique code!
    Sentenza
    Sentenza
    MasculinAge : 39Messages : 95

    Ven 3 Oct 2014 - 15:45

    merci beaucoup!
    Elf-of-Nature
    Elf-of-Nature
    FémininAge : 29Messages : 156

    Ven 3 Oct 2014 - 18:02

    Merci !! :-)



    Cacher le profil sous l'avatar (dévoilé en hover) - Page 11 216988Renardssigna
    Mr Yo
    Mr Yo
    MasculinAge : 49Messages : 37

    Sam 4 Oct 2014 - 20:14

    Merci
    Féery
    Féery
    FémininAge : 23Messages : 23

    Dim 5 Oct 2014 - 15:33

    Merci <3
    JasLo
    JasLo
    FémininAge : 22Messages : 76

    Lun 6 Oct 2014 - 18:45

    Mercii!
    Noisou
    Noisou
    FémininAge : 25Messages : 37

    Jeu 9 Oct 2014 - 15:03

    Merci encore Very Happy
    EricSouvaltzis
    EricSouvaltzis
    MasculinAge : 25Messages : 47

    Dim 12 Oct 2014 - 11:35

    Merci
    Nearween
    Nearween
    FémininAge : 25Messages : 213

    Dim 12 Oct 2014 - 14:19

    merci pour le code ^^



    Cacher le profil sous l'avatar (dévoilé en hover) - Page 11 Tumblr_static_tumblr_static_e0bc42ijrzwc84o84s4s8o0g_640

    Stand by Me
    Anastasiaa
    Anastasiaa
    FémininAge : 27Messages : 41

    Dim 12 Oct 2014 - 19:59

    Merci c'parfait !



    Cacher le profil sous l'avatar (dévoilé en hover) - Page 11 245712Ana2
    Kimberlay *
    Kimberlay *
    FémininAge : 34Messages : 161

    Dim 12 Oct 2014 - 20:59

    Merci
    Anonymous
    Invité

    Lun 13 Oct 2014 - 9:02

    Merci pour ce tutoriel !
    Egyfu
    Egyfu
    FémininAge : 30Messages : 56

    Mar 14 Oct 2014 - 20:02

    Très beau boulot ! Chapeau à toi !
    Merci de le proposer en libre service en tout cas =).
    Damned
    Damned
    FémininAge : 22Messages : 109

    Mer 15 Oct 2014 - 10:57

    Merci
    Liliumini
    Liliumini
    FémininAge : 28Messages : 58

    Mer 15 Oct 2014 - 21:32

    Merci
    Missmytic
    Missmytic
    FémininAge : 35Messages : 26

    Ven 17 Oct 2014 - 13:18

    merci ♥
    avatar
    Del
    MasculinMessages : 110

    Dim 19 Oct 2014 - 14:44

    Merci



    « Run you clever boy and remember... »
    blade li britannia
    blade li britannia
    MasculinAge : 32Messages : 90

    Dim 19 Oct 2014 - 16:54

    merci
    Petit Harfang
    Petit Harfang
    FémininAge : 23Messages : 80

    Mar 21 Oct 2014 - 19:29

    merci
    reshiram44
    reshiram44
    MasculinAge : 25Messages : 380

    Mar 21 Oct 2014 - 23:39

    merci



    Contenu sponsorisé


      La date/heure actuelle est Lun 13 Mai 2024 - 21:44