'Idesign Simplicity' Template by Brian Underdown

I don’t mind WU, but for my location the current conditions icon does not work. I have sent them a few emails about this but they don’t seem to be in a hurry to fix it.
I guess a could do a script to pull the current condition icon from a different api. I will have to take a closer look at Brian’s code and see if I can do that.

Hi

if you wait for a few weeks until i get back i have what you need at home I only ever got as far as creating the script based on there api for current conditions all I need to do will be assign the script to use the SVG weather34 icons and rename them to the according to the numbers they use instead of descriptions .

it is basically usual format of this for current conditions

// extras added Updated 28th December 2016 //
//xuapi weather conditions home weather template//
$json2 = file_get_contents(‘https://api.apixu.com/v1/current.json?key=$apixukey&q=$location’);
$data = json_encode($json2);
$file2 = ‘…/jsondata/xuweather.txt’;
file_put_contents($file2, $json2);

// Current XU api sky
$json_string1 = file_get_contents(“jsondata/xuweather.txt”);
$parsed_json1 = json_decode($json_string1);
$weather[“sky1”] = $parsed_json1->{‘current’}->{‘condition’}->{‘text’};
$weather[“icon1”] = $parsed_json1->{‘current’}->{‘condition’}->{‘icon’};

anyway I have re introduced the gradient temperature for the color theme only Im sorry it took so long to re-introduce just kept forgetting so this morning i manage to add it back in . note it is for the color theme option only .

available at Weather-3Four - Where can we find out the weather you only to need to upgrade the temperature.php and main.color.css files if you want this option if not there is no other change

what file is this code in?

I haven’t looked into the files yet… :oops:

I noticed that an update added a scroll bar to the Earthquake Data popup page when viewing it in IE 11.


hello

i cant test it but just out of curisity go into eqfolder and edit eqlist.php change this line

homeweatherstation earthquake scale

if that fails I seem to recall IE needing specific scaling for SVG

try

homeweatherstation earthquake scale

blainec ive never released any files with the code i just keep a working development version for trying out different things , i also have a accuweather script but you need a minimum paid subscription to use. the problem I see xuapi is it is not much different from any other forecast source you tend to end up with airport data which is fine if you live near one like me I’m literally line of sight of 5km from Istanbul Ataturk airport and at same sea level so its generally ok but for many others its not the case .I have no problem with doing one off custom scripts for anyone however being that there custom made it is up to the individuals to maintain it going forward …
your issue with WU can you not just use a nearby location??? not familiar with region unfortunately…

anyway I’m off the internet radar for a few days it could be a rather chaotic period here in turkey for the next few days only time will tell.

take care …brian

Using a metar is not a problem for me. I am 3KM line of site from the metar. All I need to use is the sky conditions from the metar. The rest of the data from WU is OK

Thanks Brian, using the following worked.
homeweatherstation earthquake scale

Brian the gradient temperature and color theme looks great. :slight_smile: http://southwestweather.com/pws/KAZYOUNG2.php?theme=color

Thanks again
BTrip

Brian,

Really like the temperature gradients. Are you able to do it for the light theme as well? Think it would look good on that one too.

Paul

Yes i second that , it would be a nice addition. As Brian said though turbulent times in Turkey. Be safe Brian.

Steve.

Hi unfortunately it will have to wait till the weekend my internet is only in range when near land currently and at best 2g speeds so nigh on impossible to add any changes or upload but I will add on the gradients to light theme when I get home and fix the below zero not reflecting gradient output Blainec…

Brian

Thank you.
I can wait until you return from vacation

updated download or you can use simple fix attached

1.fix below zero gradient now also includes gradient temperatures for light theme
2.just update the three css files in the zip attached
3.replace existing temperature.php with one in zip attached

brian


gradientfix.zip (48.1 KB)

Brian,

Thanks so much for doing this, especially as it sounds like you are away. The temperature trend chevron is showing up as blue, so doesn’t stand out very much. It’s the code from line 120 to 130 in temperature.php

I overwrote the new code with the code from the previous temperature.php and temp trend chevron is now back to being white.

Thanks again.

Paul

Good evening

all 3 themes now include gradient temperatures

Fixes (21 APRIL 2017)

  • Adressed all minor isuues with with temperature.php gradients and solar.php color issues . css files updated, temperature.php and all solar(1 and 2).php updated

Fix /Update/gradient (19 APRIL 2017)

  • Fix below zero gradient output, added gradient temperature colors to light theme.fixed Portuguese flag option in common.php

https://www.weather34.com/homeweatherstation/index.html

brian

The update today made the Forecast Summary icons small again for IE 11.

good morning

IE11 what a suprise :slight_smile: ok i have completely re wrote the script for the outlook.php please find attached and if you can let me know you can check the demo prior to using it
at http://boutiquehotelitaly.com/devpws/ just click the forecast summary .

basically simplified the whole script

<?php // 23 april 2017 new summary outlook using WU for weather34 homeweatherstation template // $weather34wuurl = file_get_contents("../jsondata/wuweatherupdate.txt"); $parsed_weather34wujson = (json_decode($weather34wuurl)); $forecastday = $parsed_weather34wujson->{'forecast'}->{'txt_forecast'}->{'forecastday'}; $count = count($forecastday); for($i = 0; $i < $count; $i++) { $period = $forecastday[$i]; if($period->{'period'} == 1 || $period->{'period'} == 3 || $period->{'period'} == 2) { $icon=$parsed_weather34wujson->{'forecast'}->{'txt_forecast'}->{'forecastday'}[$i]->{'icon'}; $forecast = $parsed_weather34wujson->{'forecast'}->{'txt_forecast'}->{'forecastday'}[$i]->{'fcttext'}; $forecastm = $parsed_weather34wujson->{'forecast'}->{'txt_forecast'}->{'forecastday'}[$i]->{'fcttext_metric'}; $rain = $parsed_weather34wujson->{'forecast'}->{'txt_forecast'}->{'forecastday'}[$i]->{'pop'}; $dayofweek = $period->{'title'}; echo "" ; echo ""; echo "" ; echo $dayofweek; echo " " ; echo "" ; if ($tempunit=='C')echo $forecastm; else echo $forecast; echo " ";}} //end summary outlook using WU for weather34 homeweatherstation template ?>

looks like it ok just managed to get my IE laptop working

https://www.weather34.com/homeweatherstation/index.html

IE11 Fix(23 APRIL 2017)

  • outlook.php fixed not rendering SVG icons correctly in IE11 re-wrote script from scratch only need to update outlook.php in the forecast folder.

Fix/Update Forecast (22 APRIL 2017)

  • All forecast scripts using SVG icons. Fixed minor earthquake css error.

Fixes (21 APRIL 2017)

  • Adressed all minor isuues with with temperature.php gradients and solar.php color issues . css files updated, temperature.php and all solar(1 and 2).php updated

Fix /Update/gradient (19 APRIL 2017)

  • Fix below zero gradient output, added gradient temperature colors to light theme.fixed Portuguese flag option in common.php

if you just want the outlook.php zip you can just use the one attached .

place this in the forecast folder replacing existing. it has been verified ok for IE11 :slight_smile:


outlook.php.zip (1.76 KB)

Thanks Brian, it’s working fine in IE 11. :slight_smile: