Jump to content

IVAO VID IN PHPVMS


yototo01

Recommended Posts

Go to your CustomProfileFields inside your admin panel, and add one called "IVAO ID" (without the quotes)

Then make a new module called IVAO or something (just put a folder called IVAO in the modules folder), like this:

  • -- core
  • --- modules
  • ---- IVAO
  • ----- IVAO.php

Inside IVAO.php put this

<?php
class IVAO extends CodonModule {
	public function index() {
          $pilots = PilotData::getAllPilots();
          foreach($pilots as $pilot)
          {
          $fieldvalue = PilotData::GetFieldValue($pilot->pilotid, 'IVAO ID');
          if($fieldvalue != '')
          {
          if(strlen($fieldvalue) < 5)
          {
          continue;
          }
          if (!is_numeric($fieldvalue))
          {
          continue;
          }
          echo $fieldvalue.'<br />';
          }
	}
}

Then you should be able to go to http://yourvaurl.com/index.php/IVAO and see all the ID's on one page.

Also, you can put this code on your pilot roster to help so they can see which pilot is who

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

 

Link to comment
Share on other sites

  • 1 year later...

this is my content 

<?php
class IVAO extends CodonModule {
	public function index() {
          $pilots = PilotData::getAllPilots();
          foreach($pilots as $pilot)
          {
          $fieldvalue = PilotData::GetFieldValue($pilot->pilotid, 'IVAO ID');
          if($fieldvalue != '')
          {
          if(strlen($fieldvalue) < 5)
          {
          continue;
          }
          if (!is_numeric($fieldvalue))
          {
          continue;
          }
          echo $fieldvalue.'<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...