Moderators mark1million Posted May 22, 2010 Moderators Report Posted May 22, 2010 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 Quote
Administrators Nabeel Posted May 22, 2010 Administrators Report Posted May 22, 2010 Something like: $allpilots = PilotData::getAllPilots(); # I believe that's the right function foreach($allpilots as $pilot) { echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); } Quote
Moderators mark1million Posted May 22, 2010 Author Moderators Report Posted May 22, 2010 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. Quote
Administrators Nabeel Posted May 22, 2010 Administrators Report Posted May 22, 2010 Did you include the codon.config.php file? Quote
Moderators mark1million Posted May 22, 2010 Author Moderators Report Posted May 22, 2010 OK so the plot thickens, thats got rid of the error but nothing is displayed for some reason. Quote
Administrators Nabeel Posted May 22, 2010 Administrators Report Posted May 22, 2010 Sounds like there's an error somewhere then, try adding, below the include: error_reporting(E_ALL); ini_set('display_errors', 'on'); Quote
Moderators mark1million Posted May 22, 2010 Author Moderators Report Posted May 22, 2010 Tried that im getting no output what so ever, Damn.. Quote
Moderators mark1million Posted May 22, 2010 Author Moderators Report Posted May 22, 2010 OK so i had to put the actual file location not the url which is now working but im getting the complete data in one line, is there a way i can put in a line break? Quote
Moderators mark1million Posted May 22, 2010 Author Moderators Report Posted May 22, 2010 No worries i figured it out, Thanks Nabeel for your help. Quote
Jon Posted November 20, 2010 Report Posted November 20, 2010 Hi Mark, Did you get the code for auto-vroute invites working? If yes can I have it please Regards Jon Quote
Moderators mark1million Posted November 20, 2010 Author Moderators Report Posted November 20, 2010 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 Quote
Jon Posted November 20, 2010 Report Posted November 20, 2010 Hi Mark, Ok Thanks For That, Kind Regards Jon Derrick Quote
Moderators mark1million Posted November 20, 2010 Author Moderators Report Posted November 20, 2010 Sorry Jon was going to post the file but got distracted in something else 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 />'; } ?> Quote
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.