Hubs page module

I have created another module, but this time for displaying the hubs you have in your VA. It uses Tom Sterritt’s HubStats addon which will need to be downloaded and installed if you do not already have it.You can get it here. This module is currently at Version 1.0. To view what it does, click here. If you are wondering why the roster for the hub looks shorter then the amount of pilots in the hub, that is because there is code to hide all pilots with 0 flight hours. Once they filed a pirep and it is accepted they will show.

I have now since added a gcmap to show the location of the hub.

You can download this module here Enjoy it.

Thanks for sharing

Added the gcmap to it now.

I have just updated this to V1.1. What is new is a GCmap of the location of the hub airport, and the ability to show who the hub manager is. It will link to the Hub managers public profile.

I get an output that I think is not what it should look like

post-585-0-68611400-1390089098.png

full page but there is no navigation and rest of site is gone

another thing is that I can not find the fuel burn in the hubstat class

That is a problem with the hubstats, as the code is looking for the function in the hubstats.class.php file, but not finding it. I did not create that file, Tom Sterritt did, so he is the person to have to go to to get support for his file. You can try downloading it from his github page. The link is in the readme file. Also the hub must be already listed as a hub in the airports database. If you just put in an airport, it will give out errors. So go into your airports section of the admin panel, and click on the airport, and chech the hub checkbox, and it should work fine then.

That is a problem with the hubstats, as the code is looking for the function in the hubstats.class.php file, but not finding it. I did not create that file, Tom Sterritt did, so he is the person to have to go to to get support for his file. You can try downloading it from his github page. The link is in the readme file. Also the hub must be already listed as a hub in the airports database. If you just put in an airport, it will give out errors. So go into your airports section of the admin panel, and click on the airport, and chech the hub checkbox, and it should work fine then.

Actually your template is calling a function that does not exist in my code. You must have a modified version. Feel free to make a pull request but until then I’ll provide no support for functions that don’t exist in there.

That is a problem with the hubstats, as the code is looking for the function in the hubstats.class.php file, but not finding it. I did not create that file, Tom Sterritt did, so he is the person to have to go to to get support for his file. You can try downloading it from his github page. The link is in the readme file. Also the hub must be already listed as a hub in the airports database. If you just put in an airport, it will give out errors. So go into your airports section of the admin panel, and click on the airport, and chech the hub checkbox, and it should work fine then.

airports are listed as hubs in Airport database

I do not know where I got the modified version, but I did not modify it my self. I had no idea I was using a modified version.

I have now updated it to V1.2. It now takes the hub directly from the airports table that ships with phpvms, no more having to add the hub manually to the module.

https://github.com/Strider2/phpvms_hub

What I choose, I will get only the first HUB on my screen and the text $manager = HubData::get_hubs($hubs->icao);

Maybe a little bug inr a nice mod.

Regards,

Cor

I will have a look.

Found the problem, I had not put some code into php tags I have uploaded the fix to my github. so It should work. About it not getting all your hubs, make sure you have hub selected in the airports table, it should be noted with a 1.

Hi Daniel,

At first it shows all our hubs but when you choose an other then EBBR it shows EBBR what it the first HUB in the list

http://www.vbirdva.com/vbv/index.php/hub

Regards,

Cor

Ok it is not fixed, it should work the right way now.

It is fixed now. Thank you

Regards,

Cor

To get it working in the nav bar use the following code:

<?php $hubs = HubData::get_hub();
foreach($hubs as $hub)
{
?>
<li><a href="<?php echo url('/Hub/HubView/');?><?php echo $hub->id;?>"><?php echo $hub->icao .' - '. $hub->name;?></a></li>
<?php }?>

To get it working in the nav bar use the following code:

<?php $hubs = HubData::get_hub(); foreach($hubs as $hub) { ?>
  • <?php echo $hub->icao .' - '. $hub->name;?>
  • <?php }?>

    where exactly does that need to be?

    one thing I have problem setting any hub manager admin backend shows only Airport Icao but let me not alter hub details

    some details are taken from the airports table and you would have to edit the airport itself. The link for the nav bar, goes into your layout.tpl or if you use the default nav, into the core_navigation.tpl file