Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See the Wiki for download

PHP Web 'viewer' for Cumulus NOAA Style reports

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

User avatar
mcrossley
Posts: 5210
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by mcrossley » Sun 01 Feb 2015 9:32 pm

Looks like I amended my script at some point. Mine reads like this...

Code: Select all

		//if($y != $first_year) { $nav_build[$y]['months'][$m-1] .= "<br />\n";}
		$nav_build[$y]['months'][$m-1] .= "<br>\n";

malkie
Posts: 65
Joined: Sun 02 Jan 2011 9:38 am
Weather Station: Watson W-8681
Operating System: XP SP3
Location: Stevenage, Herts, UK

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by malkie » Sun 01 Feb 2015 10:24 pm

beteljuice wrote:How very odd, you may just have found a bug, but why it only seems to affect you ????

Try changing line #432:

Code: Select all

if($yr != $first_year) { $full_nav2 .= "<br />\n";}
To ..

Code: Select all

if($y != $first_year) { $full_nav2 .= "<br />\n";}
See if that fixes things.
Thanks beteljuice, that has fixed it (it was line 423 BTW). :D

It is not just me, there is a post from PaulMy in this thread (Sun Dec 07, 2014 2:24 pm) where he has noticed the same thing, and noticed it on a page on your site. It was that post that led me to try and solve it. Maybe others have limited the width of the page more, as jdc suggests that would solve it by forcing the line to finish at about the right place.

Thanks to everyone who responded, I've learnt a little about scripting just to be able to ask a sensible question!

The host name of my windows weather station is slartibartfast, my home server, (now deceased) was Zaphod and my main PC is still Deepthought. Yes I'm another Douglas Adams fan.
Malcolm
North Herts, UK
http://www.elmnet-weather.net
Cumulus 3 on Raspberry Pi 2, running on Raspbian, from a Davis Vantage Vue.

User avatar
beteljuice
Posts: 2510
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by beteljuice » Sun 01 Feb 2015 10:50 pm

I still can't 'see' where the original posted constant ($yr) is being changed within the script, nor why so very few people are affected by the bug.

However; Current users are advised to modify the code as above and I will upload a new zip.

@ malkie - Thank you very much for bringing it my attention - really !
Image
......................Imagine, what you will KNOW tomorrow !

malkie
Posts: 65
Joined: Sun 02 Jan 2011 9:38 am
Weather Station: Watson W-8681
Operating System: XP SP3
Location: Stevenage, Herts, UK

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by malkie » Mon 02 Feb 2015 6:59 pm

beteljuice wrote:I still can't 'see' where the original posted constant ($yr) is being changed within the script, nor why so very few people are affected by the bug.

However; Current users are advised to modify the code as above and I will upload a new zip.

@ malkie - Thank you very much for bringing it my attention - really !
beteljuice, have at look at this site: http://www.g4glp.co.uk/

Same odd behaviour as mine!
Malcolm
North Herts, UK
http://www.elmnet-weather.net
Cumulus 3 on Raspberry Pi 2, running on Raspbian, from a Davis Vantage Vue.

User avatar
beteljuice
Posts: 2510
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by beteljuice » Mon 02 Feb 2015 11:16 pm

Once again, looks OK in FF.

So because the <br />'s weren't being created it relied on css being obeyed, but it seems different browsers are applying different priorities :roll:
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
K8POS
Posts: 93
Joined: Sat 03 Jan 2015 4:17 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 7
Location: Thumb of Michigan
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by K8POS » Thu 05 Feb 2015 3:27 pm

Ok, I guess I am getting brain dead from reading, and trying to understand all the post on here.

1) I am getting the strange characters at the top of my NOAA reports page:

 Monthly Climatological Summary for Jan 2015

Name: Hog Town City: Melvin State: Michigan
Elevation: 843 ft Lat: N 43° 11' 01" Lon: W 082° 51' 43"

Temperature (°F), Rain (in), Wind Speed (mph)

2) Which file/s do I edit to add the navigation bar at the bottom? The PHP or the CSS

I have edited all my T.htm files to include the NOAA_Reports in the navigation bar. Those were easy.

User avatar
beteljuice
Posts: 2510
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by beteljuice » Thu 05 Feb 2015 6:45 pm

Probably a wrong charset definition.

Link please ?
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
K8POS
Posts: 93
Joined: Sat 03 Jan 2015 4:17 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 7
Location: Thumb of Michigan
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by K8POS » Thu 05 Feb 2015 7:57 pm

Opps...
Link would help now.
Get the same thing no matter what browser I use.

http://melvinweather.com/NOAA-reports.php

Figured out how to add the navigation bar at the bottom, will work on it when I get home.

EDIT: Just noticed if I set the browser I am using from automatic to "UTF-8" formatting problem goes away.

User avatar
beteljuice
Posts: 2510
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by beteljuice » Thu 05 Feb 2015 11:04 pm

If the reports are being saved as UTF-8 (no BOM) then the 'holding' page charset should also be declared / saved as UTF-8

No doubt others can explain better ...
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
K8POS
Posts: 93
Joined: Sat 03 Jan 2015 4:17 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 7
Location: Thumb of Michigan
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by K8POS » Fri 06 Feb 2015 2:33 am

Will turn off UTF-8 in CUmulus when I get home, and resave the existing files with out the UTF-8 and see what that does.

Thank you for having a look.

Bob

User avatar
K8POS
Posts: 93
Joined: Sat 03 Jan 2015 4:17 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 7
Location: Thumb of Michigan
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by K8POS » Fri 06 Feb 2015 4:35 am

Fixed it......

Line 136 was:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

Changed it to:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

Strange characters are gone..... :clap:

Also have a navigation bar working, may not be the prettiest solution but it works.
http://melvinweather.com/NOAA-reports.php

Thanks for the help

striluca
Posts: 1
Joined: Mon 05 Sep 2016 3:09 pm
Weather Station: PCE-FWS-20
Operating System: RaspBerry PI3

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by striluca » Sun 18 Sep 2016 9:11 am

Hi all,
Can you help me to retrieve the script about noaa reports? I didn't found it in This Topic http://sandaysoft.com/forum/viewtopic.php?f=14&t=5754.
There is only the Name noaa-reports. Zip


Luca

User avatar
duke
Posts: 840
Joined: Sun 03 Jul 2011 6:23 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 - 64 bit
Location: Eastleigh, Hampshire, UK
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by duke » Sun 18 Sep 2016 10:20 am

The zip downloads for me ok.
Duke

Nightingale Weather
Eastleigh, Hampshire, UK
------------------------------------------------------
Validate your pages - often!

User avatar
nking
Posts: 804
Joined: Thu 17 Dec 2009 2:03 pm
Weather Station: WH1081
Operating System: Windows 10
Location: Hurstpierpoint, West Sussex, UK
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by nking » Tue 27 Sep 2016 2:05 pm

I wonder if someone might help me out. It's been quite some time since I tinkered with my site and to be honest I'm out of my depth. I've been trying to get the NOAA reports drop down menu to display correctly http://www.pc-king.co.uk/weather/climate.php . Whilst it does work, of sorts, when selecting a different year it's not obvious that you need to select ^/V. If you are able to help please bear in mind that I'm a numpty :roll:

User avatar
beteljuice
Posts: 2510
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by beteljuice » Tue 27 Sep 2016 2:15 pm

You need a bit of CSS to box or border your selection(s) to make it more obvious (I take it you don't like the ones in the 'pack' ?)

OR

You could change the up/down chars to graphics.
Image
......................Imagine, what you will KNOW tomorrow !

Post Reply