Jump to content

Recommended Posts

Posted

I suppose this could be called version 1.0?

Basically this will generate a table which contains all your airport details.

A readme file is included and it's pretty simple to set up.

- Preview -

all_airports.png

I'll more than likely make some changes to this in the coming days, make it more interactive and add some new features, etc... So please post feedback and anything suggestions below.

Cheers,

Adam.

Airport List Module.zip

  • 3 weeks later...
Posted

I want to add a link to the individual airports, to load a page up with further info, using this module. I want to add great circle pics and other info etc. but I want to be able to click on the airport icao to bring up the new page? Can anyone guide me in this? Maybe a code of some sort. :) Thanks.

  • 3 weeks later...
Posted

Hi Adam,

Thanks for this module, I was hoping to simply add an image to each ICAO location using the country flags but I'm not real good at programming but am trying ... lol

Here is what I have so far, (Most likely no where near the mark ...)

Warning: Missing argument 1 for Countries::getCountryImage(), called in C:\xampp\htdocs\adam\auz\phpvms\lib\skins\auz\airport_main.tpl on line 18 and defined in C:\xampp\htdocs\adam\auz\phpvms\core\common\Countries.class.php on line 93

Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\adam\auz\phpvms\lib\skins\auz\airport_main.tpl on line 19

<h2>All Airports</h2>

<table border="0" cellpadding="5" cellspacing="3">

<thead>

<tr bgcolor="#E4EEF6">

<td bgcolor="#E4EEF6"><div align="center"><strong>Country</strong></div></td>

<td><b>ICAO</b></td>

<td><b>Airport Name</b></td>

<td><b>Airport Country</b></td>

<td><b>Lat</b></td>

<td><b>Long</b></td>

</tr>

</thead>

<tbody>

<?php $allairports = OperationsData::GetAllAirports(); ?>

<?php $countries = Countries::getCountryImage();?>

<?php foreach ($countries as $country)

{ ?>

<?php foreach ($allairports as $airport)

{

?>

<tr>

<td><div align="center"><img src="<?php echo Countries::getCountryImage($code->icao);?>"

alt="<?php echo Countries::getCountryName($code->icao);?>" /></div></td>

<td><?php echo $airport->icao; ?> </td>

<td><?php echo $airport->name; ?> </td>

<td><div align="center"><?php echo $airport->country; ?> </div></td>

<td><?php echo $airport->lat; ?> </td>

<td><?php echo $airport->lng; ?> </td>

</tr>

<?php }

} ?>

</tbody>

</table>

So would anyone know what the correct code would be to simply add an image to the country ?

Any suggestions would be mostly appreciated.

Thanks in advance

Adam

AUZ

Posted

Yup I would also like to learn about that.

I guess if I had used similiar php as in the pilot lists for country image it would work, except for that in $pilot->location it is in NO for Norway , SE for Sweden etc, but in $airport->location its in full country name Norway, Sweden.

Using the ICAO minus the 2 last identifers will not work either because ES in icao dosent meet SE (iso?) like the images are called... :P I guess making all that refers to location country in the same format would have helped?

Hoping Im just missing a simple solution

Posted

Hi Adam,

Thanks for this module, I was hoping to simply add an image to each ICAO location using the country flags but I'm not real good at programming but am trying ... lol

Here is what I have so far, (Most likely no where near the mark ...)

So would anyone know what the correct code would be to simply add an image to the country ?

Any suggestions would be mostly appreciated.

Thanks in advance

Adam

AUZ

Hi

Am working on the same kind of thing here to display the flag on the pilots page next to hub, also to include the ICAO and location. Ill let you know if and when I win :)

  • 2 weeks later...
Posted

There are still quite a lot of questions in here that I would like to see if anyone has the solutions for. (links, country images, times flown to/from)

  • 2 weeks later...
Posted

Hey there

would it be possible to add the "times flown" display inside this module? So Pilots can see how often this Airport has been flown?

Maybe with something like

<?php $schedules = schedules::getschedules();?>

<?php foreach ($schedules as $schedules)

{ ?>

<td><?php echo $schedules->timesflown; ?> </td>

please help

Posted

Hey there

would it be possible to add the "times flown" display inside this module? So Pilots can see how often this Airport has been flown?

Maybe with something like

<?php $schedules = schedules::getschedules();?>

<?php foreach ($schedules as $schedules)

{ ?>

<td><?php echo $schedules->timesflown; ?> </td>

please help

Click and read

  • 5 weeks later...
Posted

It's to bad code has to go untouched when someone goes absent. I think phpVMS mods should be like phpBB. If a author abandons it and will not reply to anyone after said amount of days, then someone can take over until he or she gets back.... If they ever do get back.

But yeah this list would be cool if it was extended on.

  • Like 1
  • 2 weeks later...
Posted

Hi guys,

what do I have to edit if I want only the approved airports from the pireps to be shown?

With this script you can see all airports that are in the DB stored.

Hope someone can help me.

Thanks,

Mark

  • 4 weeks later...
  • 3 weeks later...
  • 3 months later...
  • 1 month later...
Posted

Yup I would also like to learn about that.

I guess if I had used similiar php as in the pilot lists for country image it would work, except for that in $pilot->location it is in NO for Norway , SE for Sweden etc, but in $airport->location its in full country name Norway, Sweden.

Using the ICAO minus the 2 last identifers will not work either because ES in icao dosent meet SE (iso?) like the images are called... :P I guess making all that refers to location country in the same format would have helped?

Hoping Im just missing a simple solution

I think $airport->location is a String and you could give it whatever length you want B)

Best Regards

Thomas

Posted

Thanks for this module, I was hoping to simply add an image to each ICAO location using the country flags but I'm not real good at programming but am trying ... lol

I know this is a really late reply, but what you can do here, is take the code from the pilot_public_profile.tpl that pulls the flag for the pilot...

<img src="<?php echo Countries::getCountryImage($userinfo->location);?>

and tweak it for the airport

Posted

will try to do that tomorrow

just looked into my sites source code for option value on pilot location to get sure what the right values for each country is it looks like much work but well lets try B)

best regards

Thomas

Posted

friends got it work :)

example here:

http://www.flyeurope-va.org/index.php/airports

country flag of Yugoslavia/Serbia is missing in phpVMS command back :) it is there under "RS" wich is serbia and montenegro

only modification need to do is rename your countries to two letter codes best way to get all of them is to go into source code and from registration form you can derive all necessary "option values"

then use <img src="<?php echo Countries::getCountryImage($airport->country);?>"/> to get the image

Best Regards

Thomas

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