Récupérer une valeur d'un champs et ajout au template groupcp_info_body
Forum gratuit : Le forum des forums actifs :: Entraide & Support... :: Problème avec un script, un code :: Archives des problèmes avec un code
Page 1 sur 1 • Partagez
Récupérer une valeur d'un champs et ajout au template groupcp_info_body
Détails techniques
Version du forum : phpBB2Poste occupé : Fondateur
Navigateur(s) concerné(s) : Mozilla Firefox, Google Chrome, Internet Explorer, Opera, Safari, Autre
Personnes concernées par le problème : Tous les utilisateurs
Lien du forum : http://laal.forumactif.com/
Description du problème
Bonjour,LAAL grandit chaque jour, et j'aimerai pouvoir faciliter la tâche du staff dans son administration.
En effet, nous faisons chaque dimanche le total des points de chaque groupe afin d'en faire une compétition. Pour le moment, pour faire le total de chaque groupe, il nous faut cliquer sur chaque profil des membres et vérifier le champs "Dollars" pour en faire une addition.
Mon idée est donc de modifier le template groupcp_info_body afin d'afficher la valeur de ce champs directement, sans avoir à cliquer sur l'utilisateur.
Je suis tombée sur ces trois sujets :
https://forum.forumactif.com/t399047-recuperer-la-valeur-d-un-champ
https://forum.forumactif.com/t398397-recuperer-la-valeur-du-systeme-de-points
https://forum.forumactif.com/t398706-recuperer-la-valeur-d-un-champ?nid=13#3331528
Sauf que je n'arrive pas à le mettre en place. J'ai identifié mon champs comme le field_id-13 et tente de suivre les tuto, mais soit :
- ça ne marche pas
- ça bousille le Template profile_view_body, déjà modifié, grâce à du Javascript, et ça ne marche pas pour combler le tout.
Je pense que c'est faisable, mais ayant modifié les Templates, je n'arrive pas à appliquer ces scripts et cibler correctement les éléments en question. Pour que vous puissiez voir l'état du forum, j'ai tout enlevé en script et Template modifié sur ce sujet, pour repartir de bonne base.
Milles mercis à celui qui m'aidera
Dernière édition par Exotic le Lun 23 Nov 2020 - 18:06, édité 1 fois
Re: Récupérer une valeur d'un champs et ajout au template groupcp_info_body
Hello Milouze !
Alors, non le template groupcp_info_body a pas encore été modifié. J'ai fait des tests, mais ça n'a pas du tout été concluant Donc j'ai remis de base.
C'est exactement ce que je souhaite !
Je veux récupérer la valeur dollars des profils des membres qui est bien du texte et l'ajouter à ce template-là, à la place de Localisation, et garder le nombre de messages
Alors, non le template groupcp_info_body a pas encore été modifié. J'ai fait des tests, mais ça n'a pas du tout été concluant Donc j'ai remis de base.
C'est exactement ce que je souhaite !
Je veux récupérer la valeur dollars des profils des membres qui est bien du texte et l'ajouter à ce template-là, à la place de Localisation, et garder le nombre de messages
Re: Récupérer une valeur d'un champs et ajout au template groupcp_info_body
Re,
ok merci, tu peux remplacer le contenu du template par celui-ci:
a++
ok merci, tu peux remplacer le contenu du template par celui-ci:
- Code:
<form action="{S_GROUPCP_ACTION}" method="post">
<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="4">
<tr>
<th class="thHead" colspan="7" height="25"><h1 class="pagetitle">{L_GROUP_INFORMATION}</h1></th>
</tr>
<tr>
<td class="row1" width="20%"><span class="gen">{L_GROUP_NAME}:</span></td>
<td class="row2"><span class="gen"><strong>{GROUP_NAME}</strong></span></td>
</tr>
<tr>
<td class="row1" width="20%"><span class="gen">{L_GROUP_DESC}:</span></td>
<td class="row2"><span class="gen">{GROUP_DESC}</span></td>
</tr>
<tr>
<td class="row1" width="20%"><span class="gen">{L_GROUP_MEMBERSHIP}:</span></td>
<td class="row2">
<span class="gen">{GROUP_DETAILS}
<!-- BEGIN switch_subscribe_group_input -->
<input class="mainoption" type="submit" name="joingroup" value="{L_JOIN_GROUP}" />
<!-- END switch_subscribe_group_input -->
<!-- BEGIN switch_unsubscribe_group_input -->
<input class="mainoption" type="submit" name="unsub" value="{L_UNSUBSCRIBE_GROUP}" />
<!-- END switch_unsubscribe_group_input -->
</span>
</td>
</tr>
<!-- BEGIN switch_mod_option -->
<tr>
<td class="row1" width="20%"><span class="gen">{L_GROUP_TYPE}:</span></td>
<td class="row2">
<span class="gen"><input type="radio" name="group_type" value="{S_GROUP_OPEN_TYPE}" {S_GROUP_OPEN_CHECKED}{S_GROUP_OPEN_DISABLED} />{L_GROUP_OPEN} <input type="radio" name="group_type" value="{S_GROUP_CLOSED_TYPE}" {S_GROUP_CLOSED_CHECKED} /> {L_GROUP_CLOSED} <input type="radio" name="group_type" value="{S_GROUP_HIDDEN_TYPE}" {S_GROUP_HIDDEN_CHECKED} />{L_GROUP_HIDDEN} <input class="mainoption" type="submit" name="groupstatus" value="{L_UPDATE}" /></span>
</td>
</tr>
<!-- END switch_mod_option -->
</table>
{S_HIDDEN_FIELDS}
</form>
<script>
$(function(){
$('a.M14_L_USERNAME').each(function(){
var $this=$(this).closest('tr').find('.M14_valeur');
var link=$(this).attr('href');
$.get(link , function(data){
var h= $(data).find('tr[id="field_id-13"] .field_uneditable').text();
$this.text(h);
});});});
</script>
<form action="{S_GROUPCP_ACTION}" method="post" name="post">
<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="4">
<tr>
<th class="thCornerL" height="25" nowrap="nowrap">{L_PM}</th>
<th class="thTop" nowrap="nowrap">{L_USERNAME}</th>
<th class="thTop" nowrap="nowrap">{L_POSTS}</th>
<th class="thTop" nowrap="nowrap">Dollars</th>
<th class="thTop" nowrap="nowrap">{L_EMAIL}</th>
<th class="thTop" nowrap="nowrap">{L_WEBSITE}</th>
<th class="thCornerR" nowrap="nowrap">{L_SELECT}</th>
</tr>
<tr>
<td class="catSides" colspan="8" height="28"><span class="cattitle">{L_GROUP_MODERATOR}</span></td>
</tr>
<tr>
<td class="row1" align="center">{MOD_PM_IMG}</td>
<td class="row1" align="center"><span class="gen"><a class="gen M14_L_USERNAME" href="{U_MOD_VIEWPROFILE}">{MOD_USERNAME}</a></span></td>
<td class="row1" align="center" valign="middle"><span class="gen">{MOD_POSTS}</span></td>
<td class="row1" align="center" valign="middle"><span class="gen M14_valeur">Patientez</span></td>
<td class="row1" align="center" valign="middle"><span class="gen">{MOD_EMAIL_IMG}</span></td>
<td class="row1" align="center">{MOD_WWW_IMG}</td>
<td class="row1" align="center"> </td>
</tr>
<tr>
<td class="catSides" colspan="8" height="28"><span class="cattitle">{L_GROUP_MEMBERS}</span></td>
</tr>
<!-- BEGIN member_row -->
<tr>
<td class="{member_row.ROW_CLASS}" align="center">{member_row.PM_IMG}</td>
<td class="{member_row.ROW_CLASS}" align="center"><span class="gen"><a class="gen M14_L_USERNAME" href="{member_row.U_VIEWPROFILE}">{member_row.USERNAME}</a></span></td>
<td class="{member_row.ROW_CLASS}" align="center"><span class="gen">{member_row.POSTS}</span></td>
<td class="{member_row.ROW_CLASS}" align="center"><span class="gen M14_valeur"></span></td>
<td class="{member_row.ROW_CLASS}" align="center" valign="middle"><span class="gen">{member_row.EMAIL_IMG}</span></td>
<td class="{member_row.ROW_CLASS}" align="center">{member_row.WWW_IMG}</td>
<td class="{member_row.ROW_CLASS}" align="center"><!-- BEGIN switch_mod_option --><input type="checkbox" name="members[]" value="{member_row.USER_ID}" /><!-- END switch_mod_option --></td>
</tr>
<!-- END member_row -->
<!-- BEGIN switch_no_members -->
<tr>
<td class="row1" colspan="7" align="center"><span class="gen">{L_NO_MEMBERS}</span></td>
</tr>
<!-- END switch_no_members -->
<!-- BEGIN switch_hidden_group -->
<tr>
<td class="row1" colspan="7" align="center"><span class="gen">{L_HIDDEN_MEMBERS}</span></td>
</tr>
<!-- END switch_hidden_group -->
<!-- BEGIN switch_mod_option -->
<!-- BEGIN switch_grp_admin -->
<tr>
<td class="row2" colspan="8" align="left">
<strong><span class="gen">{L_ADMIN_GRP_EXPLAIN}</span></strong>
</td>
</tr>
<!-- END switch_grp_admin -->
<tr>
<td class="catBottom" colspan="8" align="right">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="left" valign="top">
<span class="genmed"><input class="post" type="text" id="username" name="username" size="20" maxlength="25" /> <input class="mainoption" type="submit" name="add" value="{L_ADD_MEMBER}" /> <input type="button" class="liteoption" id="find_user" value="{L_FIND_USERNAME}" /></span>
</td>
<td><span class="cattitle"><input class="mainoption" type="submit" name="remove" value="{L_REMOVE_SELECTED}" /></span></td>
</tr>
</table>
</td>
</tr>
<!-- END switch_mod_option -->
</table>
<table width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td align="left" valign="top"><span class="nav">{PAGE_NUMBER}</span></td>
<td align="right" valign="top"><span class="nav">{PAGINATION}</span></td>
</tr>
<tr>
<td>
{PENDING_USER_BOX}{S_HIDDEN_FIELDS}
</td>
</tr>
</table>
</form>
<table width="100%" border="0" cellspacing="2" align="center">
<tr>
<td align="right" valign="top">{JUMPBOX}</td>
</tr>
</table>
<!-- BEGIN switch_mod_option -->
<div id="find_username" class="jqmWindow"></div>
<script src="{JQUERY_DIR}jqmodal/jqmodal.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){
function find_username(fieldname) {
$.get('{U_SEARCH_USER}&fieldname=' + fieldname + '&time=' + timestamp(), '',
function(data){
$('#find_username').html(data).jqmShow();
$('.jqmOverlay').bgiframe();
$('#find_username').bgiframe();
});
return false;
}
$('#find_user').click(function(){
return find_username('username');
});
$('#find_username').jqm({toTop: true});
});
//]]>
</script>
<!-- END switch_mod_option -->
a++
Dernière édition par Milouze14 le Lun 23 Nov 2020 - 17:48, édité 1 fois
Invité- Invité
Re: Récupérer une valeur d'un champs et ajout au template groupcp_info_body
Trop cool merciiiii mais...ça ne marche pas
J'ai bien le dollars qui apparaît, un petit "patientez" qui apparaît quelques secondes, mais la valeur ne s'affiche pas
J'ai bien le dollars qui apparaît, un petit "patientez" qui apparaît quelques secondes, mais la valeur ne s'affiche pas
Re: Récupérer une valeur d'un champs et ajout au template groupcp_info_body
Re,
il aurait peut être fallut donner le template profile_view_body .
J'ai édité mon message pour le template que je viens de te donner .
a++
il aurait peut être fallut donner le template profile_view_body .
J'ai édité mon message pour le template que je viens de te donner .
a++
Invité- Invité
Re: Récupérer une valeur d'un champs et ajout au template groupcp_info_body
Ouupsyyy, c'était sans doute plus intelligent effectivement ! Milles excuses
- 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="forumline tprof" width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
<tr>
<th class="tprof-name" colspan="3" nowrap="nowrap" height="25"><h1 class="h_member">{USERNAME}</h1><span class="bigh_member">{USERNAME}</span><div class="tprof-rang">{POSTER_RANK}</div></th>
</tr>
<tr>
<td width="280"><div class="tprof-infocompte"><span class="tprof-profile-field"><span>Connexion</span> : <div class="field_uneditable">{LAST_VISIT_TIME}</div></span></div><div class="tprof-contact"><!-- BEGIN contact_field -->{contact_field.CONTENT}<!-- END contact_field --></div></td>
<td><div class="tprof-contentg"><div class="tprof-ava"><span id="avatar_membre">{AVATAR_IMG}</span></div></div>
</td>
<td><div class="tprof-minibadges"></div><div class="tprof-info-perso mCustomScrollbar" data-mcs-theme="rounded-dark"><div class="tprof-badges"></div><div class="tprof-lifestyle"></div>
<!-- BEGIN profile_field --><span class="tprof-profile-field" id="field_id{profile_field.ID}">{profile_field.LABEL} {profile_field.CONTENT}</span><!-- END profile_field --></div></td>
</tr>
<tr><td colspan="3"><div class="content-badgprof"></div></td>
</tr>
<tr><td colspan="3" class="link">{FRIENDSFOES}
<a rel="nofollow" class="genmed" href="/sta/{PUSERNAME}">{L_TOPICS}</a>
<a rel="nofollow" class="genmed" href="/spa/{PUSERNAME}">{L_POSTS}</a>
{ADMINISTRATE_USER}{BAN_USER}</td>
</tr>
</table>
<br />
<script src="{JQUERY_ROOT}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>
Re: Récupérer une valeur d'un champs et ajout au template groupcp_info_body
Re,
remplaces alors le template que j'ai modifié par ce contenu:
a++
remplaces alors le template que j'ai modifié par ce contenu:
- Code:
<form action="{S_GROUPCP_ACTION}" method="post">
<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="4">
<tr>
<th class="thHead" colspan="7" height="25"><h1 class="pagetitle">{L_GROUP_INFORMATION}</h1></th>
</tr>
<tr>
<td class="row1" width="20%"><span class="gen">{L_GROUP_NAME}:</span></td>
<td class="row2"><span class="gen"><strong>{GROUP_NAME}</strong></span></td>
</tr>
<tr>
<td class="row1" width="20%"><span class="gen">{L_GROUP_DESC}:</span></td>
<td class="row2"><span class="gen">{GROUP_DESC}</span></td>
</tr>
<tr>
<td class="row1" width="20%"><span class="gen">{L_GROUP_MEMBERSHIP}:</span></td>
<td class="row2">
<span class="gen">{GROUP_DETAILS}
<!-- BEGIN switch_subscribe_group_input -->
<input class="mainoption" type="submit" name="joingroup" value="{L_JOIN_GROUP}" />
<!-- END switch_subscribe_group_input -->
<!-- BEGIN switch_unsubscribe_group_input -->
<input class="mainoption" type="submit" name="unsub" value="{L_UNSUBSCRIBE_GROUP}" />
<!-- END switch_unsubscribe_group_input -->
</span>
</td>
</tr>
<!-- BEGIN switch_mod_option -->
<tr>
<td class="row1" width="20%"><span class="gen">{L_GROUP_TYPE}:</span></td>
<td class="row2">
<span class="gen"><input type="radio" name="group_type" value="{S_GROUP_OPEN_TYPE}" {S_GROUP_OPEN_CHECKED}{S_GROUP_OPEN_DISABLED} />{L_GROUP_OPEN} <input type="radio" name="group_type" value="{S_GROUP_CLOSED_TYPE}" {S_GROUP_CLOSED_CHECKED} /> {L_GROUP_CLOSED} <input type="radio" name="group_type" value="{S_GROUP_HIDDEN_TYPE}" {S_GROUP_HIDDEN_CHECKED} />{L_GROUP_HIDDEN} <input class="mainoption" type="submit" name="groupstatus" value="{L_UPDATE}" /></span>
</td>
</tr>
<!-- END switch_mod_option -->
</table>
{S_HIDDEN_FIELDS}
</form>
<script>
$(function(){
$('a.M14_L_USERNAME').each(function(){
var $this=$(this).closest('tr').find('.M14_valeur');
var link=$(this).attr('href');
$.get(link , function(data){
var h= $(data).find('span[id="field_id-13"] .field_uneditable').text();
$this.text(h);
});});});
</script>
<form action="{S_GROUPCP_ACTION}" method="post" name="post">
<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="4">
<tr>
<th class="thCornerL" height="25" nowrap="nowrap">{L_PM}</th>
<th class="thTop" nowrap="nowrap">{L_USERNAME}</th>
<th class="thTop" nowrap="nowrap">{L_POSTS}</th>
<th class="thTop" nowrap="nowrap">Dollars</th>
<th class="thTop" nowrap="nowrap">{L_EMAIL}</th>
<th class="thTop" nowrap="nowrap">{L_WEBSITE}</th>
<th class="thCornerR" nowrap="nowrap">{L_SELECT}</th>
</tr>
<tr>
<td class="catSides" colspan="8" height="28"><span class="cattitle">{L_GROUP_MODERATOR}</span></td>
</tr>
<tr>
<td class="row1" align="center">{MOD_PM_IMG}</td>
<td class="row1" align="center"><span class="gen"><a class="gen M14_L_USERNAME" href="{U_MOD_VIEWPROFILE}">{MOD_USERNAME}</a></span></td>
<td class="row1" align="center" valign="middle"><span class="gen">{MOD_POSTS}</span></td>
<td class="row1" align="center" valign="middle"><span class="gen M14_valeur">Patientez</span></td>
<td class="row1" align="center" valign="middle"><span class="gen">{MOD_EMAIL_IMG}</span></td>
<td class="row1" align="center">{MOD_WWW_IMG}</td>
<td class="row1" align="center"> </td>
</tr>
<tr>
<td class="catSides" colspan="8" height="28"><span class="cattitle">{L_GROUP_MEMBERS}</span></td>
</tr>
<!-- BEGIN member_row -->
<tr>
<td class="{member_row.ROW_CLASS}" align="center">{member_row.PM_IMG}</td>
<td class="{member_row.ROW_CLASS}" align="center"><span class="gen"><a class="gen M14_L_USERNAME" href="{member_row.U_VIEWPROFILE}">{member_row.USERNAME}</a></span></td>
<td class="{member_row.ROW_CLASS}" align="center"><span class="gen">{member_row.POSTS}</span></td>
<td class="{member_row.ROW_CLASS}" align="center"><span class="gen M14_valeur"></span></td>
<td class="{member_row.ROW_CLASS}" align="center" valign="middle"><span class="gen">{member_row.EMAIL_IMG}</span></td>
<td class="{member_row.ROW_CLASS}" align="center">{member_row.WWW_IMG}</td>
<td class="{member_row.ROW_CLASS}" align="center"><!-- BEGIN switch_mod_option --><input type="checkbox" name="members[]" value="{member_row.USER_ID}" /><!-- END switch_mod_option --></td>
</tr>
<!-- END member_row -->
<!-- BEGIN switch_no_members -->
<tr>
<td class="row1" colspan="7" align="center"><span class="gen">{L_NO_MEMBERS}</span></td>
</tr>
<!-- END switch_no_members -->
<!-- BEGIN switch_hidden_group -->
<tr>
<td class="row1" colspan="7" align="center"><span class="gen">{L_HIDDEN_MEMBERS}</span></td>
</tr>
<!-- END switch_hidden_group -->
<!-- BEGIN switch_mod_option -->
<!-- BEGIN switch_grp_admin -->
<tr>
<td class="row2" colspan="8" align="left">
<strong><span class="gen">{L_ADMIN_GRP_EXPLAIN}</span></strong>
</td>
</tr>
<!-- END switch_grp_admin -->
<tr>
<td class="catBottom" colspan="8" align="right">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="left" valign="top">
<span class="genmed"><input class="post" type="text" id="username" name="username" size="20" maxlength="25" /> <input class="mainoption" type="submit" name="add" value="{L_ADD_MEMBER}" /> <input type="button" class="liteoption" id="find_user" value="{L_FIND_USERNAME}" /></span>
</td>
<td><span class="cattitle"><input class="mainoption" type="submit" name="remove" value="{L_REMOVE_SELECTED}" /></span></td>
</tr>
</table>
</td>
</tr>
<!-- END switch_mod_option -->
</table>
<table width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td align="left" valign="top"><span class="nav">{PAGE_NUMBER}</span></td>
<td align="right" valign="top"><span class="nav">{PAGINATION}</span></td>
</tr>
<tr>
<td>
{PENDING_USER_BOX}{S_HIDDEN_FIELDS}
</td>
</tr>
</table>
</form>
<table width="100%" border="0" cellspacing="2" align="center">
<tr>
<td align="right" valign="top">{JUMPBOX}</td>
</tr>
</table>
<!-- BEGIN switch_mod_option -->
<div id="find_username" class="jqmWindow"></div>
<script src="{JQUERY_DIR}jqmodal/jqmodal.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){
function find_username(fieldname) {
$.get('{U_SEARCH_USER}&fieldname=' + fieldname + '&time=' + timestamp(), '',
function(data){
$('#find_username').html(data).jqmShow();
$('.jqmOverlay').bgiframe();
$('#find_username').bgiframe();
});
return false;
}
$('#find_user').click(function(){
return find_username('username');
});
$('#find_username').jqm({toTop: true});
});
//]]>
</script>
<!-- END switch_mod_option -->
a++
Invité- Invité
Re: Récupérer une valeur d'un champs et ajout au template groupcp_info_body
Merciiiii, c'est niquel ça marche bien
J'ai simplement du c/c dans la partie membre, parce que ça marchait que pour les Modo et non les membres. Mais c'est réglé.
Je met le code final pour les autres si besoin
J'ai simplement du c/c dans la partie membre, parce que ça marchait que pour les Modo et non les membres. Mais c'est réglé.
Je met le code final pour les autres si besoin
- Code:
<form action="{S_GROUPCP_ACTION}" method="post">
<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="4">
<tr>
<th class="thHead" colspan="7" height="25"><h1 class="pagetitle">{L_GROUP_INFORMATION}</h1></th>
</tr>
<tr>
<td class="row1" width="20%"><span class="gen">{L_GROUP_NAME}:</span></td>
<td class="row2"><span class="gen"><strong>{GROUP_NAME}</strong></span></td>
</tr>
<tr>
<td class="row1" width="20%"><span class="gen">{L_GROUP_DESC}:</span></td>
<td class="row2"><span class="gen">{GROUP_DESC}</span></td>
</tr>
<tr>
<td class="row1" width="20%"><span class="gen">{L_GROUP_MEMBERSHIP}:</span></td>
<td class="row2">
<span class="gen">{GROUP_DETAILS}
<!-- BEGIN switch_subscribe_group_input -->
<input class="mainoption" type="submit" name="joingroup" value="{L_JOIN_GROUP}" />
<!-- END switch_subscribe_group_input -->
<!-- BEGIN switch_unsubscribe_group_input -->
<input class="mainoption" type="submit" name="unsub" value="{L_UNSUBSCRIBE_GROUP}" />
<!-- END switch_unsubscribe_group_input -->
</span>
</td>
</tr>
<!-- BEGIN switch_mod_option -->
<tr>
<td class="row1" width="20%"><span class="gen">{L_GROUP_TYPE}:</span></td>
<td class="row2">
<span class="gen"><input type="radio" name="group_type" value="{S_GROUP_OPEN_TYPE}" {S_GROUP_OPEN_CHECKED}{S_GROUP_OPEN_DISABLED} />{L_GROUP_OPEN} <input type="radio" name="group_type" value="{S_GROUP_CLOSED_TYPE}" {S_GROUP_CLOSED_CHECKED} /> {L_GROUP_CLOSED} <input type="radio" name="group_type" value="{S_GROUP_HIDDEN_TYPE}" {S_GROUP_HIDDEN_CHECKED} />{L_GROUP_HIDDEN} <input class="mainoption" type="submit" name="groupstatus" value="{L_UPDATE}" /></span>
</td>
</tr>
<!-- END switch_mod_option -->
</table>
{S_HIDDEN_FIELDS}
</form>
<script>
$(function(){
$('a.M14_L_USERNAME').each(function(){
var $this=$(this).closest('tr').find('.M14_valeur');
var link=$(this).attr('href');
$.get(link , function(data){
var h= $(data).find('span[id="field_id-13"] .field_uneditable').text();
$this.text(h);
});});});
</script>
<form action="{S_GROUPCP_ACTION}" method="post" name="post">
<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="4">
<tr>
<th class="thCornerL" height="25" nowrap="nowrap">{L_PM}</th>
<th class="thTop" nowrap="nowrap">{L_USERNAME}</th>
<th class="thTop" nowrap="nowrap">{L_POSTS}</th>
<th class="thTop" nowrap="nowrap">Dollars</th>
<th class="thTop" nowrap="nowrap">{L_EMAIL}</th>
<th class="thTop" nowrap="nowrap">{L_WEBSITE}</th>
<th class="thCornerR" nowrap="nowrap">{L_SELECT}</th>
</tr>
<tr>
<td class="catSides" colspan="8" height="28"><span class="cattitle">{L_GROUP_MODERATOR}</span></td>
</tr>
<tr>
<td class="row1" align="center">{MOD_PM_IMG}</td>
<td class="row1" align="center"><span class="gen"><a class="gen M14_L_USERNAME" href="{U_MOD_VIEWPROFILE}">{MOD_USERNAME}</a></span></td>
<td class="row1" align="center" valign="middle"><span class="gen">{MOD_POSTS}</span></td>
<td class="row1" align="center" valign="middle"><span class="gen M14_valeur">Patientez</span></td>
<td class="row1" align="center" valign="middle"><span class="gen">{MOD_EMAIL_IMG}</span></td>
<td class="row1" align="center">{MOD_WWW_IMG}</td>
<td class="row1" align="center"> </td>
</tr>
<tr>
<td class="catSides" colspan="8" height="28"><span class="cattitle">{L_GROUP_MEMBERS}</span></td>
</tr>
<!-- BEGIN member_row -->
<tr>
<td class="{member_row.ROW_CLASS}" align="center">{member_row.PM_IMG}</td>
<td class="{member_row.ROW_CLASS}" align="center"><span class="gen"><a class="gen M14_L_USERNAME" href="{member_row.U_VIEWPROFILE}">{member_row.USERNAME}</a></span></td>
<td class="{member_row.ROW_CLASS}" align="center"><span class="gen">{member_row.POSTS}</span></td>
<td class="{member_row.ROW_CLASS}" align="center"><span class="gen M14_valeur"></span></td>
<td class="{member_row.ROW_CLASS}" align="center" valign="middle"><span class="gen">{member_row.EMAIL_IMG}</span></td>
<td class="{member_row.ROW_CLASS}" align="center">{member_row.WWW_IMG}</td>
<td class="{member_row.ROW_CLASS}" align="center"><!-- BEGIN switch_mod_option --><input type="checkbox" name="members[]" value="{member_row.USER_ID}" /><!-- END switch_mod_option --></td>
</tr>
<!-- END member_row -->
<!-- BEGIN switch_no_members -->
<tr>
<td class="row1" colspan="7" align="center"><span class="gen">{L_NO_MEMBERS}</span></td>
</tr>
<!-- END switch_no_members -->
<!-- BEGIN switch_hidden_group -->
<tr>
<td class="row1" colspan="7" align="center"><span class="gen">{L_HIDDEN_MEMBERS}</span></td>
</tr>
<!-- END switch_hidden_group -->
<!-- BEGIN switch_mod_option -->
<!-- BEGIN switch_grp_admin -->
<tr>
<td class="row2" colspan="8" align="left">
<strong><span class="gen">{L_ADMIN_GRP_EXPLAIN}</span></strong>
</td>
</tr>
<!-- END switch_grp_admin -->
<tr>
<td class="catBottom" colspan="8" align="right">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="left" valign="top">
<span class="genmed"><input class="post" type="text" id="username" name="username" size="20" maxlength="25" /> <input class="mainoption" type="submit" name="add" value="{L_ADD_MEMBER}" /> <input type="button" class="liteoption" id="find_user" value="{L_FIND_USERNAME}" /></span>
</td>
<td><span class="cattitle"><input class="mainoption" type="submit" name="remove" value="{L_REMOVE_SELECTED}" /></span></td>
</tr>
</table>
</td>
</tr>
<!-- END switch_mod_option -->
</table>
<table width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td align="left" valign="top"><span class="nav">{PAGE_NUMBER}</span></td>
<td align="right" valign="top"><span class="nav">{PAGINATION}</span></td>
</tr>
<tr>
<td>
{PENDING_USER_BOX}{S_HIDDEN_FIELDS}
</td>
</tr>
</table>
</form>
<table width="100%" border="0" cellspacing="2" align="center">
<tr>
<td align="right" valign="top">{JUMPBOX}</td>
</tr>
</table>
<!-- BEGIN switch_mod_option -->
<div id="find_username" class="jqmWindow"></div>
<script src="{JQUERY_DIR}jqmodal/jqmodal.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){
function find_username(fieldname) {
$.get('{U_SEARCH_USER}&fieldname=' + fieldname + '&time=' + timestamp(), '',
function(data){
$('#find_username').html(data).jqmShow();
$('.jqmOverlay').bgiframe();
$('#find_username').bgiframe();
});
return false;
}
$('#find_user').click(function(){
return find_username('username');
});
$('#find_username').jqm({toTop: true});
});
//]]>
</script>
<!-- END switch_mod_option -->
Re: Récupérer une valeur d'un champs et ajout au template groupcp_info_body
Re,
de rien Exotic .
a++
de rien Exotic .
a++
Invité- Invité
Sujets similaires
» Récupérer la valeur d'un champ
» Récupérer la valeur d'un champ
» Template et ajout de balise BBcode
» Récupérer la valeur du système de points
» Modif template => retour à la Valeur Actuelle
» Récupérer la valeur d'un champ
» Template et ajout de balise BBcode
» Récupérer la valeur du système de points
» Modif template => retour à la Valeur Actuelle
Forum gratuit : Le forum des forums actifs :: Entraide & Support... :: Problème avec un script, un code :: Archives des problèmes avec un code
Page 1 sur 1
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum