Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post 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

Moderators: daj, TNETWeather

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

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

Postby mcrossley » Sun Feb 01, 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 Jan 02, 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

Postby malkie » Sun Feb 01, 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: 2455
Joined: Tue Dec 09, 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

Postby beteljuice » Sun Feb 01, 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 Jan 02, 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

Postby malkie » Mon Feb 02, 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: 2455
Joined: Tue Dec 09, 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

Postby beteljuice » Mon Feb 02, 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: 75
Joined: Sat Jan 03, 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

Postby K8POS » Thu Feb 05, 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: 2455
Joined: Tue Dec 09, 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

Postby beteljuice » Thu Feb 05, 2015 6:45 pm

Probably a wrong charset definition.

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

User avatar
K8POS
Posts: 75
Joined: Sat Jan 03, 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

Postby K8POS » Thu Feb 05, 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: 2455
Joined: Tue Dec 09, 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

Postby beteljuice » Thu Feb 05, 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: 75
Joined: Sat Jan 03, 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

Postby K8POS » Fri Feb 06, 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: 75
Joined: Sat Jan 03, 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

Postby K8POS » Fri Feb 06, 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 Sep 05, 2016 3:09 pm
Weather Station: PCE-FWS-20
Operating System: RaspBerry PI3

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

Postby striluca » Sun Sep 18, 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 viewtopic.php?f=14&t=5754.
There is only the Name noaa-reports. Zip


Luca

User avatar
duke
Posts: 845
Joined: Sun Jul 03, 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

Postby duke » Sun Sep 18, 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 Dec 17, 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

Postby nking » Tue Sep 27, 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: 2455
Joined: Tue Dec 09, 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

Postby beteljuice » Tue Sep 27, 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 !


Return to “Web site - General”

Who is online

Users browsing this forum: No registered users and 5 guests