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 4019) - 03 April 2024

Legacy Cumulus 1 release 1.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

NOAA-reports.php

Discussion of Ken True's web site templates

Moderator: saratogaWX

Post Reply
water01
Posts: 3246
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

NOAA-reports.php

Post by water01 »

I am looking after the website of someone who had it built by someone else before I came along.

His Daily reports are showing the same symptoms as this topic https://cumulus.hosiene.co.uk/viewtopic.p ... AA+reports , but his code is using a piece of php called NOAA-reports.php not the include-NOAA-reports.php described in, and released in this topic.

The code of the two are total different, so could I ask someone to explain what the differences are and the best way to proceed?

Thank you in advance.
David
Image
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: NOAA-reports.php

Post by William Grimsley »

Hi water01,

The only advice I could give is that he could do this on his page:

Code: Select all

<div id="main-copy">
    
    <h1><?php langtrans('NOAA Reports'); ?></h1> 
    <br/>
    <?php 
$doInclude = true;
include_once("NOAA-reports.php") ?>

</div><!-- end main-copy -->
If he does that and has the "include-NOAA-reports.php" file on his site, then that might solve the problem.

Otherwise, I don't know what the problem could be. Sorry.

Hope this helps...

William
water01
Posts: 3246
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: NOAA-reports.php

Post by water01 »

William Grimsley wrote:Hi water01,

The only advice I could give is that he could do this on his page:

Code: Select all

<div id="main-copy">
    
    <h1><?php langtrans('NOAA Reports'); ?></h1> 
    <br/>
    <?php 
$doInclude = true;
include_once("NOAA-reports.php") ?>

</div><!-- end main-copy -->
If he does that and has the "include-NOAA-reports.php" file on his site, then that might solve the problem.

Otherwise, I don't know what the problem could be. Sorry.

Hope this helps...

William
I don't wish to be rude but did you even read what I said?

Firstly
I am looking after the website of someone who had it built by someone else before I came along.
i.e. I am doing the modifications not him.

Secondly
but his code is using a piece of php called NOAA-reports.php
so you just gave me a fix that is exactly the same as I stated and doesn't show me how to use include-NOAA-reports.php which is what was fixed to sort the 2013 problem out.

Sorry but this did not work and tells me nothing.
David
Image
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: NOAA-reports.php

Post by beteljuice »

Is it this one ? https://cumulus.hosiene.co.uk/viewtopic.php?f=14&t=5754

You aren't telling us much - how about a link ?
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: NOAA-reports.php

Post by William Grimsley »

beteljuice wrote:Is it this one ? https://cumulus.hosiene.co.uk/viewtopic.php?f=14&t=5754

You aren't telling us much - how about a link ?
Exactly! I was just trying to be helpful. I can't diagnose with that first post which is totally completely inadequate!
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: NOAA-reports.php

Post by William Grimsley »

water01 wrote:
William Grimsley wrote:Hi water01,

The only advice I could give is that he could do this on his page:

Code: Select all

<div id="main-copy">
    
    <h1><?php langtrans('NOAA Reports'); ?></h1> 
    <br/>
    <?php 
$doInclude = true;
include_once("NOAA-reports.php") ?>

</div><!-- end main-copy -->
If he does that and has the "include-NOAA-reports.php" file on his site, then that might solve the problem.

Otherwise, I don't know what the problem could be. Sorry.

Hope this helps...

William
I don't wish to be rude but did you even read what I said?

Firstly
I am looking after the website of someone who had it built by someone else before I came along.
i.e. I am doing the modifications not him.

Secondly
but his code is using a piece of php called NOAA-reports.php
so you just gave me a fix that is exactly the same as I stated and doesn't show me how to use include-NOAA-reports.php which is what was fixed to sort the 2013 problem out.

Sorry but this did not work and tells me nothing.
Yeh, what I'm trying to say is YOU not HIM!

I know, I never said this WAS going to DEFINITELY work! Read what I said! :bash: :bash:
water01
Posts: 3246
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: NOAA-reports.php

