Author Topic: Weather Template and scripts from Leuven/Belgium/Europe  (Read 195131 times)

0 Members and 1 Guest are viewing this topic.

Offline n3ouc

  • Contributor
  • ***
  • Posts: 123
    • Air Products Campus Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #75 on: July 03, 2013, 05:40:04 PM »
Hi Wim,
I have the exact same error in the logs and it occurs every time a page is loaded. The error is: pathString in macungieweather.net/weather2/wsAjaxDataLoad. php on line 11.
It doesnt seem to create any issue, but does fill up the error log very quickly.

Mike
Mike Stanton
Air Products Campus Weather

Offline Dr Obbins

  • Forecaster
  • *****
  • Posts: 1152
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #76 on: July 03, 2013, 09:19:23 PM »
To all readers: Sorry, just a humble answer is here in place.
Have a nice day, sorry again for the extra tracing and changing in the scripts,
Wim
No complaints here. I certainly couldn't do any better. (or even come close)  :-)

I didn't have that line #23 or 24 as you posted. When added, it returned an error message. Attached are my files if it helps.
Thanks for pointing this out. Typed the name of the wrong script.
Should be noaaPlainGenerateHtml.php. I edited the post above also.
Wim

That did the trick  :grin:  Thanks!

Offline Dr Obbins

  • Forecaster
  • *****
  • Posts: 1152
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #77 on: July 03, 2013, 10:51:31 PM »
Is there documentation on how to add/create our own pages?

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #78 on: July 04, 2013, 02:27:47 AM »
. . .
One is there is an error message in the website log:
PHP Notice:  Undefined variable: pathString in weatheranmore.com/weather2/wsAjaxDataLoad. php on line 11.
 . . . . Thanks again, Jerry
. . .
I have the exact same error in the logs and it occurs every time a page is loaded. The error is: pathString in macungieweather.net/weather2/wsAjaxDataLoad. php on line 11.
It doesnt seem to create any issue, but does fill up the error log very quickly.
Mike
To ALL: IMPORTANT  Unzip the attachement and replace the current weather2/wsAjaxDataLoad.php with  the attached script.
If you have frequent ajax updates and or your pages open 24/24 hours a day, your logs will overflow with 1 unnecessary message.
If you investigate the script you will see that the errorlogging was turned on also, used only for testing.
Wim
« Last Edit: July 04, 2013, 02:45:38 AM by wvdkuil »

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #79 on: July 04, 2013, 02:43:43 AM »
Is there documentation on how to add/create our own pages?
There is a empty page to start with in weather2/inc/wsNewPage.php.
There is minor documentation in that script what steps to follow.
But most users take a suitable page (mostly weather2/inc/CloudRadar.php) , copy it under a new name, modify it and put it in their menusystem.
Up until a month ago the users of the template were native dutch-speaking so all helpfull hints and descriptions are in Dutch. I will gather the Dutch information from the forums and make a English version to be included in the documentation, to be ready after our holiday/vacation period (Sept 1, 2013).
Wim
« Last Edit: July 04, 2013, 02:47:08 AM by wvdkuil »

Offline tstorm

  • Contributor
  • ***
  • Posts: 141
    • Harpers Ferry Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #80 on: July 04, 2013, 07:24:57 AM »
I'm uploading the yowindow.xml from WD but haven't been able to figure out how to get it to show.  Any ideas?

http://www.harpersferry-weather.com/weather2

Thanks,

John

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #81 on: July 04, 2013, 07:31:57 AM »
I'm uploading the yowindow.xml from WD but haven't been able to figure out how to get it to show.  Any ideas?
http://www.harpersferry-weather.com/weather2
Thanks,
John
Hi John,
Correct: The data yowindow.xml is in the root of your website
Correct: Your crossdomain.xml is in the root of your website
But: it does not allow YoWindow to acces your yowindow.xml
Please read this explanation here: http://yowindow.com/widget_and_pws.php as it is far better English than mine.

Wim

Offline tstorm

  • Contributor
  • ***
  • Posts: 141
    • Harpers Ferry Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #82 on: July 04, 2013, 07:56:12 AM »
I downloaded crossdomain.xml and placed in my root, but still not seeing the current conditions from my site.

John

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #83 on: July 04, 2013, 08:03:05 AM »
I downloaded crossdomain.xml and placed in my root, but still not seeing the current conditions from my site.
John
Those xml's are reloaded if you refresh the page.
At least at my laptop your site displays nice after a refresh of the page.

The landscape is covered with snow (at 2013-07-04 12:28:00Z) because your uploaded xml mentions 2 inches of snow. So that is tested also.
Wim
« Last Edit: July 04, 2013, 08:28:44 AM by wvdkuil »

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #84 on: July 04, 2013, 08:24:40 AM »
Wim,
 Thank you much for your quick response. I found the line of code that you added to wsFunctions.php and inserted it into my website.
