By benjamin beaugh on Monday, 19 October 2015
Likes 0
Views 813
Votes 0
Hi guys! Im working on a little custom module that shows all the groups and some information relative to that group. Im stuck at using a few of the api calls that i cant find documentation for.

Please have a look at my test site. http://www.lf1m.org/lf1mtest

<?
require_once( JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/foundry.php' );?>
<div align="center">
<a data-spotlight="effect:left;" href="http://www.lf1m.org/lf1mtest/index.php/starflight-venture-cooperative">
<img src="<? echo Foundry::group('2')->getAvatar();?>" align="center" width="180" height="180" alt="" />
<div class="overlay"><? echo "<h2 align='center'>" . Foundry::group( '2' )->getTotalMembers() ." Members</h2>" . Foundry::group( '2' )->getName() . "<br><h4>Star Citizen</h4>";?>
</div>
</a>



i would like this script to run and populate with all the groups.

would like to grab the url to the group
having trouble with grabbing the category name
having trouble with getting the large avatar

and im not sure how to cycle through all the available groups.


any help here would be greatly appreciated!
Benjamin
Hello Benjamin,

You might want to try this:

$model = FD::model('Groups');
$groups = $model->getGroups();

foreach ($groups as $group) {

$gr = FD::group($group->id);
echo $gr->getPermalink();
echo $gr->getCategory()->title;
echo $gr->getAvatar('large');
}


This will get all the groups and cycle through them to get the details. By the way, we can't further help you on this customization as this is out of our support policy. You might want to refer module Easysocial Groups.
·
Monday, 19 October 2015 12:39
·
0 Likes
·
0 Votes
·
0 Comments
·
thank you Nik!!
i realize this is out of the scope of support, but this is what sets you guys above and beyond support from other developers.
I was able to accomplish what i was trying to do with your help
thanks again!
Benjamin
·
Tuesday, 20 October 2015 05:54
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Benjamin,

You're welcome.
·
Tuesday, 20 October 2015 10:50
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post