By Julian on Thursday, 06 July 2017
Posted in General Issues
Replies 7
Likes 0
Views 227
Votes 0
Hi everybody,

I would like to show all users of a certain usergroup (or all users with a certain badge, to keep it inside of ES).
How can I achieve that?

All the best, Julian!
You can use this following method to get certain badge for those achievers.


$model = ES::model('badges');
$achievers = $model->getAchievers('$badgeId');
·
Thursday, 06 July 2017 10:18
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex,

thank you for the quick answer. Unfortunatelly, I don´t know where to place that code.
Is it meant to be put in the code of the module? In that case, is there a way to built it up so it´s not overwritten by each update?

All the best, Julian!
·
Thursday, 06 July 2017 10:22
·
0 Likes
·
0 Votes
·
0 Comments
·
You're welcome, perhaps you can elaborate more details where you would like to show those user on the page?
·
Thursday, 06 July 2017 10:56
·
0 Likes
·
0 Votes
·
0 Comments
·
In the core it´s really just showing users of a usergroup in the module.

The whole think looks like this:
I have a membership-site (payplans) and want to show all users that subscribed to the membership on the salespage for social proof. All members are in a special usergroup and they all have applied a ES-Batch as soon as the signed up for the membership.

So I need to somehow limit the users-module to show only users with the badge OR users of one usergroup.
In fact, the usergroup would be a little bit more usefull because it would be more flexible. However, I can work with bouth of it.

Important: I also use the module on other parts of my page with normal content (online-users), so this filter should not apply to all modules of that kind, only to one of them.

All the best, Julian!
·
Thursday, 06 July 2017 11:04
·
0 Likes
·
0 Votes
·
0 Comments
·
Try download my attached those patch files then replace into this following file location.
JoomlaFolder/modules/mod_easysocial_users/mod_easysocial_users.php
JoomlaFolder/modules/mod_easysocial_users/mod_easysocial_users.xml


Once you replaced the file, you have to set that filter to "badge" and set your certain badge id, you can refer on my attached screenshot below.

Note : before you replace the file you have to backup your original file, in case it won't work.
·
Thursday, 06 July 2017 13:11
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex,

great, thank you.
Will this be added in the official distribution also or do I have to make it "update-proof" somehow?

All the best, Julian!
·
Friday, 07 July 2017 08:14
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

This will not be included on our next release. You are required to do backup on this files and replace it when you have made any update/upgrade on future release version. Thanks for your understanding
·
Friday, 07 July 2017 16:41
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post