Author Topic: Leuven - snow heights  (Read 4270 times)

0 Members and 1 Guest are viewing this topic.

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5519
    • KomokaWeather
Re: Leuven - snow heights
« Reply #25 on: January 08, 2017, 12:45:13 PM »
Using http://www.harpersferry-weather.com/weather28/ws_snow/ws_snow.txt it displays the default ws_snow.txt details and this indicates nothing yet added for this snow season.
Using http://www.harpersferry-weather.com/weather28/ws_snow/ws_snow.php it displays: invalid call to script ws_snow.php but that is likely due to not having anything for the password
Using http://www.harpersferry-weather.com/weather28/index.php?p=ws_snow&snow&pw=XXXX it displays:
No snow file found and no input mode for snow-data selected
In the body of your home page.

The only other thing I can see is that you don't yet have the Snow on your menu but doubt if that would make any difference.
Sorry, nothing else I can suggest but Wim should be along sometime.

Paul

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Leuven - snow heights
« Reply #26 on: January 08, 2017, 02:03:39 PM »
Didn't make any difference in removing index.php.

Scripts are located in http://www.harpersferry-weather.com/weather28/ws_snow/

Home page says "No snow file found and no input mode for snow-data selected".
Compared to other templates ALL Leuven-scripts need to be defined in the menu file to run.

But your menu file http://www.harpersferry-weather.com/weather28/wsMenuData.xml  does not contain any snow entry.
So NO way you can run that script as all (but 2)  Leuven scripts will only run when loaded by index.php.
Add this again to your menu file.
Code: [Select]
<item nr      = "ws_snow"
        hide    = "yes"
        caption = "snow test"
        link    = "ws_snow/ws_snow.php"
        />
This will make the script executable, but it will NOT appear in the menu as the option hide is set.

When those lines are added to the menu file, this URL will display a page with the snow measurements
Code: [Select]
http://www.harpersferry-weather.com/weather28/?p=ws_snow
And this URL will display a page with the snow measurements and a data entry form. Add two things, your settings password from wsUserSettings.php  and the extra &snow. I assume your settings password is different from 12345, so add your own password.
Code: [Select]
http://www.harpersferry-weather.com/weather28/?p=ws_snow&snow&pw=12345
You can include the snow measurements also on your start-page as it is one of the components in wsStartPage.php.
Check my personal site:  http://weer.sluispark.be/index.php?lang=en

Wim

P.S. you may, do not have to add index.php to the URL as this is the default script executed by most webservers.

Offline tstorm

  • Contributor
  • ***
  • Posts: 141
    • Harpers Ferry Weather
Re: Leuven - snow heights
« Reply #27 on: January 08, 2017, 02:14:50 PM »
I added the code to http://www.harpersferry-weather.com/weather28/wsMenuData.xml.  When I run http://www.harpersferry-weather.com/weather28/?p=ws_snow&snow&pw=XXX I don't get a screen where I can added snow.  All I get is:

Date   Current height   Fresh   Melt
Date   Current height   Fresh   Melt

Manual measurements - unit used: in

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Leuven - snow heights
« Reply #28 on: January 08, 2017, 02:20:11 PM »
I added the code to http://www.harpersferry-weather.com/weather28/wsMenuData.xml.  When I run http://www.harpersferry-weather.com/weather28/?p=ws_snow&snow&pw=XXX I don't get a screen where I can added snow.  All I get is:

Date   Current height   Fresh   Melt
Date   Current height   Fresh   Melt

Manual measurements - unit used: in
XXX is not your settings password. You did not set any  password at all. Please: password protect your settings first.  Without password protection any  person could enter snow-heights to your site.

The snow-script and other scripts modifying sensitive data, will only run when you have a valid password in your settings and the password is in the URL itself.

Wim

Offline tstorm

  • Contributor
  • ***
  • Posts: 141
    • Harpers Ferry Weather
