Edwin Posted May 7, 2014 Report 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
Strider Posted May 7, 2014 Author Report Posted May 7, 2014 It has problems, it happens to me too, just play around with the code until it shows. Quote
Angel Air Posted May 7, 2014 Report 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
Strider Posted May 7, 2014 Author Report 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
Edwin Posted May 8, 2014 Report 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
Angel Air Posted May 8, 2014 Report 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
Angel Air Posted May 8, 2014 Report 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
Strider Posted May 8, 2014 Author Report 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
Angel Air Posted May 9, 2014 Report 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
Txmmy83 Posted May 9, 2014 Report 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
Txmmy83 Posted May 9, 2014 Report Posted May 9, 2014 short question why do you use getRankInfo what does it return? think getRankImage is for the image Quote
Strider Posted May 9, 2014 Author Report Posted May 9, 2014 change this <img src="'.RanksData::getRankInfo($pilot->rank).'" /> to this: <img src="<?php echo RanksData::getRankInfo($pilot->rank);?>" /> Quote
Angel Air Posted May 9, 2014 Report 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
poole3003 Posted June 2, 2014 Report 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
Strider Posted June 3, 2014 Author Report 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
poole3003 Posted June 3, 2014 Report Posted June 3, 2014 which folder would i inseret the airport logos to Quote
Strider Posted June 3, 2014 Author Report Posted June 3, 2014 create a folder in the lib>images folder called airports, and insert the images in there. Quote
Strider Posted June 4, 2014 Author Report Posted June 4, 2014 http://malaysiava.org/index.php/Hub/HubView/WMKK There you go. Quote
jusromaine Posted September 1, 2014 Report 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
Strider Posted September 1, 2014 Author Report Posted September 1, 2014 it is saying the class file is not there. you must have the hubstats.class file Quote
jusromaine Posted September 7, 2014 Report Posted September 7, 2014 Thanks I found it thanks for the replay Quote
Eric76173 Posted December 22, 2014 Report 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
Strider Posted December 22, 2014 Author Report 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
Eric76173 Posted December 23, 2014 Report Posted December 23, 2014 I am using the latest phpvms, from the phpvms website Quote
Strider Posted December 23, 2014 Author Report Posted December 23, 2014 The download may have gotten corrupted, so redownload it and upload it. Quote
Eric76173 Posted December 23, 2014 Report 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
Longhaul444 Posted December 24, 2014 Report 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
Strider Posted December 24, 2014 Author Report 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
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.