From what I understand from your first post, and If i’m not wrong, you are getting the ID displayed on the Crew Center but not on the Landing page correct?
I haven’t done this before, but try out the REST API.
I do not understand what are you trying to show. Could you please explain to us? In the above code that you pasted you do not use the getPilotCode function anywhere.
Well since, I am on my school computer… Anyways, I am trying to display, pilot id + pilot’s avatar, on all pages, it only shows up in pilot center, im making a profile page where they can change pass avatar etc., im not using the default phpvms, fully customizing it by hand, and unable to use bootstrap… Hope htisanwers someones question!
I might be wrong, but it displays on all pages, when logged in!
This is the entire code in the default crystal skin:
<?php
/*
Quick example of how to see if they're logged in or not
Only show this login form if they're logged in */
if(Auth::LoggedIn() == false)
{ ?>
<form name="loginform" action="<?php echo url('/login'); ?>" method="post">
Sign-in with your pilot id or email, or <a href="<?php echo url('/registration'); ?>">register</a><br />
<input type="text" name="email" value="" onClick="this.value=''" />
<input type="password" name="password" value="" />
<input type="hidden" name="remember" value="on" />
<input type="hidden" name="redir" value="index.php/profile" />
<input type="hidden" name="action" value="login" />
<input type="submit" name="submit" value="Log In" />
</form>
<?php
}
/* End the Auth::LoggedIn() if */
else /* else - they're logged in, so show some info about the pilot, and a few links */
{
/* Auth::$userinfo has the information about the user currently logged in
We will use this next line - this gets their full pilot id, formatted properly */
$pilotid = PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid);
?>
<img align="left" height="50px" width="50px" style="margin-right: 10px;"
src="<?php echo PilotData::getPilotAvatar($pilotid);?>" />
<strong>Pilot ID: </strong> <?php echo $pilotid ; ?>
<strong>Rank: </strong><?php echo Auth::$userinfo->rank;?><br />
<strong>Total Flights: </strong><?php echo Auth::$userinfo->totalflights?>, <strong>Total Hours: </strong><?php echo Auth::$userinfo->totalhours;?>
<br />
<a href="<?php echo url('/pireps/new');?>">File a New PIREP</a> |
<a href="<?php echo url('/schedules/bids');?>">View My Bids</a> |
<a href="<?php echo url('/profile/');?>">View Pilot Center</a>
<?php
} /* End the else */
?>
That will show you exactly what is in the screen shot WHEN they login! There might be some additional code in there, not sure. And you can edit it for ONLY what you want show!
I might be wrong, but it displays on all pages, when logged in!
This is the entire code in the default crystal skin:
<?php
/*
Quick example of how to see if they're logged in or not
Only show this login form if they're logged in */
if(Auth::LoggedIn() == false)
{ ?>
<form name="loginform" action="<?php echo url('/login'); ?>" method="post">
Sign-in with your pilot id or email, or <a href="<?php echo url('/registration'); ?>">register</a><br />
<input type="text" name="email" value="" onClick="this.value=''" />
<input type="password" name="password" value="" />
<input type="hidden" name="remember" value="on" />
<input type="hidden" name="redir" value="index.php/profile" />
<input type="hidden" name="action" value="login" />
<input type="submit" name="submit" value="Log In" />
</form>
<?php
}
/* End the Auth::LoggedIn() if */
else /* else - they're logged in, so show some info about the pilot, and a few links */
{
/* Auth::$userinfo has the information about the user currently logged in
We will use this next line - this gets their full pilot id, formatted properly */
$pilotid = PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid);
?>
<img align="left" height="50px" width="50px" style="margin-right: 10px;"
src="<?php echo PilotData::getPilotAvatar($pilotid);?>" />
<strong>Pilot ID: </strong> <?php echo $pilotid ; ?>
<strong>Rank: </strong><?php echo Auth::$userinfo->rank;?><br />
<strong>Total Flights: </strong><?php echo Auth::$userinfo->totalflights?>, <strong>Total Hours: </strong><?php echo Auth::$userinfo->totalhours;?>
<br />
<a href="<?php echo url('/pireps/new');?>">File a New PIREP</a> |
<a href="<?php echo url('/schedules/bids');?>">View My Bids</a> |
<a href="<?php echo url('/profile/');?>">View Pilot Center</a>
<?php
} /* End the else */
?>
That will show you exactly what is in the screen shot WHEN they login! There might be some additional code in there, not sure. And you can edit it for ONLY what you want show!