Cumulus now has a barometric pressure! I have a couple more things to ask. One is there is an error message in the website log:
PHP Notice:  Undefined variable: pathString in weatheranmore.com/weather2/wsAjaxDataLoad. php on line 11. The second question is it possible to have the rainfall and barometer read two decimal places? For instance 1.15 inches of rain or a barometer reading of 30.01 inHg.
       Thanks again,      Jerry
Hi jerry,
Tomorrow I will look into that error in the logs.
The number of decimal places for values in inch will indeed be changed to 2. That will take a few days testing so probably after the weekend.
Have a nice day, Wim
To ALL:
Attached the scripts to display 2 decimals for pressure and rain values in the headers, startpage and trendpage.
Two of the modified scripts go into weather2/  and one into weather2/inc.
There is a small readme.txt included.
I will modify the full template download also.
Wim

Offline weatherbee

  • Senior Contributor
  • ****
  • Posts: 210
    • Sherman Ct. Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #85 on: July 04, 2013, 08:46:28 AM »
Thanks Wim.  The extra decimal places are working nicely.
Tom

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #86 on: July 04, 2013, 09:17:58 AM »
Question was asked: "How to use wuGraphs inside the template"
Example imlementation: http://www.weerstation-leuven.be/northam/index.php?p=62-2
Download of the extra scripts for the template: http://www.weerstation-leuven.be/_template2/template.php?lang=en
  Choose button Downloads  and the third choice is  wuGraphs_extra
You will find the extra template-scripts and a description where you can download the wuGraphs scripts.
Be aware that debug (error reporting) is switched off for this page even when you switched it on for the whole template!

I trust some of you will like these graphs as much as the Dutch users did.
Wim

Offline tstorm

  • Contributor
  • ***
  • Posts: 141
    • Harpers Ferry Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #87 on: July 04, 2013, 09:35:01 AM »
I went to another computer and I can see my current conditions.  Will have to look at the laptop to see what I need to turn on.  One more problem with the landscape for YrNo.  I've looked around in the scripts and I can't figure out why the landscape is winter when it should be summer.

John
« Last Edit: July 04, 2013, 09:37:07 AM by tstorm »

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #88 on: July 04, 2013, 09:40:22 AM »
I went to another computer and I can see my current conditions.  Will have to look at the laptop to see what I need to turn on. 
Just refresh the page with the circular arrow (at least in Chrome, Safari and FF). Or clean the cache and history, that always helps.
Quote
One more problem as with the landscape for YrNo.  I've looked around in the scripts and I can't figure out why the landscape is winter when it should be summer.
John
I added that to my previous post to you. In your data (yowindow.xml) you have 2 inches of snow.
The landscape is correct with snow for the live time. Off course the next minute (use the slider in the top part of YoWindow) there is no snow in the forecast and the normal landscape returns.
Have a nice day, Wim

Offline jerbo

  • Davis Vantage Pro2 with 24 Hour FARS located in the West End of Punxsutawney, PA - The Weather Capital of the World.
  • Member
  • *
  • Posts: 31
    • Punxsutawney West End Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #89 on: July 04, 2013, 10:05:36 AM »
Wim,

 Thanks again for the great script and your help getting it running.
All working well, now time to add more pages.

                                           Jerry

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #90 on: July 04, 2013, 10:21:15 AM »
Wim,
 Thanks again for the great script and your help getting it running.
All working well, now time to add more pages.
 Jerry
Hi Jerry,
And if you add those pages, there are at least two situations where I would like to hear from you.
1.  If you get stuck and
2.  If you think that page you are creating can be used by others.
Please send a PM or mail if I can be of some assistance to you.

I hope all readers of this post understand that it is difficult for a European guy from a country with 3 official languages and less inhabitants than a a USA city (11 miliion in Belgium is less inhabitants than those of LosAngelos) to really create the "local" USA pages.
So all users of the template will benefit one way or another, if we share all those "local" pages.

Wim

Offline weatherbee

  • Senior Contributor
  • ****
  • Posts: 210
    • Sherman Ct. Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #91 on: July 04, 2013, 11:27:05 AM »
Wim,
I am trying to add the WU graphs.  I have graphs working here
Quote
http://www.shermanctweather.com/weather2/wugraphs.php
but when I put it in the weather template here
Quote
http://www.shermanctweather.com/weather2/index.php?p=62-2
you can see the errors I get.
Tom

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #92 on: July 04, 2013, 11:58:00 AM »
Wim,
I am trying to add the WU graphs.  I have graphs working here
Quote
http://www.shermanctweather.com/weather2/wugraphs.php
but when I put it in the weather template here
Quote
http://www.shermanctweather.com/weather2/index.php?p=62-2
you can see the errors I get.
Tom
Hi Tom
This is your entry for the graphs in wsMenudata.xml
Code: [Select]
<item nr="62-2" show="yes"
link="wsWuGraphs/wsWuGraphs.php"
caption="WU History Graphs"
title="Weather Underground History Page Graphs"
head="wsWuGraphsHead.php"
/>
and it should be according the readme:
Code: [Select]
<item nr="62-2" show='yes'
link="wsWuGraphs/wsWuGraphs.php"
caption="WU History Graphs"
title="Weather Underground History page Graphs"
head="wsWuGraphs/wsWuGraphsHead.php"
/>
So when the script starts it can not read the head part of the wuGraphs script because of the missing folder name in the 5th line.
head="wsWuGraphs/wsWuGraphsHead.php"
Hope this solves those errors,
Wim

