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

0 Members and 1 Guest are viewing this topic.

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 #425 on: November 22, 2014, 11:57:49 AM »
. . . shortened . . .
You'll notice it uses the CSS for the script. Once I include it in my page though if you look at the link above compared to this link in my template it is completely different. I.E. the tabs for one and also the footer is broken. The grey at the bottom isn't suppose to look like that. If you look at another page you'll see what I am referring too but, mostly it doesn't following the CSS included with the script. It is inheriting the overall templates CSS which is strange if they don't use the same classes. http://www.mesquiteweather.net/wxsimforecast.php

I got the time changed from 24hr to 12hr. It works on the 3hr and 48hr now fine. On the graph though it is still in 24hr time. Is there someplace else I would need to edit to change it to 12hr time in the graphs?

-Thanks
The stand-alone page has ONE css
Code: [Select]
<link rel="stylesheet" type="text/css" href="styleWsWxsim.css" media="screen" title="screen" />
and is using the " blue" part as they generate their own body tags and so on.

Your integrated template run uses as last CSS exactly the same stylesheet.
Code: [Select]
<!-- end of top -->
<link rel="stylesheet" type="text/css" href="styleWsWxsim.css" media="screen" title="screen" />
as last stylesheet after menu.
That should generate an error as it should be  href="wsWxsimSA/styleWsWxsim.css" but i see you copied that stylesheet to the root.

All non-wxsim settings come from yourown CSS- specifications.
Both the stand-alone and your integrated script use the settings from the wxsim css for the wxsim specifics, tabs a.s.o..

Again, I test
stand-alone => http://www.weerstation-leuven.be/wsWxsimSA/start.php?lang=en => OK
Setting for background colors and so on from the stylesheet.
Works exactly the same at your place.

Saratoga => http://www.wiri.be/saratoga/wxsimforecast.php => OK
Settings from the stylesheet and the saratoga stylesheet.

and also in the Leuven-Template => OK

But i can not look into your environment as it is not one of those three.  So if the stylsheet results  are not what you expect, please check the small styleWsWxsim.css. All other settings come from the other stylesheets.

===

I will check the  scripts tomorrow if and how the times below the graphs can be  changed.

Wim

Offline MesquiteWx

  • Forecaster
  • *****
  • Posts: 610
    • Mesquite Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #426 on: November 22, 2014, 12:22:23 PM »
Again, I test
stand-alone => http://www.weerstation-leuven.be/wsWxsimSA/start.php?lang=en => OK
Setting for background colors and so on from the stylesheet.
Works exactly the same at your place.

Saratoga => http://www.wiri.be/saratoga/wxsimforecast.php => OK
Settings from the stylesheet and the saratoga stylesheet.

Look at the tabs above the forecast and graphs on the two links you posted above and on the two I posted. You'll notice the tabs are completely different. It is not using the tab class in the script stylesheet. For some reason the template stylesheet is overriding it. It does it on your two links and on mine as well.

I got the forecast background sorted. When you insert it into a template it won't inherit the color classes from the script as it doesn't know which color class to use. When you use it in standalone it does but not in a template. I.E.

When you put it in a template. The script isn't going to know to use this class.

