Jump to content

Custom field data


mark1million

Recommended Posts

  • Moderators

Hi Nabeel,

I have created a custom field when registering "vatsimid" i want to pull all that field values in to a plain text web page, i thought the values would have been in the pilots table but the're not, i have had a poke about but any assistance would be appreciated.

This is what i want,

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

Just a plain text file with all the CID's

Link to comment
Share on other sites

  • Moderators

I get the following error,

Fatal error: Class 'PilotData' not found in /srv/www/easyjetva.com/public_html/core/vr.php on line 2

what im afer is that fied data in a plain text file for vroute to automatically parse my roster with vatsim id's and send invitations to join the group.

Link to comment
Share on other sites

  • 5 months later...
  • Moderators

Hi Jon,

Yes is did, you will need to speak with Michal Rok before hand and he will set you up on his side that will look at that file and parse it.

In another VA i am involved with they use an api in to vroute that will provide a route based on the variables passed dep and arr, but i just have not had the time to look in to that yet ;)

Link to comment
Share on other sites

  • Moderators

Sorry Jon was going to post the file but got distracted in something else :lol:

Here you go, just change the field value for your custom created field and it will pull what ever you like, as you can see this is outside of phpvms and site in the root folder.

Just make sure you define your actual path of the file in the include and yes it does need the //

<?php
//error_reporting(E_ALL);
//ini_set('display_errors', 'on');
include 'YOURSITES_ROOT_PATH/public_html//core/codon.config.php';
$allpilots = PilotData::getAllPilots();
foreach($allpilots as $pilot)
{
       echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID');
echo '<br />';
}
?>

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