Re: Leuven - snow heights
« Reply #29 on: January 08, 2017, 02:29:35 PM »
I guess I don't fully understand.  I edited $SITE["password"]  in both the wsUserSettings.php and wsUserSettings.txt in the weather28/cache dir. with no success.  I have used the password in the url as you said
« Last Edit: January 08, 2017, 02:32:24 PM by tstorm »

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Leuven - snow heights
« Reply #30 on: January 08, 2017, 02:49:17 PM »
I guess I don't fully understand.  I edited $SITE["password"]  in both the wsUserSettings.php and wsUserSettings.txt in the weather28/cache dir. with no success.  I have used the password in the url as you said
A cache is a cache, not a storage area for permanent files.

Your wsUserSettings.php are in weather28/_my_texts/
Please delete the old ones which are in your cache. They were generated and temporarily stored there when installing the template as described in  http://leuven-template.eu/dokuwiki28/doku.php?id=en:check_these_first

Wim

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5519
    • KomokaWeather
Re: Leuven - snow heights
« Reply #31 on: January 08, 2017, 03:37:07 PM »
Looks like Harpers Ferry Weather snow is now displaying  =D&gt;

Quote
The only other thing I can see is that you don't yet have the Snow on your menu but doubt if that would make any difference.
I didn't realize that it needed to be added to the menu but had noticed it was not on Harpers Ferry Weather when compared to mine where I had it included.  I learned something inadvertently.  While it needs to be added I presume it makes no difference if it is visible or hidden. 

Quote
Leuven scripts will only run when loaded by index.php.
I start my page by www.komokaweather.com/weather28
and presume that since index.php is in that folder it then automatically starts as www.komokaweather.com/weather28/index.php

Thanks,

Enjoy,
Paul

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5519
    • KomokaWeather
Re: Leuven - snow heights
« Reply #32 on: January 03, 2019, 11:27:44 AM »
Continuing on the same thread... I have entered snow for Dec 2018 and now Jan 2019 but the table only shows for 2019 http://www.komokaweather.com/weather28/

This is from the .txt file
Code: [Select]
|2018|12|22|deft|2|2|
|2018|12|23|deft|2|0|
|2018|12|24|deft|0|0|
|2018|12|26|deft|.1|.1|
|2018|12|27|deft|0|0|
|2019|01|02|deft|0|.10|
|2019|01|03|deft|1|1|
I can't recall this issue in previous years and have searched but not found anything.  I have checked ws_snow.php but can't see anything that I could change there.  Any suggestion?


Thanks,
Paul
« Last Edit: January 03, 2019, 11:37:40 AM by PaulMy »

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Leuven - snow heights
« Reply #33 on: January 03, 2019, 02:36:59 PM »
Continuing on the same thread... I have entered snow for Dec 2018 and now Jan 2019 but the table only shows for 2019 http://www.komokaweather.com/weather28/

This is from the .txt file
Code: [Select]
|2018|12|22|deft|2|2|
|2018|12|23|deft|2|0|
|2018|12|24|deft|0|0|
|2018|12|26|deft|.1|.1|
|2018|12|27|deft|0|0|
|2019|01|02|deft|0|.10|
|2019|01|03|deft|1|1|
I can't recall this issue in previous years and have searched but not found anything.  I have checked ws_snow.php but can't see anything that I could change there.  Any suggestion?


Thanks,
Paul
I think a lot of updates are needed for this site. Or not-working pages removed from the menu.

The snow script is also outdated, I attach a more recent version.

Wim

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5519
    • KomokaWeather
Re: Leuven - snow heights
« Reply #34 on: January 03, 2019, 09:54:11 PM »
Thanks Wim, That fixed it.
It is possible that I had previously updated the script but I had a complete site crash this past October and had to restore from a 2017 backup which likely contained the older version.
I will need to do a script by script review to check for other updates.

Regards,
Paul

 

anything