Thomas Posted July 1, 2010 Report Share Posted July 1, 2010 Hey Guys, So, If you go into your admin panel where you can create custom fields you can mirror them so they show on your pilots_list.tpl, So if i made a field called "Vatsim ID" and I used this code; <?php echo PilotData::GetFieldValue($pilot->pilotid, 'Vatsim ID'); ?> It would show on my Pilot Roser/List. However, I was messing around and wondering if their is any way I can make it so I can have a custom field on my pilot_public_profile.tpl page without using the following code; <?php // Show the public fields if($allfields) { foreach($allfields as $field) { echo "<li><strong>$field->title: </strong>$field->value</li>"; } } ?> I want it so instead of showing ALL of the custom fields It would only show the ones I want. I know that you can choose in the admin panel to not show certain fields on the Pilot's profile however I still need this code I thought something like this might of done it but it messed up my site <?php echo PilotData::GetFieldValue($pilot->userinfo, 'Vatsim ID'); ?> Cheers, Thomas. Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted July 2, 2010 Administrators Report Share Posted July 2, 2010 instead of <?php echo PilotData::GetFieldValue($pilot->userinfo, 'Vatsim ID'); ?> try <?php echo PilotData::GetFieldValue($userinfo->pilotid, 'Vatsim ID'); ?> 2 Quote Link to comment Share on other sites More sharing options...
Thomas Posted July 2, 2010 Author Report Share Posted July 2, 2010 Yeah, That worked, Thanks Simpilot! +5 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.