***closed*** weather34 for WeatherDisplay (clientraw and WDapi)

good morning

*important please note weather34 does not offer any support for this weather display version so please no more emails .Much of the code/structure has been completely re-written by Wim van der Kuil and this structure of code is not something Im familiar with and none of the code resembles any versions from Meteobridge or Cumulus so therefore it is important you raise your issues , ideas to Wim van der Kuil not weather34 to get a positive outcome . Wim van der Kuil has done a remarkeable re-write of the template to be used with weather display in a very short time and remember other versions like meteobridge and cumulus were designed and coded to be developed alongside each other continuously to make it easy to maintain and implement ideas across those versions where possible.Many of the current features,display seen in the meteobridge ,cumulus versions are not fully compatible with this version they require a lot of re-writing due to the differences in code structure. The weather display version I last worked on was in Novemebr 2017 since then it recieved no significant updates or major improvements so I think where Wim has got it today in such a short period is an achievement itself and I encourage you all to work with him constructively and collaborate.

sometime in the future I will try and liase with Wim to add similar features as seen in the current meteobridge version if required if not i still think where he has got it today is a great platform for further enhancements .but thats something for the future and choose a suitable period thats suits both of us right now too many other things going on .

screenshot of meteobridge version as of today…

brian

Shortly after I did that the DarkSky, CheckWX and WU uploads stopped working. Apparently w34_load_files.php needs a line added to make it use the proxy server in my setup. . . now I know that, I can watch out for any more updates to that script and make the necessary addition!

Fair enough.

The tag is - $NOAAEvent = ‘%NOAAEvent%’ ; // NOAA Watch/Warning/Advisory

Do you have real life content of that tag? It seems to be only a string? This is the description I found in taglist.txt

%NOAAEvent%.................if you have setup the Noaa warning system (if no warning, then it will be NO CURRENT ADVISORIES)

Wim

Hi there,

Great work with the Weather34 for WD with API!

Is there a Danish translation underway or should i give it a try?

BR
Stephan

Well maybe another Danish person is doing it, but I do not know of it. It is not a lot of work but after the first batch, new untranslated words will pop-up. Some weather-descriptions come from outside sources and all possibile words are not known yet.

So give it a try, maybe other Danish users can help?

Wim

Just for info/idea, I was able to include the advisory scripts that I have been using on my main site for years with no problem. These scripts were created separately using a third party RSS/Atom feed parser and not part of the Saratoga/Curly advisory scripts. As far as any impact from any NWS cutover goes, I’ll cross that bridge when I come to it.

http://ucweather.org/pwsWD/

Looks great…wish I was smart enough to know how to code that into my site. I can’t even figure out what file I would need to edit in the pwsWD directory to even attempt this mod. Would you mind sharing your code so I could get some ideas?

There will be a “alerts.weather.gov” advisory box and a “meteoalarm.eu” box in the April (2019-04-01) version.
The “alerts.weather.gov” version will use this feed: https://alerts.weather.gov/cap/wwaatmget.php?x=CAZ095&y=0
The “meteoalarm.eu” version will use: https://www.meteoalarm.eu/documents/rss/nl.rss

The “alerts.weather.gov” feed is already used in the Leuven-Template, but as always, one needs some time to test and integrate it in the other scripts.

Have had no indication that the “alerts.weather.gov” is affected by any planned change.

Wim

Let us know when you feel ready for more “wish list” suggestions :slight_smile:

I forgot to tell, there is already a “wish list” topic in Dutch for the “locals” .
If the “wish” also contains a screenshot or an URL it would be helpfull.

Please make a wish list topic in English also here on the forum.
That way the wishes do not get lost in the installation questions in this topic.

Wim

Should be a nice addition to the pwsWD package.

Today I enabled the “extra” menu and checked out the available options. I have no idea what it showed me. What I do know is that when I click on the link it is opening "Startpagina - Leuven-Sluispark and I have no idea where these links are set or how to edit them.

I am frustrated trying to figure out how to edit the files so my site displays what I want to show my visitors, and, making sure that what I show is the correct data. Having the easy weather setup is a fantastic idea, but it seems to me to be lacking code for all sections of the site.

New thread opened here.

