cloudy cloudy

Author Topic: ***closed*** weather34 for WeatherDisplay (clientraw and WDapi)  (Read 23418 times)

0 Members and 2 Guests are viewing this topic.

Offline NorCal Dan

  • Dan - KJ6RGX
  • Posts: 10,553
  • Davis Vue/Win10
  • Ocean Park, WA.
  • OS/Browser:
  • Mac OS X 10.10.5
  • Chrome 71.0.3578.98
    • Traveling RV Weather
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #105 on: January 07, 2019, 08:03:51 PM »
There will be a "alerts.weather.gov" advisory box and a "meteoalarm.eu" box in the April (2019-04-01) version.

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 "https://weer.sluispark.be/index.php?p=mnu_darks&ipad&lang=en">" 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.

Offline bitsostring

  • Posts: 975
  • Oregon Scientific WMR200
  • Edinburgh, U.K.
  • OS/Browser:
  • Win NT 10.0
  • Chrome 64.0.3282.140
    • Home Weather Station
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #106 on: January 07, 2019, 08:21:23 PM »
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.

New thread opened here.
It's meant to be fun. . .

Online wvdkuil

  • Wim van der Kuil
  • Posts: 1,346
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 71.0.3578.98
    • My PWS at Leuven Belgium Europe
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #107 on: January 07, 2019, 08:23:00 PM »
. . . shortened . . .
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 "https://weer.sluispark.be/index.php?p=mnu_darks&ipad&lang=en">" 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.
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
Code: [Select]
#  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
Support & demo PWS_Dasboard  (HWS_template) http://pwsdashboard.weather-template.com/ 
My PWS at home https://weer.sluispark.be/
And at my daughters house https://www.weerstation-herent.be/

Offline Harry

  • Posts: 797
  • Union City, CA USA
  • OS/Browser:
  • Win NT 10.0
  • Firefox 64.0
    • Union City, CA Weather
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #108 on: January 08, 2019, 01:23:57 AM »
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?

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.

<style type="text/css">

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

</style>
</head>
<div class="feedbox">
<?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','<div style="width:490px; background:blue; padding:2px;  text-align: center;">');
CarpConf('actitle','</div>');

function ShowCapStuff($initem, $fieldname, $itemindex, $itemnumber, $valuearray, $returnvalue) {
   $p=&$GLOBALS['carpconf']['rssparser'];
   $target=$p->GetFieldValue('areaDesc');
   return "$target<br />";
}
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','<small>Last Update: ');
CarpConf('acdate','</small><br />');
CarpConf('cdateformat','M j Y \\a\\t g:i a T');

CarpLoadPlugin('replacetext.php');

ReplaceTextConf(1, 'link', 1, '^(.*Tornado Warning.*)<br />$', '<div class="tornado">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*Severe Thunderstorm Warning.*)<br />$', '<div class="thunder">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*Flash Flood Warning.*)<br />$', '<div class="flashflood">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*Tsunami Warning.*)<br />$', '<div class="tsunami">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*(Inland Hurricane|Hurricane Force) Wind Warning.*)<br />$', '<div class="highwind">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*Hurricane Warning.*)<br />$', '<div class="hurricane2">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.Storm Warning.*)<br />$', '<div class="storm">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*Blizzard Warning.*)<br />$', '<div class="blizzard"">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*Ice Storm Warning.*)<br />$', '<div class="ice">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*Heavy Snow Warning.*)<br />$', '<div class="heavysnow">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*Tropical Storm Warning.*)<br />$', '<div class="tropical">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*Winter Storm Warning.*)<br />$', '<div class="winter">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*(Coastal|Lakeshore) Flood Warning.*)<br />$', '<div class="flood1">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*High Surf Warning.*)<br />$', '<div class="flood1">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*Sleet Warning.*)<br />$', '<div class="sleet">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*Flood Warning.*)<br />$', '<div class="flood2">\\1</div>');

--- 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("http://alerts.weather.gov/cap/wwaatmget.php?x=CAZ508&y=0");
?>
</div>

« Last Edit: January 08, 2019, 01:46:52 AM by Harry »

Offline bitsostring

  • Posts: 975
  • Oregon Scientific WMR200
  • Edinburgh, U.K.
  • OS/Browser:
  • Win NT 10.0
  • Chrome 64.0.3282.140
    • Home Weather Station
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #109 on: January 08, 2019, 12:59:51 PM »
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?
« Last Edit: January 08, 2019, 01:16:47 PM by bitsostring »
It's meant to be fun. . .

Online wvdkuil

  • Wim van der Kuil
  • Posts: 1,346
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 71.0.3578.98
    • My PWS at Leuven Belgium Europe
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #110 on: January 08, 2019, 03:01:31 PM »
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?
:D Thank you, that is a nice catch.
I will have to test all combinations for back-ground- and text-color.
Wim
Support & demo PWS_Dasboard  (HWS_template) http://pwsdashboard.weather-template.com/ 
My PWS at home https://weer.sluispark.be/
And at my daughters house https://www.weerstation-herent.be/