Post by water01 »

beteljuice, sorry if I have not made myself clear.

In this Topic https://cumulus.hosiene.co.uk/viewtopic.p ... AA+reports it is indicated that there was a fix applied to some php code called include-NOAA-reports.php which I downloaded and looked at.

The php currently used on the web site I am maintaining is NOAA-reports.php. I looked at that code but it has a different version number and some comments (excuse them they are in the code not my comments)

Code: Select all

// NOAA-reports.php
// Original Author:  Ken True  webmaster@saratoga-weather.org
//
// Heavily modified, primarily for CUmulus, but will also work for WeatherLink and VWS
// bodged by beteljuice - V3.1 Nov. 2011


to the comments in include-NOAA-report.php

Code: Select all

//------------------------------------------------
// safely display NOAA style text report files
// Author:  Ken True - webmaster@saratoga-weather.org
// Version: 1.02  12-Mar-2006 - Initial release
// Version: 1.03  13-Aug-2006 - added downloader and include capability
// Version: 1.04  01-Dec-2007 - added WL auto update for prior month/year rollover
// initialize request variables
// Version: 1.05  01-Jan-2008 - added timezone to fix year rollover issue
// Version: 1.06  03-Oct-2008 - added variables for WL LastMonth/LastYear files
// Version  2.00  15-Jan-2011 - adapted for use with template sets
// Version 2.00 - 27-Jan-2011 - modified for multilingual and new wx templates
// Version 2.01 - 11-Jun-2011 - fixed Notice: errata in script
// Version 2.02 - 27-Aug-2011 - added Cumulus support (thanks to beteljuice at http://www.beteljuice.com/ )
// Version 2.03 - 03-Dec-2011 - fixed WeatherLink auto file copy for start of month/year, added RTL language support
// Version 2.04 - 03-Jul-2012 - added wview support
// Version 2.05 - 01-Jan-2013 - fixed 01-Jan display issues
I was am confused that there seems to be two pieces of code trying to do the same thing that bear no relation to each other in terms of code content, version number and how they work, so I was asking for clarification i.e. has one superceded the other, one is replacement for the other with different parameters etc.

Thank you for the link I will take a look there.
David
Image
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: NOAA-reports.php

Post by William Grimsley »

water01 wrote:beteljuice, sorry if I have not made myself clear.

In this Topic https://cumulus.hosiene.co.uk/viewtopic.p ... AA+reports it is indicated that there was a fix applied to some php code called include-NOAA-reports.php which I downloaded and looked at.

The php currently used on the web site I am maintaining is NOAA-reports.php. I looked at that code but it has a different version number and some comments (excuse them they are in the code not my comments)

Code: Select all

// NOAA-reports.php
// Original Author:  Ken True  webmaster@saratoga-weather.org
//
// Heavily modified, primarily for CUmulus, but will also work for WeatherLink and VWS
// bodged by beteljuice - V3.1 Nov. 2011


to the comments in include-NOAA-report.php

Code: Select all

//------------------------------------------------
// safely display NOAA style text report files
// Author:  Ken True - webmaster@saratoga-weather.org
// Version: 1.02  12-Mar-2006 - Initial release
// Version: 1.03  13-Aug-2006 - added downloader and include capability
// Version: 1.04  01-Dec-2007 - added WL auto update for prior month/year rollover
// initialize request variables
// Version: 1.05  01-Jan-2008 - added timezone to fix year rollover issue
// Version: 1.06  03-Oct-2008 - added variables for WL LastMonth/LastYear files
// Version  2.00  15-Jan-2011 - adapted for use with template sets
// Version 2.00 - 27-Jan-2011 - modified for multilingual and new wx templates
// Version 2.01 - 11-Jun-2011 - fixed Notice: errata in script
// Version 2.02 - 27-Aug-2011 - added Cumulus support (thanks to beteljuice at http://www.beteljuice.com/ )
// Version 2.03 - 03-Dec-2011 - fixed WeatherLink auto file copy for start of month/year, added RTL language support
// Version 2.04 - 03-Jul-2012 - added wview support
// Version 2.05 - 01-Jan-2013 - fixed 01-Jan display issues
I was am confused that there seems to be two pieces of code trying to do the same thing that bear no relation to each other in terms of code content, version number and how they work, so I was asking for clarification i.e. has one superceded the other, one is replacement for the other with different parameters etc.

