Jump to content

Recommended Posts

Posted

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?

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

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.

Posted

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.

  • Like 1
Posted

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

  • Like 2
Posted

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

Posted

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

Posted

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.

Posted

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).'" />

Posted

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

  • 4 weeks later...
  • 2 months later...
  • 3 months later...
Posted

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

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

Posted

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
Posted

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.

Posted

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.

  • Like 1

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