Jump to content

pilots list code onto profile file?


Thomas

Recommended Posts

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

<?php echo PilotData::GetFieldValue($pilot->userinfo, 'Vatsim ID'); ?>

Cheers,

Thomas.

Link to comment
Share on other sites

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