Thank you for the link I will take a look there.
Sorry, that's beyond me! Let beteljuice take a look at it! :D
User avatar
saratogaWX
Posts: 1185
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: NOAA-reports.php

Post by saratogaWX »

Will,
It's probably best that you not offer advice where you are lacking in expertise to solve the issue. As you can see by this thread, it causes more harm than good and makes for a lot of nonsensical posts that are not helpful in solving the issue.

Water01:

There are two, very different versions of the NOAA reports scripts. Both are based on my original script, but have different operation and have diverged a bit over time.

The include-NOAA-reports.php script is part of the Saratoga AJAX/PHP templates and is supported by me.

The NOAA-reports.php script is beteljuice's modifications to my original NOAA-reports.php script (which supported only WeatherLink and VWS) to add Cumulus support and some fancy handling of the top links for the year/month selections.

I had incorporated some of beteljuice's mods to an earlier version of my script (not quite so fancy year/month selection support), but the include-NOAA-reports.php script from the templates now supports WeatherLink, VWS, Cumulus and wview NOAA files.

So.. with a bit of the pedigree of the scripts as background, which script are you having issues with?

As beteljuice said, it would be really helpful to have a URL to the site evidencing the problem so we could help diagnose the error in situ.

Best regards,
Ken
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: NOAA-reports.php

Post by William Grimsley »

saratogaWX wrote:Will,
It's probably best that you not offer advice where you are lacking in expertise to solve the issue. As you can see by this thread, it causes more harm than good and makes for a lot of nonsensical posts that are not helpful in solving the issue.
Ok, sorry. :oops:
water01
Posts: 3246
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: NOAA-reports.php

Post by water01 »

Thanks Ken, exactly what I was looking for.

Just to put you in the picture the owner of the site appealed for help and I have been tidying things up, repairing things and adding and amending bits that were not working or were out of date, plus the additional problem that their previous computer failed and although Cumulus was running the website had not been running for about 1.5 months at the end of last year because of a lack of knowledge about uploads etc. It is all now working again but we noticed that the NOAA reports were not working beyond 2012, and the owner noticed your topic where it was fixed for 2013, which is where my confusion arose becuase I saw two versions that seemed to produce the same output.

The page in question is here http://www.harwichweather.eu/daily.php and it uses NOAA-reports.php embedded in what I can only call pseudo php page (mainly html with php wrapping).

Now I understand I guess what I am looking for is a fixed NOA-reports.php which has the same patch as your code as the one on the site is dated Nov 2011, hence I guess why beteljuice pointed me at his Topic.
Last edited by water01 on Sat 02 Feb 2013 12:55 am, edited 1 time in total.
David
Image
User avatar
saratogaWX
Posts: 1185
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: NOAA-reports.php

Post by saratogaWX »

Ouch.. that page is really broken.

If you have FTP access to the site in question, I suggest you look at the directory <docroot>/NOAA-reports/

Remove any files that do not have the format:

NOAAMOmmyy.txt or
NOAAYRyyyy.txt

it's likely there's a rogue file or two that is confusing the script. That would be the 'easy fix'.

Best regards,
Ken
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: NOAA-reports.php

Post by beteljuice »

THAT is the stand-alone Cumulus version which I refered you to earlier.

I can't say about the way it has been include the page, but the apparent problems that you have are I think as Ken suggested is garbage in the reports directory.

It should be possible to delete them and rebuild all the reports through Cumulus.
Image
......................Imagine, what you will KNOW tomorrow !
Post Reply