Jump to content

Code for Pilot Gorups?


Kyle

Recommended Posts

<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>

  • Like 1
Link to comment
Share on other sites

  • Moderators

ok nightfox, That's the one. Thanks!! :D

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!! :D

Link to comment
Share on other sites

Guest lorathon

What exactly are you trying to do. Using the code I gave will fill $usergroups with the usergroups that are attached to the pilotid that is feed into the function.

To see what is inside

$usergroups = PilotData::getPilotGroups($pilotid);
print_r($usergroups);

To Get your own

$mygroups = PilotData::getPilotGroups(AUTH::$userinfo->pilotid);
print_r($mygroups);

Once filled you can use the $usergroups array to see what groups a pilot is a member of.

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...