Offline weatherbee

  • Senior Contributor
  • ****
  • Posts: 210
    • Sherman Ct. Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #93 on: July 04, 2013, 12:05:26 PM »
Wim,
Thanks that was it.  I thought I copied it right, sorry.
Tom

Offline jerbo

  • Davis Vantage Pro2 with 24 Hour FARS located in the West End of Punxsutawney, PA - The Weather Capital of the World.
  • Member
  • *
  • Posts: 31
    • Punxsutawney West End Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #94 on: July 06, 2013, 07:46:14 PM »
Wim,

 I have a question about the Noaa watches and warnings on my site http://weatheranmore.com/weather/.
At the moment there is a flood watch for my area and the message is level: Severe, Significant threat to life or property - Responsive action SHOULD be taken soon (within next hour). However, the watch does not take effect until Sunday morning.
The watch instructions from NOAA read: A FLASH FLOOD WATCH MEANS THAT CONDITIONS MAY DEVELOP THAT LEAD TO FLASH FLOODING. FLASH FLOODING IS A VERY DANGEROUS SITUATION. YOU SHOULD MONITOR LATER FORECASTS AND BE PREPARED TO TAKE ACTION SHOULD FLASH FLOOD WARNINGS BE ISSUED. I think for a Watch the message should read: monitor later forecasts should a warning be issued.

                                         Jerry

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #95 on: July 07, 2013, 10:21:31 AM »
Wim,

 I have a question about the Noaa watches and warnings on my site http://weatheranmore.com/weather/.
At the moment there is a flood watch for my area and the message is level: Severe, Significant threat to life or property - Responsive action SHOULD be taken soon (within next hour). However, the watch does not take effect until Sunday morning.
The watch instructions from NOAA read: A FLASH FLOOD WATCH MEANS THAT CONDITIONS MAY DEVELOP THAT LEAD TO FLASH FLOODING. FLASH FLOODING IS A VERY DANGEROUS SITUATION. YOU SHOULD MONITOR LATER FORECASTS AND BE PREPARED TO TAKE ACTION SHOULD FLASH FLOOD WARNINGS BE ISSUED. I think for a Watch the message should read: monitor later forecasts should a warning be issued.

                                         Jerry
Hi Jerry, I agree that severity level and color do not match with the content of the message. But I am not close to my own computer to check the scripts. I will look into it later on this evening and post my findings and an idea how to solve it. Is your text fot the Watch message from an original noaa site or your own proposal? If from noaa please post or send a pm with the url.
Thanks for bringing this to my attention.

Wim
I am writing this on my iPad  near a pool on the first day with summer weather this year!

Offline jerbo

  • Davis Vantage Pro2 with 24 Hour FARS located in the West End of Punxsutawney, PA - The Weather Capital of the World.
  • Member
  • *
  • Posts: 31
    • Punxsutawney West End Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #96 on: July 07, 2013, 01:52:32 PM »
Wim,

  The watch is no longer in effect for my county, so I changed my $SITE['warnArea'] to the next county where the watch is
still in effect. The NWS page is http://alerts.weather.gov/cap/wwacapget.php?x=PA124F0BA623EC.FlashFloodWatch.124F0BB3F760PA.PBZFFAPBZ.5b47588090dbb816d4b4c9e4a8d6a6da.
When looking at the file noaa/noaaWarning.php', there does not seem to be any code for advisories or watches, only for warnings.

 Also, in my state each county is it's own alert zone, so would it be possible to add more than one zone to a site. There is a script on my old site that lets you add up to 4 zones without using a cron job. There is no rush to get this done. Enjoy your summer weather.

                                                              Thank you,
                                                                      Jerry

Offline weatherbee

  • Senior Contributor
  • ****
  • Posts: 210
    • Sherman Ct. Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #97 on: July 08, 2013, 09:35:49 AM »
Dr Obbins
How did you get your radar picture into the menu bar?
Tom

Offline Dr Obbins

  • Forecaster
  • *****
  • Posts: 1152
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #98 on: July 08, 2013, 01:33:43 PM »
I will can provide more info when I get home from work.
1. I don't use the WU address for the pic, so I found the section of the script that references the WU pic and then put my webcam address in that location.
2. I pretty much copied/pasted the webcam script but put the radar address there instead.

Offline weatherbee

  • Senior Contributor
  • ****
  • Posts: 210
    • Sherman Ct. Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #99 on: July 08, 2013, 01:38:59 PM »
Thanks.  I noticed that and copied the webcam code and kept changing that till it worked.