This is to much data for easyweathersetup as you can add as menu entries as you want.
There is always to much or far to less documentation. This is the first new release and this topic helps me to find the proper balance.
Check this readme http://wd34.weather-template.com/documentation/WD34-questions.pdf
Scroll to => Menu options => Display Extra links in Menu (default false)
If you want to include extra pages in the menu, you can use a standard iFrame script.
The supporting script is w34_frames.php where you setup the links to the extra page(s) you want to use.
You can add as menu entries as you want, they are all shown with a link in the menu and when click appear in an iframe in the middle of the page. You have set the name of the page in the menu
The URL which should go into the Iframe
The height of the iframe

#  these are examples, please use your own ones
$frame                  = 'EWN_mesonet';
$frm_ttls[$frame]       = lang('European Weather Network');  // name in menu
$frm_src[$frame]        = 'https://www.weerstation-herent.be/ewn/stations.php?lang='.$used_lang;
$frm_hgth[$frame]       = 1500;  // length =  height of frame

Wim

Here is a sample of the code which I know isn’t going to make much sense because the parser uses config statements in order to work. It’s almost a language by itself. In order to even run this code, you would need to get the paid version of the parser https://www.geckotribe.com/rss/carp/ because it uses plugins that are not available with the free version.

.h2 { font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 8pt; font-weight: bold; color:white; text-align: center; } .h3 { font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 8pt; font-weight: bold; color:#cc0000; text-align: center; } .h4 { font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 8pt; font-weight: bold; } .feedbox { width:500px; border:1px solid blue; border-radius: 10px; background:#cccccc; padding:5px; } .feedbox div { background:black; width:490px; border:1px solid #808080; border-radius: 10px; padding:2px; text-align: left; } .feedbox a { text-decoration:none; } .tornado a { color:#ff0000; } .thunder a { color:#ffa500; } .flashflood a { color:#fd6347; } .tsunami a { color:#fd6347; } .hurricane1 a { color:#cd5c5c; } .hurricane2 a { color:#ff0000; } .storm a { color:#ee82ee; } .blizzard a { color:#ff4500; } .ice a { color:#ff00ff; } .heavysnow a { color:#ee82ee; } .tropical a { color:#ff00ff; } .winter a { color:#ff69b4; } .flood1 a { color:#7cfc00; } .sleet a { color:#87ceeb; } .flood2 a { color:#00ff00; } .highwind a { color:#ffd700; } .lakesnow a { color:#ee82ee; } .heat a { color:#ff4500; } .redflag a { color:#ff1493; } .windchill a { color:#b0c4de; } .avalanche a { color:#87cefa; } .dust a { color:#ffe4c4; } .freeze a { color:#00ffff; } .gale a { color:#dda0dd; } .marine a { color:#db7093; } .spray a { color:#00bfff; } .quake a { color:#f4a460; } .local a { color:#ffb6c1; } .nuke a { color:#ffff00; } ---snip ---
<?php

require_once “/xxxxx/xxxxx/xxx/xxxxx/xxxx/carp/carp.php”;

CarpConfReset();

// Show 9999 items
CarpConf(‘maxitems’,9999);

// set the CSS classes of the channel and item links
CarpConf(‘clinkclass’,‘h2’);
CarpConf(‘ilinkclass’,‘h4’);

// surround the item link with a DIV
CarpConf(‘bctitle’,‘

’);
CarpConf(‘actitle’,‘
’);

function ShowCapStuff($initem, $fieldname, $itemindex, $itemnumber, $valuearray, $returnvalue) {
$p=&$GLOBALS[‘carpconf’][‘rssparser’];
$target=$p->GetFieldValue(‘areaDesc’);
return "$target
";
}
CarpMapField(‘areadesc’,‘cap:areaDesc’);
CarpConf(‘iorder’, ‘link’);
CarpRegisterCallback(‘’,‘ShowCapStuff’,‘handlefield’,‘capstuff’);

// CarpConf(‘iorder’,‘link,desc’);
CarpConf(‘cborder’,‘’);
// CarpConf(‘cborder’,‘link’);
// CarpConf(‘cborder’,‘link,date,desc’);
CarpConf(‘linktarget’,1);

CarpConf(‘bcdate’,'Last Update: ‘);
CarpConf(‘acdate’,’

');
CarpConf(‘cdateformat’,‘M j Y \a\t g:i a T’);

CarpLoadPlugin(‘replacetext.php’);

ReplaceTextConf(1, ‘link’, 1, ‘^(.Tornado Warning.)
$’, ‘

\1
’);
ReplaceTextConf(1, ‘link’, 1, ‘^(.Severe Thunderstorm Warning.)
$’, ‘
\1
’);
ReplaceTextConf(1, ‘link’, 1, ‘^(.Flash Flood Warning.)
$’, ‘
\1
’);
ReplaceTextConf(1, ‘link’, 1, ‘^(.Tsunami Warning.)
$’, ‘
\1
’);
ReplaceTextConf(1, ‘link’, 1, ‘^(.(Inland Hurricane|Hurricane Force) Wind Warning.)
$’, ‘
\1
’);
ReplaceTextConf(1, ‘link’, 1, ‘^(.Hurricane Warning.)
$’, ‘
\1
’);
ReplaceTextConf(1, ‘link’, 1, ‘^(.Storm Warning.)
$', ‘
\1
’);
ReplaceTextConf(1, ‘link’, 1, ‘^(.Blizzard Warning.)
$’, ‘<div class=“blizzard”">\1
’);
ReplaceTextConf(1, ‘link’, 1, ‘^(.Ice Storm Warning.)
$’, ‘
\1
’);
ReplaceTextConf(1, ‘link’, 1, ‘^(.Heavy Snow Warning.)
$’, ‘
\1
’);
ReplaceTextConf(1, ‘link’, 1, ‘^(.Tropical Storm Warning.)
$’, ‘
\1
’);
ReplaceTextConf(1, ‘link’, 1, ‘^(.Winter Storm Warning.)
$’, ‘
\1
’);
ReplaceTextConf(1, ‘link’, 1, '^(.
(Coastal|Lakeshore) Flood Warning.*)
$’, ‘
\1
’);
ReplaceTextConf(1, ‘link’, 1, ‘^(.High Surf Warning.)
$’, ‘
\1
’);
ReplaceTextConf(1, ‘link’, 1, ‘^(.Sleet Warning.)
$’, ‘
\1
’);
ReplaceTextConf(1, ‘link’, 1, ‘^(.Flood Warning.)
$’, ‘
\1
’);

— snip —

ReplaceTextConf(1,‘link’,0,‘warnings or advisories’,‘warnings or advisories for San Francisco Bay Shoreline/CAZ508’);

CarpConf(‘cacheinterval’,5); // refresh the cache every 5 mins
CarpConf(‘maxcdesc’,1);
CarpConf(‘maxidesc’,0);
CarpConf(‘maxititle’,0);
CarpConf(‘maxctitle’,0);

// Display it
CarpCacheShow(“Current Watches, Warnings and Advisories for San Francisco Bay Shoreline (CAZ508) California Issued by the National Weather Service”);
?>

Problem in earthquake block: magnitude 5.1 in red is not easily legible in orange circle. See snip Earthquake, viewed in Chrome.

A little later it’s OK - see Earthquake2 - for magnitude <5?


Earthquake.JPG

Earthquake2.JPG

:smiley: Thank you, that is a nice catch.
I will have to test all combinations for back-ground- and text-color.
Wim

how to get the :
DarkSkyForecast
script to include it in:
w34 frames.php
Thank you

The only thing you can include is an url. So you have to go tot their site, choose settings for lang and untis a.s.o., copy from the address line, example How Dark Sky users can use the Apple Weather app - Apple Support
Then put that in the frames script.

Or use a link of your other website such as this forecast:
http://www.meteotorrelavega.com/weather28/index.php?p=wsWxsimPrintFull&lang=en&ipad

Wim

Another one I’ve noticed is the small “Indoor temp” bubble in the main temp block, where white lettering of that small size doesn’t show up well on some of the background colours.

[I have actually modified mine to show extratemp1 from the garden instead of indoor temp, and set the background to be blue for any temp. Blame Google Translate for any bad translations of “Garden”!]