Code for Pilot Gorups?

Hey guys, I’m not sure how it is coded to tell what groups is the pilot in.

So if anyone could tell me the php codes to display what groups is the pilot in please and I’ll would give you 1+ rep. Thanks!

<li><strong>Group: </strong><?php echo $userinfo->group; ?></li>

You will need to add two rows to the pilots table: groupid and group. You will have to manually insert the group names and id’s in for it to work, but the code does work. That was in the pilot_public_profile. The pilots_list code is:

<td><?php echo $pilot->group;?></td>
1 Like

ok nightfox, That’s the one. Thanks!!

and lorathon, I see why it isn’t working becasue It’s not getting the pilot’s group info, so with the code you pasted in, where do I put it in? In the commons or the modules?

Thanks alot guys for helping!!

Ummm, I still don’t see the groups, I’m not sure what am I supposed to do with that code that lorathan gave me?

Ok, sorry, I’m still a noob for getting data, I’m trying to learn.

What I am excatily I’m doing is that i am trying to get the info from the Admin in the groups to show what groups is the pilot in, are they in Admin?, Are they in Executive VP, Fleet or Active Pilots?

I hope that clears up, and I’ll tell you what I did,

I went into the profile.php and added a line of a code for profile public function

and here’s how i added…

$this->set('group', PilotData::GetPilotGroups($pilotid));

So on, for the profile_main.tpl, I added the php echo like this…

<?php echo $group; ?>

I can tell I’m doing something wrong between the profile.php and the profile_main.tpl.

Ahh ok, Now I got it. I forgot for the foreach thing. Thanks for your help there lorathon!!!

Cheers!!!

Hey, how would I show the pilots Group in their signature?

Would it be something like:

$output[] = 'Postition: ' . $pilot->group;

Thanks

James