Sandaysoft

Support forum for Cumulus weather station software
It is currently Sat May 25, 2013 8:44 pm
Please click here before posting. Help me to help you!
Useful Links: Cumulus FAQ • Enhancement requests • Wiki (documentation)
Please put your approximate location into your profile
Add your web site to the Cumulus user map
Vantage Pro2 users with firmware 3.00 should upgrade to fw 3.12 and Cumulus 1.9.4

All times are UTC




Post new topic Reply to topic  [ 166 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8, 9 ... 12  Next
Author Message
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Mon Dec 12, 2011 10:18 pm 
Offline
User avatar

Joined: Wed May 06, 2009 5:02 am
Posts: 428
Location: Saratoga, CA, USA
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
RayProudfoot wrote:
Thanks Ken. I think that has fixed one problem but I appear to have another related to my location adapted for England.

The error log is now complaining about line 433:-

[12-Dec-2011 21:19:07] PHP Warning: preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: Delimiter must not be alphanumeric or backslash in /home/admin4/public_html/NOAA-reports.php on line 433

That line is as follows:-
$rpt = preg_replace('State: Cheshire', 'County: Cheshire Country: UK', $rpt, 1);


Hi Ray,

The preg_replace would need to have a delimiter in the regex on the first argument like:

$rpt = preg_replace('/State: Cheshire/i', 'County: Cheshire Country: UK', $rpt, 1);

then it would execute correctly.

Best regards,
Ken


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Mon Dec 12, 2011 10:24 pm 
Offline
User avatar

Joined: Wed May 06, 2009 5:02 am
Posts: 428
Location: Saratoga, CA, USA
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
RayProudfoot wrote:
I reverted to the standard piece of code for the location and it seems to have fixed the problem.

http://www.cheadlehulmeweather.co.uk/NOAA.php

One last question. How do I generate files for all the months I have data for? Had a look in the Help but nothing jumped out at me.

Glad the spec on the directory fixed the issue.

In the Cumulus, View, NOAA Monthly Report (and NOAA Yearly Report) there's an option at the bottom of the window to specify the Month/Year (or just Year) for the report. Select 'Update Report' then you can do a "Save" selecting ANSI file type.

Repeat for your missing reports, then manually upload the historical file(s) to your NOAA-reports/ directory.

Best regards,
Ken


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Mon Dec 12, 2011 11:34 pm 
Offline

Joined: Wed May 06, 2009 6:29 pm
Posts: 1709
Location: Cheadle Hulme, Cheshire, England
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Hi Ken,

Thanks for your help with both questions. Given the location code works I'll leave that alone for now.

Regarding choosing another month/year for NOAA data I don't see an option at the bottom of that window. I'm running Cumulus on a netbook with a 1024*600 resolution. Might that be the reason?

Steve, should I be able to see the option at the bottom of that window to generate data for another period?

_________________
Cheers,
Ray, Cheshire.

Image


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Tue Dec 13, 2011 1:39 am 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1852
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
Ken wrote:
The preg_replace would need to have a delimiter in the regex on the first argument like:

$rpt = preg_replace('/State: Cheshire/i', 'County: Cheshire Country: UK', $rpt, 1);

then it would execute correctly.
:oops: - caught between regex and str replace :? - example corrected, cheers

_________________
Image
......................Imagine, what you will KNOW tomorrow !


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Tue Dec 13, 2011 12:44 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2523
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
RayProudfoot wrote:
Regarding choosing another month/year for NOAA data I don't see an option at the bottom of that window. I'm running Cumulus on a netbook with a 1024*600 resolution. Might that be the reason?
Probably, can you remote desktop into your netbook and specify a larger desktop size?

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Tue Dec 13, 2011 10:41 pm 
Offline
User avatar

Joined: Wed Sep 10, 2008 2:15 pm
Posts: 385
Location: Gilleleje, Denmark
Weather Station: Rosenborg 68700
Operating System: Win7 Ult. 32-bit
Where do I find the noaarep.css :?:

_________________
Ib http://www.ibtest.dk/vejr/


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Tue Dec 13, 2011 10:59 pm 
Offline

Joined: Wed May 06, 2009 6:29 pm
Posts: 1709
Location: Cheadle Hulme, Cheshire, England
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
dane wrote:
Where do I find the noaarep.css :?:

It is created when you launch NOAA.php. It should then be uploaded to the NOAA-Reports folder on your server.

_________________
Cheers,
Ray, Cheshire.

Image


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Tue Dec 13, 2011 11:02 pm 
Offline
User avatar

Joined: Wed Sep 10, 2008 2:15 pm
Posts: 385
Location: Gilleleje, Denmark
Weather Station: Rosenborg 68700
Operating System: Win7 Ult. 32-bit
RayProudfoot wrote:
dane wrote:
Where do I find the noaarep.css :?:

It is created when you launch NOAA.php. It should then be uploaded to the NOAA-Reports folder on your server.

NOAA.php :?: :?: what's that? All I have is NOAA-reports.php...

_________________
Ib http://www.ibtest.dk/vejr/


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Tue Dec 13, 2011 11:11 pm 
Offline

Joined: Wed May 06, 2009 6:29 pm
Posts: 1709
Location: Cheadle Hulme, Cheshire, England
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
That will display the climate reports but if you want a webpage with the same look and feel as your other pages that's where NOAA.php comes in. http://www.cheadlehulmeweather.co.uk/NOAA.php

_________________
Cheers,
Ray, Cheshire.

Image


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Tue Dec 13, 2011 11:14 pm 
Offline
User avatar

Joined: Wed Sep 10, 2008 2:15 pm
Posts: 385
Location: Gilleleje, Denmark
Weather Station: Rosenborg 68700
Operating System: Win7 Ult. 32-bit
I just took the vanilla NOAA-reports.php and uploaded it to my web-server.
And this is what I get: http://www.ibtest.dk/vejr/NOAA-reports.php
It doesn't look as nice as Beteljuice's sample display....

_________________
Ib http://www.ibtest.dk/vejr/


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Tue Dec 13, 2011 11:22 pm 
Offline

Joined: Wed May 06, 2009 6:29 pm
Posts: 1709
Location: Cheadle Hulme, Cheshire, England
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
It's all a bit beyond me I'm afraid. Hopefully beteljuice will be along to help out. :)

