Page 16 of 19

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

Posted: Sun 01 Feb 2015 9:32 pm
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";

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

Posted: Sun 01 Feb 2015 10:24 pm
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.

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

Posted: Sun 01 Feb 2015 10:50 pm
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 !

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

Posted: Mon 02 Feb 2015 6:59 pm
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!

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

Posted: Mon 02 Feb 2015 11:16 pm
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:

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

Posted: Thu 05 Feb 2015 3:27 pm
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.

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

Posted: Thu 05 Feb 2015 6:45 pm
by beteljuice
Probably a wrong charset definition.

Link please ?

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

Posted: Thu 05 Feb 2015 7:57 pm
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.

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

Posted: Thu 05 Feb 2015 11:04 pm
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 ...

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

Posted: Fri 06 Feb 2015 2:33 am
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

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

Posted: Fri 06 Feb 2015 4:35 am
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

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

Posted: Sun 18 Sep 2016 9:11 am
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

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

Posted: Sun 18 Sep 2016 10:20 am
by duke
The zip downloads for me ok.

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

Posted: Tue 27 Sep 2016 2:05 pm
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:

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

Posted: Tue 27 Sep 2016 2:15 pm
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.