Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

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: 12685
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

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

Post by mcrossley »

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: 93
Joined: Sun 02 Jan 2011 9:38 am
Weather Station: Davis Vision-Vue
Operating System: Raspbian Jessie
Location: Stevenage, Herts, UK

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

Post by malkie »

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://elm30net.ddns.net
CumulusMX on Raspberry Pi4 B+ 2GB, running on Raspbian Buster booting from USB SSD
from a Davis Vantage Vue with VP2 ISS.
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

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

Post by beteljuice »

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: 93
Joined: Sun 02 Jan 2011 9:38 am
Weather Station: Davis Vision-Vue
Operating System: Raspbian Jessie
Location: Stevenage, Herts, UK

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

Post by malkie »

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://elm30net.ddns.net
CumulusMX on Raspberry Pi4 B+ 2GB, running on Raspbian Buster booting from USB SSD
from a Davis Vantage Vue with VP2 ISS.
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

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

Post by beteljuice »

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: 94
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 »

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: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

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

Post by beteljuice »

Probably a wrong charset definition.

Link please ?
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
K8POS
Posts: 94
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 »

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: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

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

Post by beteljuice »

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: 94
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 »

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: 94
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 »

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 »

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


Luca
duke

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

Post by duke »

The zip downloads for me ok.
User avatar
nking
Posts: 808
Joined: Thu 17 Dec 2009 2:03 pm
Weather Station: W-8681
Operating System: Windows 10
Location: Hurstpierpoint, West Sussex, UK
Contact:

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

Post by nking »

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: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

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

Post by beteljuice »

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