Simple InstantWeather Module

On 9/2/2018 at 8:04 AM, ncd200 said:

Hello,

first of all thank you for this module.

I have the following problem, I want to show this tabel with decoded weather in a widget on the frontpage.

How can I achieve this? is this possible with a main controller?

 

Rick

3

Hey Rick, do you mean to show ONLY the complete metar info for the airport?

yes, I have now the following:

Quote

<div class=“card”>
                <div class=“card-title”>
                    <h4>Current weather</h4>
                </div>
                <div class=“card-body”>

                <table style=“width:100% !important;” class=“table”>
                  <tr>
                    <td class=“fat”>METAR</td>
                    <td><?php echo $metar;?></td>
                  </tr>
                  <tr>
                    <td class=“fat”>Pressure (altimeter)</td>
                    <td><?php echo $altim_bar . " mbar";?></td>
                  </tr>
                  <tr>
                    <td class=“fat”>Wind</td>
                    <td><?php echo $wind_dir_deg;?>° with <?php echo $wind_speed_kt;?> kts</td>
                  </tr>
                  <tr>
                    <td class=“fat”>Temperature</td>
                    <td><?php echo $temp;?> <?php echo ’ '. $temp_indicator;?></td>
                  </tr>
                  <tr>
                    <td class=“fat”>Dewpoint</td>
                    <td><?php echo $dewpoint;?> <?php echo ’ '. $temp_indicator;?></td>
                  </tr>
                  <tr>
                    <td class=“fat”>Horizontal visibility</td>
                    <td><?php echo $visibility_decrypt;?></td>
                  </tr>
                  
                  <?php MainController::Run(‘InstantWeather’, ‘sky_condition’, ‘’); ?>
                    
                </table>

Only where do I give the current location to work with for this module?

Thanks allready for the help!

Rick

9 hours ago, ncd200 said:

yes, I have now the following:

Only where do I give the current location to work with for this module?

Thanks allready for the help!

Rick

Hi Rick!

The module looks for the pilots last accepted pirep arrival airport. Thats the “current position airport”. It took this and show it’s weather.

I’ve implemented a PHP get method that you can set the airports icao. To do this you have the url and you just add ?icao=ICAO_HERE - in my case:

http://phpvms.philippdalheimer.de/index.php/instantweather?icao=eddf

 

To do this, please update the module. There should be a update link in the module. Or just check out the news on github.

Hope it solves your problem, Rick! :slightly_smiling_face:

Thanks for the answer.

The module works as intended only no in a wdget from the frontpage.

what i am trying to do is to view the weather module from the frontpager_main in a section special for the weather.

Does it work with this?

\<?php MainController::Run('InstantWeather', 'get\_metar', ''); ?\>

 

negative sir. any other ideas?

pm you 

Updated module to v1.9 :smiling_face::check_mark:

How to update?

Just download the module new and upload & replace it on your server. Please backup your files before updating.

2 hours ago, Larsje40 said:

Hello NCD200. Which template is that wich i see on your picture? i really like it.

and can i download it somewhere with explanation how to install it?

THNX

 

gr.

 

larsje

That looks like a customized version of CrewCenter. https://github.com/web541/CrewCenter

Well, at  this moment I have a very different template totaly customized but I thought the ws modified of the ELA2018 template. which you can doenload here:

https://github.com/carlosmfreitas2409/ElaSkin-2.0

 

Thanks for the compliment thought;) 

Anyway of adding a search fuinction to this at all ?

 Karamellwuerfe,
I see your module will show the weather where the pilots last flight terminated. There is also the option set a ICAO manually…

Is there a way for the module to show the weather of the hub the pilot is based? It will always show that information regardless of where the pilot is.
Thanks

Hi ,

you can use the option to show the weather on a special airport. Get the pilot’s hub and insert it in the function.

logged in pilot’s hub: 

Auth::$pilot-\>hub

 

If you guys give me features you like fo this module, I can write a version 2.0 in the next days and give it to you with that requests :-)

features (?):

  • display the weather on specific airport
  • display weather on hub of pilot
  • display weather inline, not only on specific url

anything else?

Thanks! :slight_smile:

 

1 Like

if the Module active for Download? ive tried to download 1.9 but the link its not working?

 

 

Hi , just try the github repo. There is also a documentation in the readme

 

https://github.com/Karamellwuerfel/InstantWeather

 

Have a nice day

1 Like

Any chance on adding a search function at all for the ICAO’S

Hello ,

programmically there is always a way to do something  Yes. But it’s not implemented in this module.

 

Regards.

2 hours ago, Karamellwuerfel said:

Hello ,

programmically there is always a way to do something  Yes. But it’s not implemented in this module.

 

Regards.

No worries, I managed to get a search function working using some jquery and of course HTML

1 Like

On 1/10/2017 at 10:31 AM, Karamellwuerfel said:

Hey guys! I’ve made a Weather module that shows you real time and

instant weather informations of the current airport where the logged in pilot is.

DEMO VIDEO: www.youtube.com/watch?v=Cx0HCaW-a5I

 

#########INSTALLATION######### 1. Copy the “core/modules/InstantWeather”-folder into your “core/modules”-folder of your va 2. Copy the “core/templates/instantweather”-folder into your “core/templates”-folder of your va 3. To show the module in the navigation: <li><a href=“<?php echo url(‘/instantweather’); ?>”>InstantWeather</a></li>

USE INFORMATION ON OTHER PAGES (v 1.9) –> More on github project README.md

Use MainController::Run to display all different information of the table on other pages. Available functions:

<?php MainController::Run(‘InstantWeather’, ‘metar’); ?> // example: EDDS 070920Z 26004KT 230V300 9999 FEW012 SCT025 BKN068 18/16 Q1015 NOSIG <?php MainController::Run(‘InstantWeather’, ‘pressure’); ?> // example: 982 mbar <?php MainController::Run(‘InstantWeather’, ‘wind_speed’); ?> // example: 4 kts <?php MainController::Run(‘InstantWeather’, ‘wind_degrees’); ?> // example: 260° <?php MainController::Run(‘InstantWeather’, ‘temperature’); ?> // example: 18.0 °C <?php MainController::Run(‘InstantWeather’, ‘dewpoint’); ?> // example: 16.0 °C <?php MainController::Run(‘InstantWeather’, ‘visibility’); ?> // example: 6.21 mile <?php MainController::Run(‘InstantWeather’, ‘skycondition’); ?> /* example: Sky condition level 1 FEW 1200 ft Sky condition level 2 SCT 2500 ft (Scattered) Sky condition level 3 BKN 6800 ft (Broken) */

DOWNLOAD 

(Tested on PHPVMS Version 2.1.936)

Would this be adaptable to a WP site. I would like to be able to weather on my front end.

5 minutes ago, Shadesb181 said:

Would this be adaptable to a WP site. I would like to be able to weather on my front end.

 

Hey! I guess you have to do it in a WP plugin instead.

This is a phpVMS module and is (I think) not compatible with WordPress.

 

Kind regards,

Philipp