Page 3 of 19

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

Posted: Thu 15 Sep 2011 11:16 am
by steve
southhedlandweather wrote:how do i create the NOAA reports with cumulus???
They're in 1.9.2, on the 'View' menu.

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

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

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

Posted: Sat 17 Sep 2011 8:46 am
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.

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

Posted: Sat 17 Sep 2011 8:50 am
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?

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

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

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

Posted: Sat 17 Sep 2011 9:09 am
by nking
Done - always simple if you know how :) Thanks again Steve.
echo "<pre style=\"font-size: 11pt;\">\n"; fits just right ;)

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

Posted: Sat 17 Sep 2011 10:46 pm
by beteljuice
Update: https://cumulus.hosiene.co.uk/viewtopic.p ... 194#p49194

bug fix
Improved (optional) CSS and (optional) Menu systems.

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

Posted: Sun 18 Sep 2011 6:48 pm
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.

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

Posted: Sun 18 Sep 2011 11:16 pm
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 !])

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

Posted: Mon 19 Sep 2011 5:24 am
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?

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

Posted: Mon 19 Sep 2011 5:28 am
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?

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

Posted: Mon 19 Sep 2011 5:38 am
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.

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

Posted: Mon 19 Sep 2011 8:59 am
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.

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

Posted: Mon 19 Sep 2011 9:05 am
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.

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

Posted: Mon 19 Sep 2011 9:20 am
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 ?