Code: [Select]
.blue  {color:  black; background-color: #F1F8FE;}
.blue li.tabberactive a {background-color: #B7D0E8;}
.blue .table-top {background-color: #96C6F5;}
.blue .row-dark {background-color: #B7D0E8;}

When it is stand-alone it does. So if you want blue you will have to edit the script CSS and edit.

Code: [Select]
.row-dark {
background-color: #B7D0E8;
}

With the associated row dark from the color class choices.

I think the alternative way around this would be to have separate style sheets for templates versus a global one.

-Thanks

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 #427 on: November 22, 2014, 12:38:32 PM »
I use the script myself in a standard Saratoga template.
http://www.wiri.be/saratoga/wxsimforecast.php
That one is using 
Code: [Select]
<link rel="stylesheet" type="text/css" href="weather-screen-blue-narrow.css" media="screen" title="screen" /> in the header part. All standard Saratoga.
The script inserts the wxsim.css
Code: [Select]
<link rel="stylesheet" type="text/css" href="wsWxsimSA/styleWsWxsim.css" media="screen" title="screen" />
after the top part.
You can check the css files in the html of the page.

This wxsim script as used is attached. Identical as to the download.

When I change the Saratoga template to green just now,  the wxsim adapts automatically to that.

So it works as it should at Leuven - Saratoga and stand-alone.
I can not see the php you are using so i can not be of much assistance with this.

Wim

Offline MesquiteWx

  • Forecaster
  • *****
  • Posts: 610
    • Mesquite Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #428 on: November 22, 2014, 01:01:27 PM »
Let me see if I can explain this a little better. Referring to the screenshots. Look at the red boxes. The tabs and the forecast background are not selecting from the scripts CSS when in a template regardless what is in the head of the wxsimforecast.php. I have it linking to the included scripts CSS in the head of the scripts CSS and it is overriden by the templates CSS.

Standalone



Saratoga Template - These should be green tabs with bold black text and the forecast background should be green as it shows in the standalone.



As you can see, the forecast background doesn't not use the scripts CSS, also the tabs are not styled from the scripts CSS. It is being overrided by the templates CSS.

If you also notice, the forecast background is pulling a grey color when used in the template. In standalone it uses the color you set in the sets. The reason it doesn't use the correct color in the template is in the scripts CSS it has this.

Code: [Select]
.row-dark {
background-color: #B7D0E8;
}

That is overriding the color settings for the forecast background. Now you use green. If you go into your CSS and change the above Hex color to this #B1CBA0 then your forecast background will be the same as the standalone. Otherwise it will be grey because the script doesn't know which color scheme to use outside of the standalone page because it isn't dynamic. In turn the template CSS is overriding the tabs as well because it doesn't know which color scheme to use.

I hope that makes sense. Pay close attention to the tabs and forecast background which I posted above and look at the links closely.

« Last Edit: November 22, 2014, 01:04:30 PM by MesquiteWx »

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 #429 on: December 01, 2014, 10:53:49 AM »
As of today the Leuven-Template release 2.6e now fully supports

As these weatherprograms are not widely supported by templates of any kind, I trust this will benefit another group of weatherstation owners.

Wim

Support / download at: http://leuven-template.eu/index.php
WiKi at: http://wiki.leuven-template.eu/doku.php?id=start

Offline txweather.org

  • Forecaster
  • *****
  • Posts: 1597
    • Texas Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #430 on: December 01, 2014, 11:47:58 AM »
Wim,

Awesome work thanks!
Any chance you will have an Air Quality page for EN (USA)?

Thanks!

----
Davis Vantage Pro2 Plus +FARS|Meteobridge Nano SD|Meteohub|Meteobridge MR-3020|WU KTXSPRIN75/PWS JRARGWX75/CWOP EW2972/WBB TXWDVUE75/Blitzortung ID: 1142|AWEKAS: 12095
Donations are welcome: https://paypal.me/ffuentesb

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 #431 on: December 02, 2014, 04:22:34 AM »
Wim,

Awesome work thanks!
Any chance you will have an Air Quality page for EN (USA)?

Thanks!
I can only develop such a page if there is a source of data (xml or json) available.  And as I am not living over there my ideas where to find it, is nill.

Wim


Offline txweather.org

  • Forecaster
  • *****
  • Posts: 1597
    • Texas Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #432 on: December 02, 2014, 08:17:40 AM »
Wim,

Thanks. I manage to migrate the current AQI page made for the sratoga template to your template.
http://www.txweather.org/index.php?p=05&lang=en#data-area

Still working some details but so far so good!

Thanks!

----
Davis Vantage Pro2 Plus +FARS|Meteobridge Nano SD|Meteohub|Meteobridge MR-3020|WU KTXSPRIN75/PWS JRARGWX75/CWOP EW2972/WBB TXWDVUE75/Blitzortung ID: 1142|AWEKAS: 12095
Donations are welcome: https://paypal.me/ffuentesb

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 #433 on: December 05, 2014, 09:05:22 AM »
Wim,

Awesome work thanks!
Any chance you will have an Air Quality page for EN (USA)?

Thanks!
Demo of the Leuven-Template USA AQHI scripts:
On startpage as dashboard items: http://www.weerstation-leuven.be/northam/index.php?p=10
As separate page, menu "Regional Air Quality": http://www.weerstation-leuven.be/northam/index.php?p=15

Attached the first "beta' versions of the scripts.

As long as you live nearby a AQ forecast area (set the distance to 50 miles)  the textual data will be loaded based on the latitude / longitude of the weather station.

The   maps should be done in the old fashioned way: displaying them and copying the url to the script.
There will be maps based on the latitude - longitude but according to the airnow site it is still beta.

Please try these scripts and all comments are welcome.

Succes, Wim

edited 2014-12-06 to remove typo in readme.txt, new zip attached
« Last Edit: December 06, 2014, 02:54:46 AM by wvdkuil »

Offline txweather.org

  • Forecaster
  • *****
  • Posts: 1597
    • Texas Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #434 on: December 05, 2014, 09:27:35 AM »
Awesome work Wim!

Will test it tonight when I get off work.

----
Davis Vantage Pro2 Plus +FARS|Meteobridge Nano SD|Meteohub|Meteobridge MR-3020|WU KTXSPRIN75/PWS JRARGWX75/CWOP EW2972/WBB TXWDVUE75/Blitzortung ID: 1142|AWEKAS: 12095
Donations are welcome: https://paypal.me/ffuentesb

Offline txweather.org

  • Forecaster
  • *****
  • Posts: 1597
    • Texas Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #435 on: December 05, 2014, 10:06:41 AM »

----
Davis Vantage Pro2 Plus +FARS|Meteobridge Nano SD|Meteohub|Meteobridge MR-3020|WU KTXSPRIN75/PWS JRARGWX75/CWOP EW2972/WBB TXWDVUE75/Blitzortung ID: 1142|AWEKAS: 12095
Donations are welcome: https://paypal.me/ffuentesb

Offline weatherbee

  • Senior Contributor
  • ****
  • Posts: 210
    • Sherman Ct. Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #436 on: December 08, 2014, 10:10:45 PM »
Somehow I created a problem with my WXSIM forecast.  On graphs it's ok and using the tabs 48 hour details and forecast by three hour interval the temps are fine but using the tab overview the temps are wrong. 
The page is here: http://www.shermanctweather.org

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 #437 on: December 09, 2014, 02:46:18 AM »
Somehow I created a problem with my WXSIM forecast.  On graphs it's ok and using the tabs 48 hour details and forecast by three hour interval the temps are fine but using the tab overview the temps are wrong. 
The page is here: http://www.shermanctweather.org
This morning the data with the Henkka 3in1 WXSIM scripts on pages
http://www.shermanctweather.org/weather3/index.php?p=12&lang=en
http://www.shermanctweather.org/weather3/index.php?p=55&lang=en
look OK to me.
===
But the problem you describe is caused with the Leuven-wxsim scripts when the settings for the plaintext.txt are incorrect. Probably they are still in metric.

Line 100 in   weather?/wsWxsim/wsWxsimsettings.php should be changed to contain the imperial units.
It is documented on the lines below.
The lastret.txt and latest.csv contain data about the units used. plaintext.txt does not.
The output units are automatically set.   The leuven-template switches the units displayed dynamically based on the visitors preferences. That is why these input unit settings should be set,  so the scripts know what to recalculate.


Wim





Offline weatherbee

  • Senior Contributor
  • ****
  • Posts: 210
    • Sherman Ct. Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #438 on: December 09, 2014, 06:49:08 AM »
Line 100 was set to
Code: [Select]
$uoms = array ('F', 'in','mph', 'inHg','in','mi'); // #####  IMPORTANT  #####
I only get the bad temps on the overview tab so for now I've taken it out.

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 #439 on: December 09, 2014, 06:51:24 AM »
Line 100 was set to
Code: [Select]
$uoms = array ('F', 'in','mph', 'inHg','in','mi'); // #####  IMPORTANT  #####
I only get the bad temps on the overview tab so for now I've taken it out.
The overview tab is made form the plaintext.txt
The other tabs from either lastret.txt or latest.csv

Plaintext has no units in the file so it is incorrecrt because they are default set to metric
The other two files have the units in the file, that is why they are correct.

There is an separate chapter in the WiKi, just for wxsim:
http://wiki.leuven-template.eu/doku.php?id=wxsim

Wim
« Last Edit: December 09, 2014, 06:55:52 AM by wvdkuil »

Offline weatherbee

  • Senior Contributor
  • ****
  • Posts: 210
    • Sherman Ct. Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #440 on: December 09, 2014, 07:33:55 AM »
It seems to be working now but I'm not sure why.  Just started to work.

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 #441 on: December 09, 2014, 07:37:39 AM »
It seems to be working now but I'm not sure why.  Just started to work.
There is always the waiting time for the cached data.
http://wiki.leuven-template.eu/doku.php?id=wxsim => big orange box
ATTENTION: All forecast-scripts from the Leuven-Template process the forecast data in two steps.
1. convert data to an intermediate" computer readable array => cache
2. read the cache and display the data for the visitor.

So when you change settings you either have to remove the cache file or wait for a fresh upload with wxsim or wait for the cached data to become to 'old' for the other forecasts.

Wim

 

Offline jonnyj771

  • Senior Contributor
  • ****
  • Posts: 220
    • Lightning Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #442 on: December 09, 2014, 07:52:16 AM »
Demo of the Leuven-Template USA AQHI scripts:
On startpage as dashboard items: http://www.weerstation-leuven.be/northam/index.php?p=10
As separate page, menu "Regional Air Quality": http://www.weerstation-leuven.be/northam/index.php?p=15

Attached the first "beta' versions of the scripts.

As long as you live nearby a AQ forecast area (set the distance to 50 miles)  the textual data will be loaded based on the latitude / longitude of the weather station.

The   maps should be done in the old fashioned way: displaying them and copying the url to the script.
There will be maps based on the latitude - longitude but according to the airnow site it is still beta.

Please try these scripts and all comments are welcome.

Succes, Wim

edited 2014-12-06 to remove typo in readme.txt, new zip attached

Another Successful script Wim, Excellent job!

Lightning Weather is now showing AQI and AQ Forecasts.

Thank You Sir!

Regards,

Jonny J
Facebook:
Lightning Weather
   www.facebook.com/lightningweather
                             /groups/lightningweather
Lightning Weather Quad Cities
                             /lightningwxqc
                             /groups/lightningWXQC
Weather Station Hardware: Davis Vantage Pro2 6152
Weather Station Software: WD - 10.37S Build XXX (Beta)
Page Template: MeteoTemplate v1x. (Current Active)

Offline weatherbee

  • Senior Contributor
  • ****
  • Posts: 210
    • Sherman Ct. Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #443 on: December 09, 2014, 08:07:04 AM »
Quote
you either have to remove the cache file or wait for a fresh upload with wxsim

That was the reason.  I ran a new forecast.  Thanks for the help. 

Tom

Offline jonnyj771

  • Senior Contributor
  • ****
  • Posts: 220
    • Lightning Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #444 on: December 18, 2014, 04:14:12 PM »
Wim,
Maybe you can shed some light on this,  on the main (home) page the NWS forecast has an error in undefined variable 'echo' on line 101.
The forecast loads normally otherwise. Any suggestions or ideas?
Facebook:
Lightning Weather
   www.facebook.com/lightningweather
                             /groups/lightningweather
Lightning Weather Quad Cities
                             /lightningwxqc
                             /groups/lightningWXQC
Weather Station Hardware: Davis Vantage Pro2 6152
Weather Station Software: WD - 10.37S Build XXX (Beta)
Page Template: MeteoTemplate v1x. (Current Active)

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 #445 on: December 18, 2014, 04:33:26 PM »
Wim,
Maybe you can shed some light on this,  on the main (home) page the NWS forecast has an error in undefined variable 'echo' on line 101.
The forecast loads normally otherwise. Any suggestions or ideas?
http://lightningweather.com/quadcities/noaafct/noaaSettings.php?sce=view
line 101 is in errror, I will investigate tomorrow as it is night-time for CET

Change the line 101 from:
$echo    .=  '<!-- module '.$string.' -->'.PHP_EOL;
by removing the . before the = to
$echo    =  '<!-- module '.$string.' -->'.PHP_EOL;

It is wise to run the production site with debug switched off.
Change  line 6 (approximitly) in  weather2/index.php from
$wsDebug      = true;      // ##### make comment after testing
by adding a # on the first position to
#$wsDebug      = true;      // ##### make comment after testing

See also
http://wiki.leuven-template.eu/doku.php?id=how_to_install7#set_debug_mode_off

Wim

Offline jonnyj771

  • Senior Contributor
  • ****
  • Posts: 220
    • Lightning Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #446 on: December 18, 2014, 07:44:29 PM »
http://lightningweather.com/quadcities/noaafct/noaaSettings.php?sce=view
line 101 is in errror, I will investigate tomorrow as it is night-time for CET

Change the line 101 from:
$echo    .=  '<!-- module '.$string.' -->'.PHP_EOL;
by removing the . before the = to
$echo    =  '<!-- module '.$string.' -->'.PHP_EOL;



Wim,

I fixed line 101, Then noticed the "echo" was after the string. Note below...
if ($pageFile <> $pageName) {
   $string.= $pageFile .' loaded instead';
   
}
$echo = '<!-- module '.$string.' -->'.PHP_EOL;
#-------------------------------------------------------------------------------
#
I cut the echo and moved the } below the echo line...

if ($pageFile <> $pageName) {
   $string.= $pageFile .' loaded instead';
    $echo = '<!-- module '.$string.' -->'.PHP_EOL;
}
#-------------------------------------------------------------------------------
After I fixed that, I got another error on Line 177: Same thing...
#  Language array construct
$echo .= '<!-- Creating lang translate array -->'.PHP_EOL;
$ownTranslate   = true;
$wsnoaafctLOOKUP= array();            // array with FROM and TO languages
$missingTrans   = array();            // array with strings with missing translation requests
$myLangfile      = $wsnoaalang.'noaalanguage-'.$myLang.'.txt';

Took the '.' out of the string, then searched further to see if there were anymore...

Line 208...

      }  // eo is langlookup
   }  // eo for each lang record
   $echo .= '<!-- loaded: '.$loaded.' - skipped: '.$skipped.' - invalid: '.$invalid.' - used: '.$nLanglookup.' entries of file '.$myLangfile.' -->'.PHP_EOL;
} // eo file exist

