By Fagault Eric on Tuesday, 29 August 2017
Replies 6
Likes 0
Views 1.9K
Votes 0
Hello,
Following the previous ticket, I did this to display the list of friends in invit.php

I am looking for but can not do that when you click on the "Invite" button, the invitation is sent to the person concerned.

<?php
//Code à ajouter aux fichiers invit.php
$id = $this->input->get('userid', null, 'int');
$user = ES::user($id);
$model = ES::model('Friends');
$options = array('state' => SOCIAL_FRIENDS_STATE_FRIENDS , 'limit' => 2000);
$friends = $model->getFriends($user->id, $options);
// print_r ($friends);
?>
<?php
foreach ($friends as $element) {
{
$iduser = $element->id;
$idusername = $element->username;
$fid=ES::user($iduser);
}
?>
<div style="float:left;height:80px;width:100%;border-bottom:solid 1px #d2d2d2">
<div style="margin:10px;float:left"><?php echo '<img src="' . $fid->getAvatar() . '" />'; ?> </div>
<div style="color:#000;font-weight:700;margin:5px 0px"><?php echo $idusername;?> </div>
<div><?php echo $fid->getFieldValue('gender');?> </div>
<div style="float:left;color:#9e9e9e;"><?php echo $fid->getFieldValue('ADDRESS');?> </div>
<div style="margin-left:350px;margin-top:-25px">
<button data-invite-button type="button" class="btn btn-sm btn-es-primary"><?php echo "Inviter"; ?></button>
</div>
</div>
<?php
}
?>



How should I do this?

Best regards.

Eric
Hey there,

I am really sorry but unfortunately we cannot accommodate your request currently as it is quite difficult and beyond our support scope's policy as outlined in http://stackideas.com/support

Having said that, if you require us to perform the customization for you, you can always request for a quote from us at https://crm.stackideas.com and select "Customizations" . Our sales person would be glad to send you a quote for the customizations that you have requested.
·
Tuesday, 29 August 2017 15:45
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,
Thank you for your reply.
Too bad. Because the method of inviting members to love a page, join a group, participate in an event, is not ergonomic at all and difficult to use, that's why I thought I would propose the list of Friends to invite these friends in turn without being obliged to remember their username, which seems complicated.
This also increases user interaction.

Best regards.

Eric Fagault
·
Tuesday, 29 August 2017 16:08
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Eric for your understanding, I've move this ticket to tutorial perhaps there is other is interested on contribute the codes. Or perhaps, you can submit for feature request so our developers can keep eyes on the feature that might be implement in the future release
·
Tuesday, 29 August 2017 19:08
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,
I started working on this idea, I arrive at a result that works, even if it is to improve.

If anyone is interested, we can work together.

See in screenshots, how does my window of invitations to groups, pages, events

Best regards.

Eric
·
Monday, 26 November 2018 23:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,
In the code I mof = dified on the files invit.php I have this:


$id = $this->input-> get ('userid', null, 'int');
$user = ES::user($id);
$model = ES::model ('Friends');
$options = array ('state' => SOCIAL_FRIENDS_STATE_FRIENDS, 'limit' => 100);
$friends = $model-> getFriends ($user-> id, $options);


The limit is 100 but I want to know how to get a random result to not always have the same 100 members,
Also, how to display only the friends of the member who makes these invitations?

Best regards.

Eric
·
Monday, 26 November 2018 23:24
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post