Jump to content

how do i change Icons on recent flights front page


ercio

Recommended Posts

Got it!!

thanks do you know a statement to use a few other images in accordance with the airline code?

like use image A for airline code DLH

image B for airline code AFR , ad so on...?

Hi ercio,

Replace line 108 (in your .tpl/.php file) with this:

echo '<td><img src="'.fileurl('/path/to/your/images/'.$pirep->code.'.png').'" alt="'.$airline->name.'" /></td>';

Above code copied/modified from tid:21018 (flyalaska)

Personally, I'd use the following as the path:

echo '<td><img src="'.fileurl('/lib/images/'.$pirep->code.'.png').'" alt="'.$airline->name.'" /></td>';

Obviously, you'll need to create the images for each airline and name them the same as your airline codes e.g. DLH.png, AFR.png (using your example).

Also, ensure they reside (and are publicly viewable) in the path you are pointing to.

Hope this helps

Josh

Link to comment
Share on other sites

  • 3 weeks later...

How do I use this code in the default acarsmap.tpl or php and pilot list code? I am replacing my static code that just shows a single image. I want to be able to change the image depending on the airline they choose during registration, or I assign them too.

This is the code I am using for the static image:

<td><img src="<?php echo SITE_URL?>/lib/images/tail1.png" alt="Logo"></td>

and I need to use this somehow, so it will change depending on the pilots airline, for instance AAL or DAL, and the image will reflect the airline of choice.

echo '<td><img src="'.fileurl('/lib/images/'.$pirep->code.'.png').'" alt="'.$airline->name.'" /></td>';

Thanks!

Link to comment
Share on other sites

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