I got all of them corrected and now the error is gone. Thanks for pointing me in the right direction.
I also wanted to advise you of the other lines that needed to be corrected.

Regards,

Jonny J.
« Last Edit: December 18, 2014, 07:48:57 PM by jonnyj771 »
Facebook:
Lightning Weather
   www.facebook.com/lightningweather
                             /groups/lightningweather
Lightning Weather Quad Cities
                             /lightningwxqc
                             /groups/lightningWXQC
Weather Station Hardware: Davis Vantage Pro2 6152
Weather Station Software: WD - 10.37S Build XXX (Beta)
Page Template: MeteoTemplate v1x. (Current Active)

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 #447 on: December 19, 2014, 02:41:50 AM »
. . .shortened . . .
Wim,
. . .
I got all of them corrected and now the error is gone. Thanks for pointing me in the right direction.
I also wanted to advise you of the other lines that needed to be corrected.

Regards,

Jonny J.
Good morning,
You are running a mixed 2.6 and 2.5 version scripts website. So small things like this can happen.

The full 2.6 or full 2.5 version do not show this behavior, but you solved it for your site, good work.

Wim

Offline Maumelle Weather

  • Forecaster
  • *****
  • Posts: 1825
    • Maumelle Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #448 on: December 22, 2014, 09:35:17 PM »
Hi Wim,

I am slowly re-adding pages to my site, but have a question regarding the menu. Is there a way to have pages that are listed on the wsMenuData.xml, but do not show on the menu be real pages via a link?  This would allow me to expand my site back to what I had prior to changing. Hope that makes sense.

Thanks,

John
GR2AE, GR3, Cumulus

Offline jonnyj771

  • Senior Contributor
  • ****
  • Posts: 220
    • Lightning Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #449 on: December 22, 2014, 09:44:36 PM »
Hi Wim,

I am slowly re-adding pages to my site, but have a question regarding the menu. Is there a way to have pages that are listed on the wsMenuData.xml, but do not show on the menu be real pages via a link?  This would allow me to expand my site back to what I had prior to changing. Hope that makes sense.

Thanks,

John

What sections are you looking to link to John?
Facebook:
Lightning Weather
   www.facebook.com/lightningweather
                             /groups/lightningweather
Lightning Weather Quad Cities
                             /lightningwxqc
                             /groups/lightningWXQC
Weather Station Hardware: Davis Vantage Pro2 6152
Weather Station Software: WD - 10.37S Build XXX (Beta)
Page Template: MeteoTemplate v1x. (Current Active)

 

anything