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 du moment : -29%
PC portable – MEDION 15,6″ FHD Intel i7 ...
Voir le deal
499.99 €

    (ONYX) [Profil] Modifier la page de profil utilisateur

    Sheewps
    Sheewps
    MasculinAge : 24Messages : 23

    Dim 1 Mai 2016 - 15:39

    Rappel du premier message :

    Ma demande



    Bonjour tout le monde !
    Alors voila, je cherche a modifier les pages de profils utilisateurs sur mon forum. Pour le moment c'est ça : Clic
    Je n'ai pas vu de tuto pour ça sur le forum.. Même avec la fonction recherche, donc j'espère que je ne l'ai pas loupé si il y en avait déjà un ^^.
    Je précise que mon forum à moi est un forumactif, et que je suis l'administrateur principale !
    Je vous remercie d'avance en tout cas !


    Schéma(s) et Eléments
    Schémas : Voici le schéma que j'ai fais : Clic
    Tailles des éléments : approximativement les tailles sur le schéma, enfin, il faut que ça rentre dans le cadre déjà présent du forum.. Je sais pas si c'est super compréhensible ce que je viens de dire
    Effets voulus : Pas d'effets particuliers, je veux quelque chose d'assez sobre et claire à lire
    Version de votre forum : PHPBB2


    Ressources
    ///.

    Autres précisions ?
    J'aimerais aussi que les écrits soient plus visibles que ce j'ai actuellement, plus gros, surtout.
    Onyx
    Onyx
    FémininAge : 30Messages : 3350

    Sam 2 Juil 2016 - 22:19

    Ok !

    Bon, la façon dont cela fonctionne, c'est que tous les champs contacts sont ensemble et tous les autres champs ensemble aussi. Pour séparer le bloc histoire et caractère ainsi que supprimer les champs contacts qu'on ne veut pas, j'ai besoin de savoir quel est l'identifiant que FA leur donne sur ton forum pour les mettre dans un certain javascript.

    Alors je vais te donner des parties de code à installer, je vais aller sur ton forum pour voir quel identifiants FA donnent aux parties que je dois modifier et je vais te redonner le code modifié ensuite, ok?

    Alors pour commencer, le CSS :
    Code:
    /*Tableau du profil*/
    .profilsimple {
      background-color: #101010;
      border: 2px solid #202020;
      border-collapse: collapse;
    }
    /*Barre de titre du profil*/
    .profilsimple th {
      background-color: #303030;
      background-image: none;
      border-bottom: 2px solid #202020;
      font-family: 'Verdana';
      font-size: 15px;
      color: #a3a3a3;
    }
    /*Cellules du tableau du profil*/
    .profilsimple td {
      background-color: transparent;
      font-family: 'Verdana';
      font-size: 13px;
      color: #a3a3a3;
    }
    /*Bloc des contacts*/
    .profilsimple_contactsbloc {
      text-align: left;
    }
    /*Bloc de Gauche*/
    .profilsimple_blocs1 {
      margin: 10px;
      margin-right: 15px;
      padding: 10px;
      border: 2px solid #202020;
      background-color: #303030;
    }
    /*Autres blocs*/
    .profilsimple_blocs {
      margin: 10px 10px 0px 0px;
      padding: 10px;
      border: 2px solid #202020;
      background-color: #303030;
    }
    .profilsimple_infos > span:nth-child(1) {
      font-family: 'Verdana';
      font-size: 13px;
      color: #a3a3a3!important;
      font-weight: bold;
    }

    Ensuite, dans les templates, tu va dans la section "profil" et tu copies/colles ceci dans le template "profile_view_body" :
    Code:
    <table width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
    <tr>
    <td><span class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a></span></td>
    </tr>
    </table>
    <table class="profilsimple" width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
      <tbody>
        <tr>
          <th colspan="2" nowrap="nowrap" height="25">Profil de {USERNAME}</th>
        </tr>
        <tr>
          <td width="250" align="center" valign="top">
            <div class="profilsimple_blocs1">
              {AVATAR_IMG}<br /><br />
              Pseudo : <span id="profilsimple_nom"><strong>{USERNAME}</strong></span><br />
              Rang : <strong>{POSTER_RANK}</strong><br />
              Groupe : <strong><span id="profilsimple_groupe">Aucun</span></strong><br /><br />
              <div class="profilsimple_contactsbloc">
                <!-- BEGIN contact_field -->
                <div class="profilsimple_contacts" id="field_id{contact_field.ID}">
                  {contact_field.LABEL}  
                  {contact_field.CONTENT}
                </div>
                <!-- END contact_field -->
              </div>
            </div>
          </td>
          <td align="center" valign="top">
            <table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
              <tbody>
                <tr>
                  <td id="profilsimple_case1" width="50%" align="align" valign="top">
                    <div class="profilsimple_blocs">
                      <strong><u>Informations générales</u></strong><br /><br />
                      <div class="profilsimple_overflow">
                        <!-- BEGIN profile_field -->
                        <div class="profilsimple_infos" id="field_id{profile_field.ID}">
                          {profile_field.LABEL}&nbsp;
                          {profile_field.CONTENT}
                          <br />
                        </div>
                        <!-- END profile_field -->
                      </div>
                    </div>
                  </td>
                  <td id="profilsimple_case3" width="50%" align="align" valign="top" rowspan="2">
                    <div class="profilsimple_blocs">
                      <strong><u>Histoire du personnage</u></strong><br /><br />
                      <div class="profilsimple_overflow" id="profilsimple_histoire"></div>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td id="profilsimple_case2" width="50%" align="align" valign="top">
                    <div class="profilsimple_blocs">
                      <strong><u>Caractère du personnage</u></strong><br /><br />
                      <div class="profilsimple_overflow" id="profilsimple_caractere"></div>
                    </div>
                  </td>
                </tr>
              </tbody>
            </table>
          </td>
        </tr>
      </tbody>
    </table>
    <br />
    <script type="text/javascript">
    //<!--
      $(function(){
        $('.profilsimple_infos').each(function() {
          var champsprofil = $(this).html();
          var champsprofil2 = champsprofil.replace(/<div/g, '<span').replace(/div>/g, 'span>');
          $(this).html(champsprofil2);
        });
      
      
        /*Déplacer le Histoire*/
        var clonehistoire = $('#profilsimple_case1 #field_id20 > span:nth-child(2)').html();
        $('#profilsimple_histoire').html(clonehistoire);
        $('#field_id20').remove();
        
      
        /*Déplacer le Caractère*/
        var clonecaractere = $('#profilsimple_case1 #field_id3 > span:nth-child(2)').html();
        $('#profilsimple_caractere').html(clonecaractere);
        $('#field_id3').remove();
      
      
        /*On récupère la couleur du nom*/
        var colorname = $('#profilsimple_nom > strong > span').css('color');

        /*On va sur la page accueil*/
        $.get('/', function (a) {
      
          /*On récupère la légenge des groupes*/
          var groupes = $('a.gensmall[href^="/g"]', a);
      
          /*On répète les actions suivantes pour tous les groupes*/
          for (i = 0; i < groupes.length; i++) {
      
            /*On prend la couleur de groupe*/
            var colorgroupe = groupes.eq(i).css('color');
      
            /*On regarde si la couleur du groupe est pareil que la couleur du nom*/
            if (colorgroupe == colorname) {
      
              /*Si oui on ajoute le groupe*/
              $('#profilsimple_groupe').text(groupes.eq(i).text());
            }
          }
        });
      });
    //-->
    </script>
    <script src="{JS_DIR}jquery/json/jquery.json-1.3.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    //<![CDATA[
     $(document).ready(function(){
     $('[id^=field_id]').each(function(){
     if ( $(this).find('.field_editable').is('span, div') )
     {
     $(this).hover(function()
     {
     if( $(this).find('.field_editable.invisible').is('span, div') )
     {
     $(this).find('.field_editable').prev().addClass('ajax-profil_hover').parent().addClass('ajax-profil_parent').append('<div class="ajax-profil_edit"><img src="{AJAX_EDIT_IMG}" /></div>');
     $(this).find('.ajax-profil_edit').attr({
     alt: "{L_FIELD_EDIT_VALUE}",
     title: "{L_FIELD_EDIT_VALUE}"
     }).click(function(){
     $(this).prev().prev().removeClass('ajax-profil_hover').addClass('invisible').next().removeClass('invisible').append('<img src="{AJAX_VALID_IMG}" class="ajax-profil_valid" />').find('input,select');
     $(this).prev().find('.ajax-profil_valid').attr({
     alt: "{L_VALIDATE}",
     title: "{L_VALIDATE}"
     }).click(function(){
     var content = new Array();
     $(this).parent().find('[name]').each(function(){
     var type_special = $(this).is('input[type=radio],input[type=checkbox]');
     if ( (type_special && $(this).is(':checked')) || !type_special )
     {
     content.push(new Array($(this).attr('name'), $(this).attr('value')));
     }
     });
     var id_name = $(this).parents('[id^=field_id]').attr('id');
     var id = id_name.substring(8, id_name.length);
     $.post(
     "{U_AJAX_PROFILE}",
     {id:id,user:"{CUR_USER_ID}",active:"{CUR_USER_ACTIVE}",content:$.toJSON(content),tid:"{TID}"},
     function(data){
     $.each(data, function(i, item){
     $('[id=field_id' + i + ']').find('.field_uneditable').html(item).end().find('.ajax-profil_valid').remove().end().find('.field_editable').addClass('invisible').end().find('.field_uneditable').removeClass('invisible');
     });
     },
     "json"
     );
     });
     $(this).remove();
     });
     }
     },function()
     {
     if( $(this).find('.field_editable.invisible').is('span, div') )
     {
     $(this).find('.field_editable').prev().removeClass('ajax-profil_hover');
     $(this).find('.ajax-profil_edit').remove();
     }
     });
     }
     });
     });
    //]]>
    </script>


    Note : Je ne vois toujours pas le champ "Caractère", tu l'as bien créé? Est-ce que tu as bien coché "visible sur le profil"?



    R.Falsworth
    R.Falsworth
    FémininAge : 27Messages : 92

    Dim 3 Juil 2016 - 14:51

    Bonjour !
    En effet j'ai oublié de cocher la case pour les caractères.. (on va remettre les lunettes :') )
    Je n'ai pas très bien compris ce que tu voulais, je trouve ça où ?
    R.Falsworth
    R.Falsworth
    FémininAge : 27Messages : 92

    Dim 3 Juil 2016 - 14:56

    Les codes sont installés en tout cas ! ça m'a l'air plutôt comme je voulais en tout cas ! héhé :3 On approche au but
    Onyx
    Onyx
    FémininAge : 30Messages : 3350

    Lun 4 Juil 2016 - 4:00

    Salut!

    Ok, on a presque fini, j'ai adapté le code un peu. Maintenant, on va mettre ceci dans le template :
    Code:
    <table width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
    <tr>
    <td><span class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a></span></td>
    </tr>
    </table>
    <table class="profilsimple" width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
      <tbody>
        <tr>
          <th colspan="2" nowrap="nowrap" height="25">Profil de {USERNAME}</th>
        </tr>
        <tr>
          <td align="center" valign="top">
            <div class="profilsimple_blocs1">
              {AVATAR_IMG}<br /><br />
              <strong>Pseudo :</strong> <span id="profilsimple_nom">{USERNAME}</span><br />
              <strong>Rang :</strong> {POSTER_RANK}<br />
              <strong>Groupe :</strong> <span id="profilsimple_groupe">Aucun</span><br /><br />
              <div class="profilsimple_contactsbloc">
                <!-- BEGIN contact_field -->
                <div class="profilsimple_contacts" id="field_id{contact_field.ID}">
                  <strong>{contact_field.LABEL}</strong>  
                  {contact_field.CONTENT}
                </div>
                <!-- END contact_field -->
              </div>
            </div>
          </td>
          <td align="center" valign="top">
            <table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
              <tbody>
                <tr>
                  <td id="profilsimple_case1" width="50%" align="align" valign="top">
                    <div class="profilsimple_blocs">
                      <strong><u>Informations générales</u></strong><br /><br />
                      <div class="profilsimple_overflow1">
                        <!-- BEGIN profile_field -->
                        <div class="profilsimple_infos" id="field_id{profile_field.ID}">
                          {profile_field.LABEL}&nbsp;
                          {profile_field.CONTENT}
                          <br />
                        </div>
                        <!-- END profile_field -->
                      </div>
                    </div>
                  </td>
                  <td id="profilsimple_case3" width="50%" align="align" valign="top" rowspan="2" style="padding-bottom: 10px;">
                    <div class="profilsimple_blocs">
                      <strong><u>Histoire du personnage</u></strong><br /><br />
                      <div class="profilsimple_overflow2" id="profilsimple_histoire"></div>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td id="profilsimple_case2" width="50%" align="align" valign="top" style="padding-bottom: 10px;">
                    <div class="profilsimple_blocs">
                      <strong><u>Caractère du personnage</u></strong><br /><br />
                      <div class="profilsimple_overflow1" id="profilsimple_caractere"></div>
                    </div>
                  </td>
                </tr>
              </tbody>
            </table>
          </td>
        </tr>
      </tbody>
    </table>
    <br />
    <script type="text/javascript">
    //<!--
      $(function(){
        $('.profilsimple_infos').each(function() {
          var champsprofil = $(this).html();
          var champsprofil2 = champsprofil.replace(/<div/g, '<span').replace(/div>/g, 'span>');
          $(this).html(champsprofil2);
        });
        $('.profilsimple_contacts').each(function() {
          var champscontact = $(this).html();
          var champscontact2 = champscontact.replace(/<div/g, '<span').replace(/div>/g, 'span>');
          $(this).html(champscontact2);
        });
     
        /*Enlever le courriel*/
        var emailenlever = $('#i_icon_email').closest('.profilsimple_contacts');
        $(emailenlever).remove();
     
     
        /*Déplacer le Histoire*/
        var clonehistoire = $('#profilsimple_case1 #field_id-20 > span:nth-child(2)').html();
        $('#profilsimple_histoire').html(clonehistoire);
        $('#field_id-20').remove();
       
     
        /*Déplacer le Caractère*/
        var clonecaractere = $('#profilsimple_case1 #field_id2 > span:nth-child(2)').html();
        $('#profilsimple_caractere').html(clonecaractere);
        $('#field_id2').remove();
     
     
        /*On récupère la couleur du nom*/
        var colorname = $('#profilsimple_nom > strong > span').css('color');

        /*On va sur la page accueil*/
        $.get('/', function (a) {
     
          /*On récupère la légenge des groupes*/
          var groupes = $('a.gensmall[href^="/g"]', a);
     
          /*On répète les actions suivantes pour tous les groupes*/
          for (i = 0; i < groupes.length; i++) {
     
            /*On prend la couleur de groupe*/
            var colorgroupe = groupes.eq(i).css('color');
     
            /*On regarde si la couleur du groupe est pareil que la couleur du nom*/
            if (colorgroupe == colorname) {
     
              /*Si oui on ajoute le groupe*/
              $('#profilsimple_groupe').text(groupes.eq(i).text());
            }
          }
        });
      });
    //-->
    </script>
    <script src="{JS_DIR}jquery/json/jquery.json-1.3.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    //<![CDATA[
       $(document).ready(function(){
          $('[id^=field_id]').each(function(){
             if ( $(this).find('.field_editable').is('span, div') )
             {
                $(this).hover(function()
                {
                   if( $(this).find('.field_editable.invisible').is('span, div') )
                   {
                      $(this).find('.field_editable').prev().addClass('ajax-profil_hover').parent().addClass('ajax-profil_parent').append('<div class="ajax-profil_edit"><img src="{AJAX_EDIT_IMG}" /></div>');
                      $(this).find('.ajax-profil_edit').attr({
                            alt: "{L_FIELD_EDIT_VALUE}",
                            title: "{L_FIELD_EDIT_VALUE}"
                         }).click(function(){
                         $(this).prev().prev().removeClass('ajax-profil_hover').addClass('invisible').next().removeClass('invisible').append('<img src="{AJAX_VALID_IMG}" class="ajax-profil_valid" />').find('input,select');
                         $(this).prev().find('.ajax-profil_valid').attr({
                            alt: "{L_VALIDATE}",
                            title: "{L_VALIDATE}"
                         }).click(function(){
                            var content = new Array();
                            $(this).parent().find('[name]').each(function(){
                               var type_special = $(this).is('input[type=radio],input[type=checkbox]');
                               if ( (type_special && $(this).is(':checked')) || !type_special )
                               {
                                  content.push(new Array($(this).attr('name'), $(this).attr('value')));
                               }
                            });
                            var id_name = $(this).parents('[id^=field_id]').attr('id');
                            var id = id_name.substring(8, id_name.length);
                            $.post(
                               "{U_AJAX_PROFILE}",
                               {id:id,user:"{CUR_USER_ID}",active:"{CUR_USER_ACTIVE}",content:$.toJSON(content),tid:"{TID}"},
                               function(data){
                                  $.each(data, function(i, item){
                                     $('[id=field_id' + i + ']').find('.field_uneditable').html(item).end().find('.ajax-profil_valid').remove().end().find('.field_editable').addClass('invisible').end().find('.field_uneditable').removeClass('invisible');
                                  });
                               },
                               "json"
                            );
                         });
                         $(this).remove();
                      });
                   }
                },function()
                {
                   if( $(this).find('.field_editable.invisible').is('span, div') )
                   {
                      $(this).find('.field_editable').prev().removeClass('ajax-profil_hover');
                      $(this).find('.ajax-profil_edit').remove();
                   }
                });
             }
          });
       });
    //]]>
    </script>

    Et remplacer le CSS que je t'avais donné par ceci :
    Code:
    /*Tableau du profil*/
    .profilsimple {
      background-color: #101010;
      border: 2px solid #202020;
      border-collapse: collapse;
    }
    /*Barre de titre du profil*/
    .profilsimple th {
      background-color: #303030;
      background-image: none;
      border-bottom: 2px solid #202020;
      font-family: 'Verdana';
      font-size: 15px;
      color: #a3a3a3;
    }
    /*Cellules du tableau du profil*/
    .profilsimple td {
      background-color: transparent;
      font-family: 'Verdana';
      font-size: 13px;
      color: #a3a3a3;
    }
    /*Bloc des contacts*/
    .profilsimple_contactsbloc {
      text-align: left;
    }
    /*Bloc de Gauche*/
    .profilsimple_blocs1 {
      width: 200px;
      margin: 10px;
      margin-right: 15px;
      padding: 10px;
      border: 2px solid #202020;
      background-color: #303030;
    }
    /*Autres blocs*/
    .profilsimple_blocs {
      margin: 10px 10px 0px 0px;
      padding: 10px;
      border: 2px solid #202020;
      background-color: #303030;
    }
    .profilsimple_infos > span:nth-child(1) {
      font-family: 'Verdana';
      font-size: 13px;
      color: #a3a3a3!important;
      font-weight: bold;
    }
    .profilsimple_infos > span:nth-child(2) > img {
      max-width: 250px;
    }
    .profilsimple_contacts > span:nth-child(1) {
      font-family: 'Verdana';
      font-size: 13px;
      color: #a3a3a3!important;
      font-weight: bold;
    }
    .profilsimple_overflow1 {
      max-height: 200px;
      overflow: auto;
      margin-right: -5px;
      padding-right: 5px;
    }
    .profilsimple_overflow2 {
      max-height: 466px;
      overflow: auto;
      margin-right: -5px;
      padding-right: 5px;
    }



    R.Falsworth
    R.Falsworth
    FémininAge : 27Messages : 92

    Lun 4 Juil 2016 - 11:19

    Voila ! :) C'est ajouté.

    Ca m'a l'air d'être super bien, pile comme je voulais ! Je ne sais pas si tu as des modifications encore à faire ?
    En tout cas : un GRAND merciiii <3 :yay:

    Question : Si je veux modifier / changer des champs qui se trouvent dans "informations générales" j'ai juste à les changer dans le "champ" habituel (utilisateurs & groupes -> profils) ?
    (simple question, je compte pas y modifier dans l'immédiat, mais on sait jamais :') )
    Onyx
    Onyx
    FémininAge : 30Messages : 3350

    Mar 5 Juil 2016 - 2:06

    Oui tu peux modifier les champs comme tu veux, tant que tu ne supprimes pas l'histoire et le caractère et que tu les recrée parce que sinon cela risque de ne plus fonctionner.

    Dernière modifications, le groupe ne fonctionnait pas Wink

    Alors cela donne ceci dans le template :
    Code:
    <table width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
    <tr>
    <td><span class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a></span></td>
    </tr>
    </table>
    <table class="profilsimple" width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
      <tbody>
        <tr>
          <th colspan="2" nowrap="nowrap" height="25">Profil de {USERNAME}</th>
        </tr>
        <tr>
          <td align="center" valign="top">
            <div class="profilsimple_blocs1">
              {AVATAR_IMG}<br /><br />
              <strong>Pseudo :</strong> <span id="profilsimple_nom">{USERNAME}</span><br />
              <strong>Rang :</strong> {POSTER_RANK}<br />
              <strong>Groupe :</strong> <span id="profilsimple_groupe">Aucun</span><br /><br />
              <div class="profilsimple_contactsbloc">
                <!-- BEGIN contact_field -->
                <div class="profilsimple_contacts" id="field_id{contact_field.ID}">
                  <strong>{contact_field.LABEL}</strong>  
                  {contact_field.CONTENT}
                </div>
                <!-- END contact_field -->
              </div>
            </div>
          </td>
          <td align="center" valign="top">
            <table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
              <tbody>
                <tr>
                  <td id="profilsimple_case1" width="50%" align="align" valign="top">
                    <div class="profilsimple_blocs">
                      <strong><u>Informations générales</u></strong><br /><br />
                      <div class="profilsimple_overflow1">
                        <!-- BEGIN profile_field -->
                        <div class="profilsimple_infos" id="field_id{profile_field.ID}">
                          {profile_field.LABEL}&nbsp;
                          {profile_field.CONTENT}
                          <br />
                        </div>
                        <!-- END profile_field -->
                      </div>
                    </div>
                  </td>
                  <td id="profilsimple_case3" width="50%" align="align" valign="top" rowspan="2" style="padding-bottom: 10px;">
                    <div class="profilsimple_blocs">
                      <strong><u>Histoire du personnage</u></strong><br /><br />
                      <div class="profilsimple_overflow2" id="profilsimple_histoire"></div>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td id="profilsimple_case2" width="50%" align="align" valign="top" style="padding-bottom: 10px;">
                    <div class="profilsimple_blocs">
                      <strong><u>Caractère du personnage</u></strong><br /><br />
                      <div class="profilsimple_overflow1" id="profilsimple_caractere"></div>
                    </div>
                  </td>
                </tr>
              </tbody>
            </table>
          </td>
        </tr>
      </tbody>
    </table>
    <br />
    <script type="text/javascript">
    //<!--
      $(function(){
        $('.profilsimple_infos').each(function() {
          var champsprofil = $(this).html();
          var champsprofil2 = champsprofil.replace(/<div/g, '<span').replace(/div>/g, 'span>');
          $(this).html(champsprofil2);
        });
        $('.profilsimple_contacts').each(function() {
          var champscontact = $(this).html();
          var champscontact2 = champscontact.replace(/<div/g, '<span').replace(/div>/g, 'span>');
          $(this).html(champscontact2);
        });
      
        /*Enlever le courriel*/
        var emailenlever = $('#i_icon_email').closest('.profilsimple_contacts');
        $(emailenlever).remove();
      
      
        /*Déplacer le Histoire*/
        var clonehistoire = $('#profilsimple_case1 #field_id-20 > span:nth-child(2)').html();
        $('#profilsimple_histoire').html(clonehistoire);
        $('#field_id-20').remove();
        
      
        /*Déplacer le Caractère*/
        var clonecaractere = $('#profilsimple_case1 #field_id2 > span:nth-child(2)').html();
        $('#profilsimple_caractere').html(clonecaractere);
        $('#field_id2').remove();
      
      
        /*On récupère la couleur du nom*/
         var colorname = $('#profilsimple_nom > span:first').css('color');

        /*On va sur la page accueil*/
        $.get('/', function (a) {
      
          /*On récupère la légenge des groupes*/
          var groupes = $('a.gensmall[href^="/g"]', a);
      
          /*On répète les actions suivantes pour tous les groupes*/
          for (i = 0; i < groupes.length; i++) {
      
            /*On prend la couleur de groupe*/
            var colorgroupe = groupes.eq(i).css('color');
      
            /*On regarde si la couleur du groupe est pareil que la couleur du nom*/
            if (colorgroupe == colorname) {
      
              /*Si oui on ajoute le groupe*/
              $('#profilsimple_groupe').text(groupes.eq(i).text());
            }
          }
        });
      });
    //-->
    </script>
    <script src="{JS_DIR}jquery/json/jquery.json-1.3.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    //<![CDATA[
       $(document).ready(function(){
          $('[id^=field_id]').each(function(){
             if ( $(this).find('.field_editable').is('span, div') )
             {
                $(this).hover(function()
                {
                   if( $(this).find('.field_editable.invisible').is('span, div') )
                   {
                      $(this).find('.field_editable').prev().addClass('ajax-profil_hover').parent().addClass('ajax-profil_parent').append('<div class="ajax-profil_edit"><img src="{AJAX_EDIT_IMG}" /></div>');
                      $(this).find('.ajax-profil_edit').attr({
                            alt: "{L_FIELD_EDIT_VALUE}",
                            title: "{L_FIELD_EDIT_VALUE}"
                         }).click(function(){
                         $(this).prev().prev().removeClass('ajax-profil_hover').addClass('invisible').next().removeClass('invisible').append('<img src="{AJAX_VALID_IMG}" class="ajax-profil_valid" />').find('input,select');
                         $(this).prev().find('.ajax-profil_valid').attr({
                            alt: "{L_VALIDATE}",
                            title: "{L_VALIDATE}"
                         }).click(function(){
                            var content = new Array();
                            $(this).parent().find('[name]').each(function(){
                               var type_special = $(this).is('input[type=radio],input[type=checkbox]');
                               if ( (type_special && $(this).is(':checked')) || !type_special )
                               {
                                  content.push(new Array($(this).attr('name'), $(this).attr('value')));
                               }
                            });
                            var id_name = $(this).parents('[id^=field_id]').attr('id');
                            var id = id_name.substring(8, id_name.length);
                            $.post(
                               "{U_AJAX_PROFILE}",
                               {id:id,user:"{CUR_USER_ID}",active:"{CUR_USER_ACTIVE}",content:$.toJSON(content),tid:"{TID}"},
                               function(data){
                                  $.each(data, function(i, item){
                                     $('[id=field_id' + i + ']').find('.field_uneditable').html(item).end().find('.ajax-profil_valid').remove().end().find('.field_editable').addClass('invisible').end().find('.field_uneditable').removeClass('invisible');
                                  });
                               },
                               "json"
                            );
                         });
                         $(this).remove();
                      });
                   }
                },function()
                {
                   if( $(this).find('.field_editable.invisible').is('span, div') )
                   {
                      $(this).find('.field_editable').prev().removeClass('ajax-profil_hover');
                      $(this).find('.ajax-profil_edit').remove();
                   }
                });
             }
          });
       });
    //]]>
    </script>

    Et ceci dans le CSS :
    Code:
    /*Tableau du profil*/
    .profilsimple {
      background-color: #101010;
      border: 2px solid #202020;
      border-collapse: collapse;
    }
    /*Barre de titre du profil*/
    .profilsimple th {
      background-color: #303030;
      background-image: none;
      border-bottom: 2px solid #202020;
      font-family: 'Verdana';
      font-size: 15px;
      color: #a3a3a3;
    }
    /*Cellules du tableau du profil*/
    .profilsimple td {
      background-color: transparent;
      font-family: 'Verdana';
      font-size: 13px;
      color: #a3a3a3;
    }
    /*Bloc des contacts*/
    .profilsimple_contactsbloc {
      text-align: left;
    }
    /*Bloc de Gauche*/
    .profilsimple_blocs1 {
      width: 200px;
      margin: 10px;
      margin-right: 15px;
      padding: 10px;
      border: 2px solid #202020;
      background-color: #303030;
    }
    /*Autres blocs*/
    .profilsimple_blocs {
      margin: 10px 10px 0px 0px;
      padding: 10px;
      border: 2px solid #202020;
      background-color: #303030;
    }
    .profilsimple_infos > span:nth-child(1) {
      font-family: 'Verdana';
      font-size: 13px;
      color: #a3a3a3!important;
      font-weight: bold;
    }
    .profilsimple_infos > span:nth-child(2) > img {
      max-width: 220px;
    }
    .profilsimple_contacts > span:nth-child(1), .profilsimple_contacts > strong > span {
      font-family: 'Verdana';
      font-size: 13px;
      color: #a3a3a3!important;
      font-weight: bold;
    }
    .profilsimple_overflow1 {
      max-height: 200px;
      overflow: auto;
      margin-right: -5px;
      padding-right: 5px;
    }
    .profilsimple_overflow2 {
      max-height: 466px;
      overflow: auto;
      margin-right: -5px;
      padding-right: 5px;
    }



    R.Falsworth
    R.Falsworth
    FémininAge : 27Messages : 92

    Mar 5 Juil 2016 - 11:53

    Okey ! c:
    Voila, c'est mit !
    Merci beaucoup pour ton temps et ton ingéniosité ! cheers
    Contenu sponsorisé


      La date/heure actuelle est Dim 28 Avr 2024 - 12:19