Jump to content

Recommended Posts

Posted

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.

  • Like 2
Posted

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.

Posted

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

post-585-0-68611400-1390089098_thumb.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

Posted

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.

Posted

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.

Posted

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

  • 3 weeks later...
Posted

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

Posted

Found the problem, I had not put some code into php tags :ph34r: 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.

Posted

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 }?>

  • 2 months later...
Posted

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?

Posted

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

Posted

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 }?>

Posted

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;)

Posted

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.

  • 3 weeks later...
Posted

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.

our hubs.jpg

Posted

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

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