By Fagault Eric on Wednesday, 28 November 2018
Posted in General
Likes 0
Views 439
Votes 0
Hello,

I think it might interest a lot of users.

I edit the invit.php files for groups, pages, and events to present the member's friends as a list.
I have limited this list to 100 items.
I would like to get a random list so that I never have the same items.
How can I do ?
Where is the list generated?

Also, with what I did, when we check the box of the member to initer (see the screen copy) must choose from a list, how to avoid this step after you??

Best regards.

Eric
I edit the invit.php files for groups, pages, and events to present the member's friends as a list.
I have limited this list to 100 items.
I would like to get a random list so that I never have the same items.
How can I do ?
Where is the list generated?

In order to achieve this, it need to modify the SQL query from the Easysocial core model file JoomlaFolder/administrator/components/com_easysocial/models/friends.php .

Also, with what I did, when we check the box of the member to initer (see the screen copy) must choose from a list, how to avoid this step after you??

I am still a little bit lost here, can you elaborate more details regarding this question?
·
Wednesday, 28 November 2018 19:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Arlex,
Thank you for your answers.

1) Which line is this query?

2) Regarding the check box that I created, the check sends the user's name as if it had been entered as originally planned in invit.php (your original) I'm looking for to ensure that the name of the user is recovered without poroposer of choice. (This is what happens if the user's name is identically contained in the string of another user's name).
best regards.
Eric
·
Wednesday, 28 November 2018 19:26
·
0 Likes
·
0 Votes
·
0 Comments
·
You can try take a look of my attached screenshot below.

JoomlaFolder/templates/protostar/html/com_easysocial/groups/dialogs/invite.php
[gist type="php"]
$options = array('state' => SOCIAL_FRIENDS_STATE_FRIENDS , 'limit' => 100, 'randomSort' => true);
[/gist]


JoomlaFolder/administrator/components/com_easysocial/models/friends.php
[gist type="php"]
$randomSort = isset($options['randomSort']) && $options['randomSort'] ? $options['randomSort'] : '';

if ($sort != 'lastseen' && $randomSort) {
$query[] = 'order by rand()';
}
[/gist]

2) Regarding the check box that I created, the check sends the user's name as if it had been entered as originally planned in invit.php (your original) I'm looking for to ensure that the name of the user is recovered without proposer of choice. (This is what happens if the user's name is identically contained in the string of another user's name).

Actually i still get it what you trying to achieve here, when i click on it, it will show me the suggestion name https://www.screencast.com/t/cuc5TkqrJN1 , is it you purposely you would like check this when user click on that checkbox?
·
Thursday, 29 November 2018 10:53
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you very much
·
Friday, 30 November 2018 01:06
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome.

Just for your information, I have locked and marked this thread as resolved to avoid confusions in the future. Please start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiries.

Thanks for understanding.
·
Friday, 30 November 2018 10:12
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post