Le Deal du moment : -15%
(Adhérents) LEGO® Icons 10318 Le Concorde
Voir le deal
169.99 €

Question sur l'affichage d'un profil

Question sur l'affichage d'un profil Empty Dim 30 Avr - 23:14
Bonsoir !

Tout d'abord merci de mettre à disposition votre travail pour les quiches que nous sommes (en tout cas, moi oui... )

Sur notre forum, nous voulions utiliser le dernier profil de la page. Malheureusement, en tant qu'admin, ce codage ne nous permet pas de voir le nombre de MP envoyé par les membres (et ainsi vérifier que certains petits nouveaux qui ne finissent pas leurs fiches n'inondent pas de mp pour faire de la pub par exemple).

Est-ce qu'il est possible de nous filer un petit coup de main pour ajouter cette variable à votre code ?

Merci d'avance I love you
Revenir en haut Aller en bas
Question sur l'affichage d'un profil Empty Lun 1 Mai - 0:40
Bonjour,

Remplacez l'intégralité du template profile_view_body par :

Code:
<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
<div class="PFIL"><!-- SUJETS / MESSAGES / DERNIERE VISITE --><div class="boxPFIL"><div class="sbjPFIL"><a rel="nofollow" class="genmed" href="/sta/{PUSERNAME}">{L_TOPICS}</a></div><div class="msgPFIL"><a rel="nofollow" class="genmed" href="/spa/{PUSERNAME}">{L_POSTS}</a></div><div id="lstPFIL"><div><span>{L_LAST_VISITED} :</span> {LAST_VISIT_TIME}</div></div></div><!-- PSEUDONYME / AVATAR / INFORMATIONS --><div class="boxPFIL"><div class="namePFIL">{USERNAME}</div><div class="avPFIL"><div id="ktactPFIL"><div id="adminPFIL"><div><!-- BEGIN switch_auth_user --><span>{L_ADMINISTRATE_USER} :</span> {ADMINISTRATE_USER}{BAN_USER}<!-- END switch_auth_user --></div><div><!-- BEGIN switch_dhow_mp --><span>{L_PRIVATE_MSG} :</span> {PRIVATE_MSG}<!-- END switch_dhow_mp --></div></div><!-- BEGIN contact_field --><div class="ktactPFIL">{contact_field.CONTENT}</div><!-- END contact_field --></div>{AVATAR_IMG}</div><div class="abtPFIL"><!-- BEGIN profile_field --><div id="field_id{profile_field.ID}"><div><span class="gen">{profile_field.LABEL}</span> {profile_field.CONTENT}</div></div><!-- END profile_field --></div></div>
<!-- BEGIN switch_rpg -->
<div class="boxRPG"><div style="float:left; margin:10px;">{RPG_IMAGE}</div>
   <!-- BEGIN rpg_fields -->
   <span class="gen">{switch_rpg.rpg_fields.F_NAME} : </span> {switch_rpg.rpg_fields.F_VALUE_NEW}<br/>
   <!-- END rpg_fields -->
         {U_ADMIN_RPG}
   </div>
   <!-- END switch_rpg -->
<!-- BEGIN switch_admin_user_comment_active --><span class="gen">{L_COMMENTS} :</span><br /><span class="gensmall">{L_MODS_AND_ADMINS}</span> {ADMIN_USER_COMMENT}<!-- END switch_admin_user_comment_active -->
</div>
</table>
<br />
<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>
Revenir en haut Aller en bas
Question sur l'affichage d'un profil Empty Mar 2 Mai - 7:31
Merci pour la réponse rapide bounce
Malheureusement, cela ne change rien. Le nombre de mp n'apparait toujours pas

Voici le lien du forum au cas où
Revenir en haut Aller en bas
Question sur l'affichage d'un profil Empty Mar 2 Mai - 21:45
L’information devrait pourtant vous être révélée au survol de l'avatar :
Question sur l'affichage d'un profil 197192vizPFIL

Remplacez l'intégralité du template profile_view_body par :
Code:
<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
<div class="PFIL"><!-- SUJETS / MESSAGES / DERNIERE VISITE --><div class="boxPFIL"><div class="sbjPFIL"><a rel="nofollow" class="genmed" href="/sta/{PUSERNAME}">{L_TOPICS}</a></div><div class="msgPFIL"><a rel="nofollow" class="genmed" href="/spa/{PUSERNAME}">{L_POSTS}</a></div><div id="lstPFIL"><div><span>{L_LAST_VISITED} :</span> {LAST_VISIT_TIME}</div></div></div><!-- PSEUDONYME / AVATAR / INFORMATIONS --><div class="boxPFIL"><div class="namePFIL">{USERNAME}</div><div class="avPFIL"><div id="ktactPFIL"><div id="adminPFIL"><div><!-- BEGIN switch_auth_user --><span>{L_ADMINISTRATE_USER} :</span> {ADMINISTRATE_USER}{BAN_USER}<!-- END switch_auth_user --></div></div><!-- BEGIN contact_field --><div class="ktactPFIL">{contact_field.CONTENT}</div><!-- END contact_field --></div>{AVATAR_IMG}</div><div class="abtPFIL"><!-- BEGIN profile_field --><div id="field_id{profile_field.ID}"><div><span class="gen">{profile_field.LABEL}</span> {profile_field.CONTENT}</div></div><!-- END profile_field --><div style="padding-left:5px;"><!-- BEGIN switch_dhow_mp --><span>{L_PRIVATE_MSG} :</span> {PRIVATE_MSG}<!-- END switch_dhow_mp --></div></div></div>
<!-- BEGIN switch_rpg -->
<div class="boxRPG"><div style="float:left; margin:10px;">{RPG_IMAGE}</div>
 <!-- BEGIN rpg_fields -->
 <span class="gen">{switch_rpg.rpg_fields.F_NAME} : </span> {switch_rpg.rpg_fields.F_VALUE_NEW}<br/>
 <!-- END rpg_fields -->
 {U_ADMIN_RPG}
 </div>
 <!-- END switch_rpg -->
<!-- BEGIN switch_admin_user_comment_active --><span class="gen">{L_COMMENTS} :</span><br /><span class="gensmall">{L_MODS_AND_ADMINS}</span> {ADMIN_USER_COMMENT}<!-- END switch_admin_user_comment_active -->
</div>
</table>
<br />
<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>
Revenir en haut Aller en bas
Question sur l'affichage d'un profil Empty Mer 3 Mai - 13:16
Ha merci beaucoup !
Suite à un soucis de CSS, on ne le voyait pas chez nous ! Mais maintenant que nous savons où chercher, nous savons quoi modifier pour le rendre visible !

Encore merci beaucoup ! I love you
Revenir en haut Aller en bas
Revenir en haut Aller en bas
Vous ne pouvez pas répondre aux sujets dans ce forum