Strider Posted January 16, 2014 Report Share Posted January 16, 2014 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. 2 Quote Link to comment Share on other sites More sharing options...
FSX30HD Posted January 17, 2014 Report Share Posted January 17, 2014 Thanks for sharing Quote Link to comment Share on other sites More sharing options...
Strider Posted January 17, 2014 Author Report Share Posted January 17, 2014 Added the gcmap to it now. Quote Link to comment Share on other sites More sharing options...
Strider Posted January 17, 2014 Author Report Share Posted January 17, 2014 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. Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted January 18, 2014 Report Share Posted January 18, 2014 I get an output that I think is not what it should look like 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 Quote Link to comment Share on other sites More sharing options...
Strider Posted January 19, 2014 Author Report Share Posted January 19, 2014 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. Quote Link to comment Share on other sites More sharing options...
Tom Posted January 19, 2014 Report Share Posted January 19, 2014 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. Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted January 19, 2014 Report Share Posted January 19, 2014 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 Quote Link to comment Share on other sites More sharing options...
Strider Posted January 19, 2014 Author Report Share Posted January 19, 2014 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. Quote Link to comment Share on other sites More sharing options...
Strider Posted February 7, 2014 Author Report Share Posted February 7, 2014 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 Quote Link to comment Share on other sites More sharing options...
Cor Posted February 8, 2014 Report Share Posted February 8, 2014 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 Quote Link to comment Share on other sites More sharing options...
Strider Posted February 8, 2014 Author Report Share Posted February 8, 2014 I will have a look. Quote Link to comment Share on other sites More sharing options...
Strider Posted February 8, 2014 Author Report Share Posted February 8, 2014 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. Quote Link to comment Share on other sites More sharing options...
Cor Posted February 8, 2014 Report Share Posted February 8, 2014 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 Quote Link to comment Share on other sites More sharing options...
Strider Posted February 8, 2014 Author Report Share Posted February 8, 2014 Ok it is not fixed, it should work the right way now. Quote Link to comment Share on other sites More sharing options...
Cor Posted February 8, 2014 Report Share Posted February 8, 2014 It is fixed now. Thank you Regards, Cor Quote Link to comment Share on other sites More sharing options...
Strider Posted February 8, 2014 Author Report Share Posted February 8, 2014 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 }?> Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted April 15, 2014 Report Share Posted April 15, 2014 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 }?> where exactly does that need to be? Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted April 15, 2014 Report Share Posted April 15, 2014 one thing I have problem setting any hub manager admin backend shows only Airport Icao but let me not alter hub details Quote Link to comment Share on other sites More sharing options...
Strider Posted April 15, 2014 Author Report Share Posted April 15, 2014 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 Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted April 15, 2014 Report Share Posted April 15, 2014 ok got it work Quote Link to comment Share on other sites More sharing options...
FSX30HD Posted April 15, 2014 Report Share Posted April 15, 2014 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 }?> Strange in my website I put this to work <?php $hubs = HubData::get_hub(); foreach($hubs as $hub) { ?> <li><a href="<?php echo url('/Hub/HubView/');?><?php echo $hub->hubid;?>"><?php echo $hub->hubicao .' - '. $hub->hubname;?></a></li> <?php }?> Quote Link to comment Share on other sites More sharing options...
biokemisten Posted April 16, 2014 Report Share Posted April 16, 2014 Amazing, thank you! But.. Warning: Invalid argument supplied for foreach() in /home/public_html/core/templates/hub/hubview.tpl on line 85 Quote Link to comment Share on other sites More sharing options...
Strider Posted April 16, 2014 Author Report Share Posted April 16, 2014 That error usually happens when no pilots are in the hub. I will see about getting it to not show that error if no pilots are in the hub. Quote Link to comment Share on other sites More sharing options...
biokemisten Posted April 16, 2014 Report Share Posted April 16, 2014 That error usually happens when no pilots are in the hub. I will see about getting it to not show that error if no pilots are in the hub. Oh. Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted April 16, 2014 Report Share Posted April 16, 2014 think we need else if statements here if it has something to return echo the pilots in Hub else echo we have no pilots in this Hub! or something similar but unsure how the statement has to look exactly;) Quote Link to comment Share on other sites More sharing options...
Strider Posted April 16, 2014 Author Report Share Posted April 16, 2014 in the hubview.tpl file bellow where it has: if($pilot->totalhours == '0'){continue;} put: if(!$pilot){echo "Sorry, no pilot allocated to this hub yet.";} and let me know if that helps. Quote Link to comment Share on other sites More sharing options...
Strider Posted April 16, 2014 Author Report Share Posted April 16, 2014 I have updated the module now, it has fixed that error, also the way the url to the hubview is called has changed now. https://github.com/Strider2/phpvms_hub Quote Link to comment Share on other sites More sharing options...
Angel Air Posted May 6, 2014 Report Share Posted May 6, 2014 Hi all great module, I have got it all working as it should but I have got the hubs on a dropdown menu on the homepage and the hubs writing overlap (see image) not sure how to fix it any help would be great. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Strider Posted May 6, 2014 Author Report Share Posted May 6, 2014 <?php $hubs = HubData::get_hub(); foreach($hubs as $hub) { ?> <li class="level-2"><a href="<?php echo url('/Hub/HubView/');?><?php echo $hub->icao;?>"><?php echo $hub->hubicao .' - '. $hub->hubname;?></a></li> <?php }?> take the <li class="level-2"> you typed in and paste that in where the code for the drop down is, and it should work Quote Link to comment Share on other sites More sharing options...
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.