Page 17 of 19

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

Posted: Wed 28 Sep 2016 1:47 pm
by nking
Hi Beteljuice,

Thanks for replying. I do want to use your pack, in fact that is what I downloaded and attempted to follow but alas I must have got something wrong. Unfortunately, my knowledge is so poor that I don't have the skill to understand or resolve what I've done wrong and your suggestion to amend the css to resolve it is beyond my comprehension. I'm sure you probably feel like :roll: , but if you are able to provide idiot level instructions then I'll try to follow them to the best of my ability :?

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

Posted: Wed 28 Sep 2016 3:02 pm
by Mapantz
nking wrote:Hi Beteljuice,

Thanks for replying. I do want to use your pack, in fact that is what I downloaded and attempted to follow but alas I must have got something wrong. Unfortunately, my knowledge is so poor that I don't have the skill to understand or resolve what I've done wrong and your suggestion to amend the css to resolve it is beyond my comprehension. I'm sure you probably feel like :roll: , but if you are able to provide idiot level instructions then I'll try to follow them to the best of my ability :?
Have you got noaarep.css in the correct place on your server?

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

Posted: Sun 14 May 2017 4:14 pm
by mitmania
Hi all, I ask your advice to resolve a display issue of some characters that the program does not display properly: for example, "Falzè " becomes "Falz�", "°C" becomes "�C".

Thank you!!!!

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

Posted: Sun 14 May 2017 5:06 pm
by beteljuice
Your page 'charset' is probably not correctly being applied - there have been problems like this on other things as well.

Hopefully someone using your language can come to the rescue.

A link to your page please ......

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

Posted: Sun 14 May 2017 5:17 pm
by mitmania

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

Posted: Sat 20 May 2017 4:03 pm
by sfws
Do the reports look ok when you look at them via Cumulus 'View' menu?
I'm guessing your problem is with the reports, not the web viewer?
Have you selected UTF-8 character set, or defaulted to your PC's code, in Cumulus 'Configuration' menu, 'NOAA Setup' screen?

From Wiki:
0 = Uses the encoding used for the viewer's operating system's default ANSI code page.
1 = Uses UTF8 (UCS Transformation Format—8-bit) format - the dominant character encoding for the World-Wide Web as using one to three bytes it represents most characters in common use covering most languages.
I'm unsure which is right for you (I actually have it ticked for me), but you could either untick (=0) or tick (=1) to reverse your current selection.

I wonder if I should be celebrating, or saddened, as this is my 300th post!

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

Posted: Mon 22 May 2017 4:45 am
by mitmania
Solved !! ... I had to tick the UTF-8 option from the configuration of the Cumulus NOOA report. Thanks for swfs reply !!!!

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

Posted: Sun 15 Apr 2018 4:03 pm
by harlock26
Hi all, I ask for advice to solve a problem with Noaa data. I can not view Cumulus Noaa data in the Saratoga template. You can see the year and month buttons but the data are not loaded. Can someone help me solve the problem? This is the web page http://www.meteoalbianotn.altervista.or ... eports.php thanks

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

Posted: Sun 15 Apr 2018 4:44 pm
by PaulMy
Do the NOAA YR and MO reports actually exist on your website?
Do you have the correct path in Settings-weather.php?

Code: Select all

# For NOAA reports
$SITE['NOAAdir']        = '../weather/reports/';   // relative location of the NOAA report files
and important that spelling is correct for your file i.e. reports vs Reports

Enjoy,
Paul

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

Posted: Sun 15 Apr 2018 6:19 pm
by harlock26
These are my parameters

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

Posted: Sun 15 Apr 2018 6:46 pm
by PaulMy
Your reports appear here http://www.meteoalbianotn.altervista.or ... YR2018.TXT
but in my set up i have it as http://www.komokaweather.com/weather/re ... YR2018.txt

Not sure of the file extension in capitals TXT vs txt would make a difference.

Paul

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

Posted: Sun 15 Apr 2018 7:24 pm
by harlock26
Now it works, changed from TXT to txt. Thank you :clap: :clap:

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

Posted: Sun 15 Apr 2018 7:36 pm
by PaulMy
Glad you have it working as should be. I am not very knowledgeable but have picked up a few key things overt the years from the many posts here.

Enjoy again.
Paul

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

Posted: Wed 01 Jan 2020 12:56 am
by BCJKiwi
Hi all.
Posted this on https://www.wxforum.net/index.php as well but - file name is different.

Running Cumulus MX in New Zealand (we see issues early!)

Found that
NOAA-reports.php (Version 3.4)
generates an error
Notice: Undefined index: NOAAYR2020.txt in C:\wamp64\www\weather\NOAA-reports.php on line 294

This fix seems to work:-
$nav_build = array(); // initialise, will become eg. $nav_build[2011][found_year, months[] ]
// Check if it is first day of the year. The reports are always for the previous day so for new years day reduce year by one.
if ( date('z') === '0' ) { $now_year = $now_year - 1 ; }
for ($y = $now_year; $y >= $first_year; $y--) { // populate $nav_build array()

Add the two lines that are bold between line 285 and 286.


Actually better placed between lines 169 and 170

$now_year = $now['year'];
// Check if it is first day of the year. The reports are always for the previous day so for new years day reduce year by one.
if ( date('z') === '0' ) { $now_year = $now_year - 1 ; }

$prior_month = $now['mon'] - 1;

You may notice these errors were reported on a local development server where most errors display. The error did not show on the public website as our hosting service suppresses most errors.

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

Posted: Wed 01 Jan 2020 11:29 am
by mcrossley
I am running an *much* older version (3.1) but modified by me. I took a different approach and just subtract 1 day at the very start, it simplifies things greatly! It then copes with both the change of the month and the year. Maybe the betlejuice could incorporate something like this?...

Code: Select all

$now = date_create('now')->modify('-1 day');
$now_month = $now->format('m');
$now_year = $now->format('Y');