_________________
Cheers,
Ray, Cheshire.

Image


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Tue Dec 13, 2011 11:55 pm 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1852
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
I've had one other person report this problem.

It seems to be a permissions thing where the directory won't allow the noaarep.css file to be written.

Copy this lot as noaarep.css and upload it to your site.
Code:
/* default stylesheet for NOAA Style Reports ala beteljuice */
/* overall container */
.noaa_rep_container {
    font-family: courier new, courier, monospace;
    width: 635px;
    margin: 0 auto;
}

.noaa_rep_container a, .noaa_rep_container a:link, .noaa_rep_container a:visited, .noaa_rep_container a:hover, .noaa_rep_container a:active {
    color: #000000;
    text-decoration: none;
    background-color: white;
}


/* container for nav buttons */
.noaa_rep_nav_container {
    font-family: lucida console, courier new, courier, monospace;
    font-size: 8pt;
    font-weight: bold;
    text-align: left;
    line-height: 2.2;
    text-align: center;
}


/* the nav buttons themselves */
.noaa_rep_nav {
    text-align: left;
    border: 1px solid #000000;
    border-radius: 10px 10px 10px 10px; /* NOT IE8 and below */
    padding: 2px 5px 2px 5px;
    color: #808080;   
    background-color: #DDDDDD;
    font-weight: bold;
}

/* modified year button when used with expand - collapse (same as above but 'flattened' left-hand side) */
.noaa_rep_nav_alt {
    text-align: left;
    border: 1px solid #000000;
    border-radius: 0px 10px 10px 0px; /* NOT IE8 and below */
    padding: 2px 5px 2px 5px;
    color: #808080;
    background-color: #DDDDDD;
    font-weight: bold;
}

/* expand - collapse button (single line) */
.noaa_expand {
    color: #000000;
    border-radius: 10px 0px 0px 10px; /* NOT IE8 and below */
    background-color: #DDC81D; /* dirty yellow */
    cursor: pointer;
}

/* expand - collapse button (full menu) */
.noaa_expand_alt {
    color: #808080;
    border-radius: 10px 10px 10px 10px; /* NOT IE8 and below */
    background-color: #DDC81D; /* dirty yellow */
    cursor: pointer;
    visibility: hidden;
}

/* nav button hover color - NOT IE8 and below */
a.noaa_rep_nav:hover {
    box-shadow: 0 0 7px #007EBF;
}

/* nav button hover color - NOT IE8 and below */
a.noaa_rep_nav_alt:hover {
    box-shadow: 0 0 7px #007EBF;
}

/* highlight selected year or month button - NOT IE8 and below */
.noaa_selected {
    box-shadow: 0 0 7px #FF0000; /* red */
}

/* highlight selected year line */
.noaa_selected_line {
    background-color: #FFFF00; /* yellow */
}


/* container for the actual report file */
.noaa_rep_container pre {
    color: #000000;
    font-family: monospace;
    font-size: 9pt;
    font-weight: normal;
    text-align: left;
    border: 1px solid #000000;
    border-radius: 10px 10px 10px 10px; /* NOT IE8 and below */
    padding: 20px 0px 25px 20px;
    background-color: #f9f8EB;
}

_________________
Image
......................Imagine, what you will KNOW tomorrow !


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Wed Dec 14, 2011 12:11 am 
Offline
User avatar

Joined: Wed Sep 10, 2008 2:15 pm
Posts: 385
Location: Gilleleje, Denmark
Weather Station: Rosenborg 68700
Operating System: Win7 Ult. 32-bit
Thanks beteljuice.
Your noaarep.css did the trick.
(Suggest you include it in your package - alternatively write a note telling other persons about the problem)

_________________
Ib http://www.ibtest.dk/vejr/


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Wed Dec 14, 2011 12:56 am 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1852
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
It is actually within the script ;) - but for some set ups won't come out to play :lol:

As for the note ........

........ we just wrote it :clap:

_________________
Image
......................Imagine, what you will KNOW tomorrow !


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Wed Jan 11, 2012 5:26 pm 
Offline

Joined: Fri Dec 09, 2011 5:16 pm
Posts: 61
Location: East TN, USA
Weather Station: LaCrosse 2315
Operating System: Windows XP SP3
Thank You. That copy did it for me to. Now I can link to them. :)

One question though. Is there one where all years and months show without having the drop down option to click on? I mean go to the php page and there is everything laid out?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 166 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8, 9 ... 12  Next

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group