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
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

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

Post by steve »

southhedlandweather wrote:how do i create the NOAA reports with cumulus???
They're in 1.9.2, on the 'View' menu.
Steve
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 »

At the moment my climate report is 10 point http://www.pc-king.co.uk/weather/climate.php and I would like to change it to 11 or 12 point. My css knowledge is non existent but wondered rather than mess with the existing css I could use inline instructions. Could someone show me the code to allow this - thanks
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

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

Post by steve »

It looks like the font sizes are in the code rather than CSS. There's

<pre style="font-size: 9pt;">

which sets the size for the first (daily) table. Then further down, there are a number of these:

<PRE style="font-size: 10.0pt;

So I think you just need to change those.
Steve
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

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

Post by steve »

Here is the relevant line in the php for the first one:

echo "<pre style=\"font-size: 9pt;\">\n";

I think the other table is something you've added yourself?
Steve
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 »

steve wrote:Here is the relevant line in the php for the first one:

echo "<pre style=\"font-size: 9pt;\">\n";

I think the other table is something you've added yourself?
Steve -Thanks for the pointer. And yes the other table is purely guidance for a UK norm. (oops sent you a PM in error :oops: )
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 »

Done - always simple if you know how :) Thanks again Steve.
echo "<pre style=\"font-size: 11pt;\">\n"; fits just right ;)
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 »

Update: https://cumulus.hosiene.co.uk/viewtopic.p ... 194#p49194

bug fix
Improved (optional) CSS and (optional) Menu systems.
Image
......................Imagine, what you will KNOW tomorrow !
muppet77
Posts: 90
Joined: Wed 30 Dec 2009 6:45 pm
Weather Station: Vantage Vue
Operating System: Windows 7
Location: Berks, UK

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

Post by muppet77 »

wow. great script steve!

is there a way to edit the script if i have my noaa files in my root directory ie no sub directory?

i tried changing the line

Code: Select all

if ($Naming == 'CU') {
  $NOAAdir = './noaa';      // point to your NOAA file sub-directry
to

Code: Select all

if ($Naming == 'CU') {
  $NOAAdir = ' ';      // point to your NOAA file sub-directry
or
''
.
./
/
""
but none of the above worked.

thanks for anyone's ideas.
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 »

Your 'existing' example does not exist ?
The 'CU' default option should be:

Code: Select all

if ($Naming == 'CU') {
  $NOAAdir = './NOAA-reports';      // point to your NOAA file sub-directry
//  NO current NOAA month or yearly files
}
Did you modify the VWS option instead ?

If the script is in the same directory as the reports (why ?)
Then:

Code: Select all

  $NOAAdir = ''; // null content OR

  $NOAAdir = './';
Should work !

You have given no info about your location, your operating system .... and no link to the errant page - people here can get pretty good at second guessing problems, but ....

OK.
I eventually found your site after trawling through the school portal (900 lines of code for the menus and page set-up :shock: )

I can find your Cumulus format reports http://www.maidenerleghweather.com/NOAAMO0911.txt, but I can't find the script (did you rename it ? or is it on the school server instead [won't work !])
Image
......................Imagine, what you will KNOW tomorrow !
muppet77
Posts: 90
Joined: Wed 30 Dec 2009 6:45 pm
Weather Station: Vantage Vue
Operating System: Windows 7
Location: Berks, UK

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

Post by muppet77 »

Whoops.

I did rename it as

www.maidenerleghweather.com/noaa.php

and its just easier to upload the reports into the root.

is it possible?
muppet77
Posts: 90
Joined: Wed 30 Dec 2009 6:45 pm
Weather Station: Vantage Vue
Operating System: Windows 7
Location: Berks, UK

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

Post by muppet77 »

I use go daddy hosting which copes with php 5.

my OS on my pc is xp.

I tried both those code edits without success.

when I create a directory and put the reports in it, then point the code at it, it all works, so I'm not far off.

I just don't want them in a folder.

any ideas?
muppet77
Posts: 90
Joined: Wed 30 Dec 2009 6:45 pm
Weather Station: Vantage Vue
Operating System: Windows 7
Location: Berks, UK

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

Post by muppet77 »

well done for finding the reports too Steve.

apologies for the lack of clues, I thought the line of code was enough.

amazing detective work.

sorry again and thanks.
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 »

muppet77 wrote:well done for finding the reports too beteljuice

I thought the line of code was enough...
It should have been !

If I put your script in my reports directory - everything works without any glitch.


EDIT: The opendir() function has problems working in the 'root' directory.
It will probably work if you put in the server path to your web pages root:
eg. "/home/bert/public_html/"

If that doesn't work you will have to create a sub-directory for your reports.
Last edited by beteljuice on Sat 02 Feb 2013 1:52 pm, edited 2 times in total.
Image
......................Imagine, what you will KNOW tomorrow !
Palmyweather
Posts: 52
Joined: Sat 28 Nov 2009 9:57 am
Weather Station: W1081
Operating System: Windows 7
Location: New Zealand
Contact:

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

Post by Palmyweather »

Got mine all up and running on my website. Also have my data back dated to 2009.

The link for my page is http://palmyweather.co.nz/history.php

Thank you for developing this script with easy to use instructions.
Check my Palmerston North, New Zealand weather station out at https://palmyweather.co.nz .

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: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by beteljuice »

Got mine all up and running on my website. Also have my data back dated to 2009
Any reason why you are using the 'old' version ?
Image
......................Imagine, what you will KNOW tomorrow !
Post Reply