Edwin Posted May 7, 2014 Report Share Posted May 7, 2014 I have installed this very nice plugin, but having issues with displaying the rank pictures. I have set this: <td><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" width="50" height="21" /></td> (taken from the default Pilot Roster page in the templates folder) It show the rank name, but not the picture. Any idea how I can fix that? Quote Link to comment Share on other sites More sharing options...
Strider Posted May 7, 2014 Author Report Share Posted May 7, 2014 It has problems, it happens to me too, just play around with the code until it shows. Quote Link to comment Share on other sites More sharing options...
Angel Air Posted May 7, 2014 Report Share Posted May 7, 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 I have tried that but unfortunately It did not work I will keep playing with the code to get it to work. Another problem I have is I cant seem to enter any info in the admin section of the module, I add the info in the fields and press save but does not store the info, I will try an upload all files again and if that helps if not I am stuck. Quote Link to comment Share on other sites More sharing options...
Strider Posted May 7, 2014 Author Report Share Posted May 7, 2014 The way it is coded it no longer needs anything to be added through the admin part now, as it looks at the airport db and gets which one is the hub airport. where it has <?php echo $hub->hubid;?> in your code change the hubid to icao, as it now looks for the icao not the id in the db. It looks like a style in your css that is having trouble with the long names of the airports you have. 1 Quote Link to comment Share on other sites More sharing options...
Edwin Posted May 8, 2014 Report Share Posted May 8, 2014 replace: <img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" with: <img src="<?php echo RanksData::getRankImage($pilot->rank);?>" did the trick for displaying the rankimage in the hubview page. all credits to Cor de Bruin /vbird 2 Quote Link to comment Share on other sites More sharing options...
Angel Air Posted May 8, 2014 Report Share Posted May 8, 2014 The way it is coded it no longer needs anything to be added through the admin part now, as it looks at the airport db and gets which one is the hub airport. where it has <?php echo $hub->hubid;?> in your code change the hubid to icao, as it now looks for the icao not the id in the db. It looks like a style in your css that is having trouble with the long names of the airports you have. works great now Thankyou!! still trying to figure out dropdown Quote Link to comment Share on other sites More sharing options...
Angel Air Posted May 8, 2014 Report Share Posted May 8, 2014 replace: <img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" with: <img src="<?php echo RanksData::getRankImage($pilot->rank);?>" did the trick for displaying the rankimage in the hubview page. all credits to Cor de Bruin /vbird Tried the change of code and still no ranks showing Quote Link to comment Share on other sites More sharing options...
Strider Posted May 8, 2014 Author Report Share Posted May 8, 2014 I think I know why the rank images are still not working for you, dont put the entire img link in php tags, just the part inside the src="" part. Quote Link to comment Share on other sites More sharing options...
Angel Air Posted May 9, 2014 Report Share Posted May 9, 2014 I think I know why the rank images are still not working for you, dont put the entire img link in php tags, just the part inside the src="" part. From this <img src="'.RanksData::getRankInfo($pilot->rank).'" /> to this <img src="<'.RanksData::getRankInfo($pilot->rank).'" /> Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted May 9, 2014 Report Share Posted May 9, 2014 I have this <td align="center"><img src="<?php echo RanksData::getRankImage($pilot->rank);?>" alt="<?php echo $pilot->rank;?>" /></td> which works on my site Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted May 9, 2014 Report Share Posted May 9, 2014 short question why do you use getRankInfo what does it return? think getRankImage is for the image Quote Link to comment Share on other sites More sharing options...
Strider Posted May 9, 2014 Author Report Share Posted May 9, 2014 change this <img src="'.RanksData::getRankInfo($pilot->rank).'" /> to this: <img src="<?php echo RanksData::getRankInfo($pilot->rank);?>" /> Quote Link to comment Share on other sites More sharing options...
Angel Air Posted May 9, 2014 Report Share Posted May 9, 2014 I have this <td align="center"><img src="<?php echo RanksData::getRankImage($pilot->rank);?>" alt="<?php echo $pilot->rank;?>" /></td> which works on my site Worked beautifully Thankyou!! 1 Quote Link to comment Share on other sites More sharing options...
poole3003 Posted June 2, 2014 Report Share Posted June 2, 2014 when i click on any off the hubs i get an little box with a cross in and states EGCC as that is my hub is that for pictures of the aurport logo to add and if so where do they go Quote Link to comment Share on other sites More sharing options...
Strider Posted June 3, 2014 Author Report Share Posted June 3, 2014 You can have a picture of the airport or the logo they use. Just name the file the same as the airport icao and it should pick it up. Quote Link to comment Share on other sites More sharing options...
poole3003 Posted June 3, 2014 Report Share Posted June 3, 2014 which folder would i inseret the airport logos to Quote Link to comment Share on other sites More sharing options...
Strider Posted June 3, 2014 Author Report Share Posted June 3, 2014 create a folder in the lib>images folder called airports, and insert the images in there. Quote Link to comment Share on other sites More sharing options...
poole3003 Posted June 4, 2014 Report Share Posted June 4, 2014 could you please do an example Quote Link to comment Share on other sites More sharing options...
Strider Posted June 4, 2014 Author Report Share Posted June 4, 2014 http://malaysiava.org/index.php/Hub/HubView/WMKK There you go. Quote Link to comment Share on other sites More sharing options...
poole3003 Posted June 4, 2014 Report Share Posted June 4, 2014 thanks mate Quote Link to comment Share on other sites More sharing options...
jusromaine Posted September 1, 2014 Report Share Posted September 1, 2014 I keep getting this is this something im missing Fatal error: Class 'HubStats' not found in /home/deltaair/public_html/core/templates/hub/hubview.tpl on line 47 Quote Link to comment Share on other sites More sharing options...
Strider Posted September 1, 2014 Author Report Share Posted September 1, 2014 it is saying the class file is not there. you must have the hubstats.class file Quote Link to comment Share on other sites More sharing options...
jusromaine Posted September 7, 2014 Report Share Posted September 7, 2014 Thanks I found it thanks for the replay Quote Link to comment Share on other sites More sharing options...
Eric76173 Posted December 22, 2014 Report Share Posted December 22, 2014 Hi, I followed the instructions in the readme.txt, when I go to the admin panel and click on Hubs under Addons this comes up... Notice: The template file "/home5/uvaairco/public_html//admin/templates/hub/hub_index.tpl" doesn't exist in /home5/uvaairco/public_html/core/classes/TemplateSet.class.php on line 248 I tried putting the hub_index.tpl into the /public_html/core/classes/ folder but it made no difference. Quote Link to comment Share on other sites More sharing options...
Strider Posted December 22, 2014 Author Report Share Posted December 22, 2014 What version of phpvms are you using? The tpl files should never go into the core>classes folder, that error you are getting is saying the hub_index.tpl file is not in the folder hub.If you are using simpilot's version of phpvms the tpl files must be in php format, not tpl Quote Link to comment Share on other sites More sharing options...
Eric76173 Posted December 23, 2014 Report Share Posted December 23, 2014 I am using the latest phpvms, from the phpvms website Quote Link to comment Share on other sites More sharing options...
Strider Posted December 23, 2014 Author Report Share Posted December 23, 2014 The download may have gotten corrupted, so redownload it and upload it. Quote Link to comment Share on other sites More sharing options...
Eric76173 Posted December 23, 2014 Report Share Posted December 23, 2014 That fixed the Admin issue, when I added the link to the site I got an error again Notice: The template file "/home5/uvaairco/public_html//core/templates/hub/index.tpl" doesn't exist in /home5/uvaairco/public_html/core/classes/TemplateSet.class.php on line 248 Quote Link to comment Share on other sites More sharing options...
Longhaul444 Posted December 24, 2014 Report Share Posted December 24, 2014 Question, I have hub managers in my system, but for some reason they don't show up listed as Hub Manager for this mod. Any idea what I need to do to get it to show? I don't know what info you may need to help, so let me know and I'll post. Quote Link to comment Share on other sites More sharing options...
Strider Posted December 24, 2014 Author Report Share Posted December 24, 2014 I am working on getting that working on a solution, it might take a little while. It should take from the hub manager db too, but doesn't seem to be, for the ones you have not added. It will require an edit to some core files. Let me work on it and I will post the code or the update to it. 1 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.