Offline eb3bvb

  • Posts: 157
  • Torrelavega, Cantabria
  • OS/Browser:
  • Win NT 10.0
  • Firefox 64.0
    • meteotorrelavega
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #111 on: January 08, 2019, 03:33:33 PM »
how to get the :
DarkSkyForecast 
script to include it in:
w34 frames.php
Thank you

Online wvdkuil

  • Wim van der Kuil
  • Posts: 1,346
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 71.0.3578.98
    • My PWS at Leuven Belgium Europe
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #112 on: January 08, 2019, 03:51:19 PM »
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  https://darksky.net/forecast/50.8831,4.702/us12/en
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
Support & demo PWS_Dasboard  (HWS_template) http://pwsdashboard.weather-template.com/ 
My PWS at home https://weer.sluispark.be/
And at my daughters house https://www.weerstation-herent.be/

Offline bitsostring

  • Posts: 975
  • Oregon Scientific WMR200
  • Edinburgh, U.K.
  • OS/Browser:
  • Win NT 10.0
  • Chrome 64.0.3282.140
    • Home Weather Station
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #113 on: January 08, 2019, 03:55:16 PM »
I will have to test all combinations for back-ground- and text-color.

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"!]
It's meant to be fun. . .

Offline eb3bvb

  • Posts: 157
  • Torrelavega, Cantabria
  • OS/Browser:
  • Win NT 10.0
  • Firefox 64.0
    • meteotorrelavega
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #114 on: January 08, 2019, 03:59:49 PM »
Thank you Wim

Online wvdkuil

  • Wim van der Kuil
  • Posts: 1,346
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 71.0.3578.98
    • My PWS at Leuven Belgium Europe
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #115 on: January 08, 2019, 04:01:23 PM »
IMPORTANT
Please do not mail / PM BrianUnderdown  about this version.  This WD version of the HWS-template is based on a november 2017 version. Plus I changed the logic of the PHP code (not the CSS / SVG) and how blocks are addressed and loaded.
It took 1 1/2 month all my spare time, and I am retired.

So for Brian this code is totally different from his new code. He does not want to offend people who ask him about  this version. But he really can not give the answers needed. 

The whole idea is to have different versions and each version has another person responsible for maintenance and support. 
If you want to mail to Brian buy a Meteobridge first and discuss that version.

BUT do not compare versions.  There is really not much code left of the 2017 version I started with.
Do not ask him to port a block from the MB version to the Wd version. Ask me.

Brian asked me to remove all links (URL's)  to weather34 from the code, and that is the first thing I will do tomorrow.

Wim
Support & demo PWS_Dasboard  (HWS_template) http://pwsdashboard.weather-template.com/ 
My PWS at home https://weer.sluispark.be/
And at my daughters house https://www.weerstation-herent.be/

Offline eb3bvb

  • Posts: 157
  • Torrelavega, Cantabria
  • OS/Browser:
  • Win NT 10.0
  • Firefox 64.0
    • meteotorrelavega
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #116 on: January 08, 2019, 04:14:54 PM »
f I put this page in the browser:
http://www.meteotorrelavega.com/weather28/index.php?p=wsWxsimPrintFull&lang=en&ipad
I get it right
but if I execute it through:
http://www.meteotorrelavega.com/pwsWD/w34_start_frame.php?frame=WXSIM
I get the whole full page of weather 28
any suggestions
Thank you

Offline NorCal Dan

  • Dan - KJ6RGX
  • Posts: 10,553
  • Davis Vue/Win10
  • Ocean Park, WA.
  • OS/Browser:
  • Mac OS X 10.10.5
  • Chrome 71.0.3578.98
    • Traveling RV Weather
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #117 on: January 08, 2019, 04:33:35 PM »
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
Code: [Select]
#  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

Thanks for that info.  Another piece of my puzzle figured out  :oops:

Online wvdkuil

  • Wim van der Kuil
  • Posts: 1,346
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 71.0.3578.98
    • My PWS at Leuven Belgium Europe
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #118 on: January 08, 2019, 04:34:18 PM »
f I put this page in the browser:
http://www.meteotorrelavega.com/weather28/index.php?p=wsWxsimPrintFull&lang=en&ipad
I get it right
but if I execute it through:
http://www.meteotorrelavega.com/pwsWD/w34_start_frame.php?frame=WXSIM
I get the whole full page of weather 28
any suggestions
Thank you
When there is a problem like this, you could have made a typing error, or your keybord is "kaput"
This is the link used, there is an extra p at the end
http://www.meteotorrelavega.com/weather28/index.php?p=wsWxsimPrintFull&amp;lang=es&amp;ipadsp

Wim
Support & demo PWS_Dasboard  (HWS_template) http://pwsdashboard.weather-template.com/ 
My PWS at home https://weer.sluispark.be/
And at my daughters house https://www.weerstation-herent.be/

Offline NorCal Dan

  • Dan - KJ6RGX
  • Posts: 10,553
  • Davis Vue/Win10
  • Ocean Park, WA.
  • OS/Browser:
  • Mac OS X 10.10.5
  • Chrome 71.0.3578.98
    • Traveling RV Weather
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #119 on: January 08, 2019, 04:35:44 PM »
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.


Thanks...if I already owned carp I would try it, but I don't...

 

cumulus