By Fagault Eric on Thursday, 03 May 2018
Replies 8
Likes 0
Views 1.2K
Votes 0
Hello,

Inviting friends to like pages or join groups is not very ergonomic.

Do not you think that it would be better if a list of his friends was displayed (Avatar + Username) with a button "Invite", because it is not easy to enter the name of each of the friends that you want invite.

It certainly would also, more commitment.

What do you think ?

Best regards.

Eric
That sound a good idea Eric. Perhaps, can you create a new ticket for this under feature request so that our developer can keep track feature that can be implement in the future release
·
Thursday, 03 May 2018 16:42
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,
It is what I am going to do.
For my part, I started to think about it.
Here's what I do:


<?php
$id = $this->input->get('userid', null, 'int');
$user = ES::user($id);
$model = ES::model('Friends');
$options = array('state' => SOCIAL_FRIENDS_STATE_FRIENDS , 'limit' => 200);
$friends = $model->getFriends($user->id, $options);
// print_r ($friends);
?>
<?php
foreach ($friends as $element) {
{
$iduser = $element->id;
$idusername = $element->username;
$fid=ES::user($iduser);
}
?>

<form data-group-invite-form method="post" action="<?php echo JRoute::_('index.php');?>">

<div>
<div style="margin:10px;width:64px"><?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="color:#9e9e9e;"><?php echo $fid->getFieldValue('ADDRESS');?> </div>

<!-- Récupérer ici le username -->
<div style="float=right">
<input type="checkbox" id="invit" name="invit" value="<?php echo $idusername;?> ">
<!-- Si checkbox est ok envoyer le value dans l'input "class="textboxlist controls disabled t-lg-mt--xl"" du formulaire ci dessous -->
</div>
</div>
</form>
<?php } ?>


I would now have to recover the value of the checkbox so that this value (When the checkbox is checked) comes to enrich:

<input type = "text" disabled autocomplete = "off" class = "participants textboxlist-textField" ...

What do you think ?

Best regards.

Eric.
·
Thursday, 03 May 2018 17:51
·
0 Likes
·
0 Votes
·
0 Comments
·
That's is cool Eric I've move this to tutorial perhaps others would interested with this as well
·
Thursday, 03 May 2018 19:11
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you but it's not over, I must now find how to inject the username into the entry "text" (when the box is checked).
·
Thursday, 03 May 2018 19:50
·
0 Likes
·
0 Votes
·
0 Comments
·
+1
·
Monday, 11 June 2018 16:31
·
0 Likes
·
0 Votes
·
0 Comments
·
+1
·
Friday, 20 July 2018 11:31
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,
I have not had time to look into it for a long time, I'll get back to it soon.
Best regards.
Eric
·
Friday, 20 July 2018 15:20
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post