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

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

Postby steve » Thu Sep 15, 2011 11:16 am

southhedlandweather wrote:how do i create the NOAA reports with cumulus???

They're in 1.9.2, on the 'View' menu.
Steve
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development since I have retired from my day job

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 » Sat Sep 17, 2011 8:39 am

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

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

Postby steve » Sat Sep 17, 2011 8:46 am

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
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development since I have retired from my day job

User avatar
steve
Cumulus Author
Posts: 26467
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

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

Postby steve » Sat Sep 17, 2011 8:50 am

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
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development since I have retired from my day job

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 » Sat Sep 17, 2011 8:56 am

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: 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 » Sat Sep 17, 2011 9:09 am

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

User avatar
beteljuice
Posts: 2463
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 » Sat Sep 17, 2011 10:46 pm

Update: viewtopic.php?f=14&t=5754&p=49194#p49194

bug fix
Improved (optional) CSS and (optional) Menu systems.
Image
......................Imagine, what you will KNOW tomorrow !

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

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

Postby muppet77 » Sun Sep 18, 2011 6:48 pm

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: 2463
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 Sep 18, 2011 11:16 pm

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 Dec 30, 2009 6:45 pm
Weather Station: Vantage Vue
Operating System: Windows 7
Location: Berks, UK

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

Postby muppet77 » Mon Sep 19, 2011 5:24 am

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 Dec 30, 2009 6:45 pm
Weather Station: Vantage Vue
Operating System: Windows 7
Location: Berks, UK

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

Postby muppet77 » Mon Sep 19, 2011 5:28 am

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 Dec 30, 2009 6:45 pm
Weather Station: Vantage Vue
Operating System: Windows 7
Location: Berks, UK

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

Postby muppet77 » Mon Sep 19, 2011 5:38 am

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: 2463
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 Sep 19, 2011 8:59 am

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 Feb 02, 2013 1:52 pm, edited 2 times in total.
Image
......................Imagine, what you will KNOW tomorrow !

Palmyweather
Posts: 38
Joined: Sat Nov 28, 2009 9:57 am
Weather Station: W1081
Operating System: Windows 7
Location: New Zealand
Contact:

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

Postby Palmyweather » Mon Sep 19, 2011 9:05 am

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 Weather Station out at http://palmyweather.co.nz .

Image

User avatar
beteljuice
Posts: 2463
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 Sep 19, 2011 9:20 am

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 !


Return to “Web site - General”

Who is online

Users browsing this forum: No registered users and 8 guests