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
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
PHP Web 'viewer' for Cumulus NOAA Style reports
Moderator: daj
- Darknstormy
- Posts: 168
- Joined: Wed 28 Apr 2010 1:01 pm
- Weather Station: Davis Vantage Pro 2 Plus
- Operating System: Windows 11
- Location: Australia
Re: PHP Web 'viewer' for Cumulus NOAA Style reports
I'm not sure if anyone's asked this before.. but is there a htm version for viewing NOAA reports... sadly my host doesnt support PHP..
cheers
cheers
- 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
There is no problem (?) with having a html page with a report inside it. The tedious bit would be creating the nav menu for available reports.
Let me think about it ..............
Let me think about it ..............
......................Imagine, what you will KNOW tomorrow !
- Darknstormy
- Posts: 168
- Joined: Wed 28 Apr 2010 1:01 pm
- Weather Station: Davis Vantage Pro 2 Plus
- Operating System: Windows 11
- Location: Australia
Re: PHP Web 'viewer' for Cumulus NOAA Style reports
beteljuice wrote:There is no problem (?) with having a html page with a report inside it. The tedious bit would be creating the nav menu for available reports.
Let me think about it ..............
Thankyou.. That would be muchly appreciated.. sure there are others out there in the same boat.
- 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
Rather worringly I've taught JavaScript to check a directory
So now all I've got to do is change all the PHP logic / functions to JavaScript
It won't be as 'robust' or as fast to build the initial page - but it should work
Hmmm ... 2nd and 3rd thoughts I've got to convert some multidimensional arrays, and see if I can still keep the nav button 'highlight' on-the-fly.
I might be some time ...........
So now all I've got to do is change all the PHP logic / functions to JavaScript
It won't be as 'robust' or as fast to build the initial page - but it should work
Hmmm ... 2nd and 3rd thoughts I've got to convert some multidimensional arrays, and see if I can still keep the nav button 'highlight' on-the-fly.
I might be some time ...........
Last edited by beteljuice on Tue 21 Feb 2012 12:20 am, edited 1 time in total.
......................Imagine, what you will KNOW tomorrow !
- Darknstormy
- Posts: 168
- Joined: Wed 28 Apr 2010 1:01 pm
- Weather Station: Davis Vantage Pro 2 Plus
- Operating System: Windows 11
- Location: Australia
Re: PHP Web 'viewer' for Cumulus NOAA Style reports
times no issue mate, takes as long as it takes.. I "and plenty of others" will greatly appreciate itbeteljuice wrote:I might be some time ...........
- 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
Now available an alternative stylesheet for use with 'include's which has the button highlights INSIDE the buttons. Useful for pages with a dark background.
You do not have the required permissions to view the files attached to this post.
......................Imagine, what you will KNOW tomorrow !
-
- Posts: 11
- Joined: Tue 03 Jan 2012 6:14 pm
- Weather Station: Maplin N96FY
- Operating System: Windows Vista
- Location: Reading, Berkshire
- Contact:
Re: PHP Web 'viewer' for Cumulus NOAA Style reports
Anybody know what the following warning is telling me?:
Warning: putenv(): Safe Mode warning: Cannot set environment variable 'TZ' - it's not in the allowed list in /tier-11/pwpstore6/10/shinfieldriseweather/htdocs/NOAA-reports.php on line 160
It appears on my NOAA style reports.
I thank you in advance for your assistance in this matter
Warning: putenv(): Safe Mode warning: Cannot set environment variable 'TZ' - it's not in the allowed list in /tier-11/pwpstore6/10/shinfieldriseweather/htdocs/NOAA-reports.php on line 160
It appears on my NOAA style reports.
I thank you in advance for your assistance in this matter
- mcrossley
- Posts: 12756
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: PHP Web 'viewer' for Cumulus NOAA Style reports
Yes, if you are running PHP in "safe mode" (as I do), then only certain commands are allowed to 'write' data to the host. Setting the TZ is not allowed. I think there is a later version of the script that fixes this.
-
- Posts: 11
- Joined: Tue 03 Jan 2012 6:14 pm
- Weather Station: Maplin N96FY
- Operating System: Windows Vista
- Location: Reading, Berkshire
- Contact:
Re: PHP Web 'viewer' for Cumulus NOAA Style reports
Thanks for that - I did not drill down this thread far enough - I will comment out and that should fix.
Much appreciated
Much appreciated
- 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
Tip: If you have existing NOAA style reports from other softwares, then you should be able to copy them to the NOAA-reports directory and as long as you rename them in the Cumulus format they should be found and displayed OK
......................Imagine, what you will KNOW tomorrow !
Re: PHP Web 'viewer' for Cumulus NOAA Style reports
Just wanted to say thanks to beteljuice for all the work he's put into this.
Finally got round to adding it to my site this morning. Took a few minutes and worked first time .
I'll try the alt.css later.
Duke
Finally got round to adding it to my site this morning. Took a few minutes and worked first time .
I'll try the alt.css later.
Duke
Re: PHP Web 'viewer' for Cumulus NOAA Style reports
Just looked at my NOAA page and there is a problem displaying the degree sign:
What have I failed to do correctly?
Duke
Nightingale NOAAN 50� 57' 58" Lon: W 001� 22' 51"
Temperature (�C),
What have I failed to do correctly?
Duke
- 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
I'm glad you see that as well, I'm fed up of people telling me I'm seeing things when I get funny characters on their sites (Including ordinary html) !
The unproven response is the wrong charset is applied to the format in which the file was written and / or saved in.
The report itself is created by Cumulus, Notepad++ says "ANSI as UTF-8"
Notepad++ reports your page as "ANSI as UTF-8", and is declared as UTF-8 in it's META data.
Interestingly, in my browser, your .txt reports show the black diamond, but not in notepad++, the .txt reports on my site do not show the black diamond in my browser
Time for an experiment
Using notepad I want you to modify NOAA-reports.php
MAKE A BACKUP OF IT FIRST !
Go down to about line 430 and change from this:To this:Caution: I can't find the real code for the black diamond anywhere This will replace ALL instances of the 'black diamond' with ° (degree symbol)
Edit: a couple of silly errors removed.
Upload the modified file to your site and let's see what happens (Edit: It works !)
If anyone has a definitive answer as to why this kind of problem occurs and how to prevent it in the first place .....
The unproven response is the wrong charset is applied to the format in which the file was written and / or saved in.
The report itself is created by Cumulus, Notepad++ says "ANSI as UTF-8"
Notepad++ reports your page as "ANSI as UTF-8", and is declared as UTF-8 in it's META data.
Interestingly, in my browser, your .txt reports show the black diamond, but not in notepad++, the .txt reports on my site do not show the black diamond in my browser
Time for an experiment
Using notepad I want you to modify NOAA-reports.php
MAKE A BACKUP OF IT FIRST !
Go down to about line 430 and change from this:
Code: Select all
if($rpt){
echo "<pre>\n";
echo preg_replace('|<|Uis','<',$rpt);
echo "</pre>\n";
}
echo "</div> <!-- END noaa_rep_container -->\n";
Code: Select all
if($rpt){
// NASTY work-around, the ONLY way I find black diamond question mark (or deg character)
$checkIt = explode("(", $rpt);
$dodgy = substr($checkIt[1],0 , 1);
// the ONLY way I can replace when black diamond (unconditionally) to °
$rpt = str_replace($dodgy,'°',$rpt);
// END nasty work around
echo "<pre>\n";
echo preg_replace('|<|Uis','<',$rpt);
echo "</pre>\n";
}
echo "</div> <!-- END noaa_rep_container -->\n";
Edit: a couple of silly errors removed.
Upload the modified file to your site and let's see what happens (Edit: It works !)
If anyone has a definitive answer as to why this kind of problem occurs and how to prevent it in the first place .....
Last edited by beteljuice on Sun 11 Mar 2012 3:47 pm, edited 4 times in total.
......................Imagine, what you will KNOW tomorrow !
Re: PHP Web 'viewer' for Cumulus NOAA Style reports
Thanks for the quick reply. Unfortunately that did not resolve it.
The result of that was a one line page in XAMPP:
The result of that was a one line page in XAMPP:
and live:Parse error: syntax error, unexpected T_VAR in W:\htdocs\weather\NOAA-reports.php on line 434
DukeParse error: syntax error, unexpected T_VAR in /home/night239/public_html/weather/NOAA-reports.php on line 434
- 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
Sorry - I got a bit of a JavaScript head on, the two var shouldn't be there.
Previous post edited - try that.
Previous post edited - try that.
......................Imagine, what you will KNOW tomorrow !