Thank you very much sfws
I just installed the new version of your script.
http://kocher.es/cumulusMX/dailypick_2_12.php
However, an error occurs:
"PHP Fatal error: Call to undefined function print_array() in H:\webspace\hostings\kocher.es\hosting\www\cumulusMX\dailypick_2_12.php on line 336"
The code of my file is:
http://kocher.es/cumulusMX/dailypick_2_12.php.txt
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 4021) - 04 May 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 4021) - 04 May 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
New Script that displays a selected daily statistic for every day
Moderator: daj
-
- Posts: 1183
- Joined: Fri 27 Jul 2012 11:29 am
- Weather Station: Chas O, Maplin N96FY, N25FR
- Operating System: rPi 3B+ with Buster (full)
Re: New Script that displays a selected daily statistic for every day
Thank you. Well done for successfully using my script.rogerthn wrote:Many thanks sfws
I hope you don't mind me suggesting that a consistent set of navigation links across all the pages on your site would improve it. You need to choose between the "standard Cumulus links" and your various styles of buttons that I assume are more recent additions. You could look at other sites for inspiration, or just copy one of your button styles onto all your pages.
With your two weather stations it would be nice if you had a page that showed numbers from both, then you could compare one against the other, but otherwise your site looks good.
-
- Posts: 1183
- Joined: Fri 27 Jul 2012 11:29 am
- Weather Station: Chas O, Maplin N96FY, N25FR
- Operating System: rPi 3B+ with Buster (full)
Re: New Script that displays a selected daily statistic for every day
Ok, that is one of my many shared functions that appears in the script mentioned in the first include https://cumulus.hosiene.co.uk/viewtopic.p ... 65#p126065. I use it instead of "print_r" for arrays, and I am sorry use of it caused you to see an error. As I said what you have now is actually basically an old script that I have not rewritten for sharing. But thanks for trying my daily summary script, the includes that I quote in my scripts list the common functions and variables they contain, so if you still have a problem after adding code below, let me know and I will dig out more.kocher wrote:"PHP Fatal error: Call to undefined function print_array() in H:\webspace\hostings\kocher.es\hosting\www\cumulusMX\dailypick_2_12.php on line 336"
Code: Select all
#---------------------------------------------------------------------------------#
# The novel sub-function that follows is a more friendly way
# of displaying the contents of an array for easy diagnosis.
# Intellectual Property of SPAWS - last updated October 2017
# The first input parameter is the actual array to be output.
# The second input parameter is an optional string to describe the array.
# (It can be the actual array name enclosed in single quotes).
#---------------------------------------------------------------------------------#
function print_array($array_input,$array_name = 'Array')
{
if(!count($array_input)) echo '<br><span class="red"> '. $array_name . '( )</span> <span class="blue">is Empty</span>';
else{
echo '<br><span class="red"> '. $array_name . '( </span> ';
foreach ($array_input as $key_input => $value_input)
{
if (is_array($value_input)) {
echo ' <span class="red">[' . $key_input . ']</span> → ';
print_array($value_input,'Sub-array');
} else {
echo " [$key_input]".' => ';
echo ' <span class="blue">' . $array_input[$key_input] . '</span>, ';
}
}
echo '<span class="red">);</span> ';
}
echo '<br>';
}
Last edited by sfws on Wed 16 May 2018 6:19 am, edited 1 time in total.
- rogerthn
- Posts: 518
- Joined: Thu 11 Apr 2013 6:31 pm
- Weather Station: Ecowitt GW1000/GW1003
- Operating System: Raspberry Pi OS bullseye aarch64
- Location: Trollhättan Sweden
- Contact:
Re: New Script that displays a selected daily statistic for every day
I do NOT mind, improving my web-site has been on the to-do list for some years nowsfws wrote:Thank you. Well done for successfully using my script.
I hope you don't mind me suggesting that a consistent set of navigation links across all the pages on your site would improve it. You need to choose between the "standard Cumulus links" and your various styles of buttons that I assume are more recent additions. You could look at other sites for inspiration, or just copy one of your button styles onto all your pages.
With your two weather stations it would be nice if you had a page that showed numbers from both, then you could compare one against the other, but otherwise your site looks good.
Regarding my two stations
The National Geographic 265 NE was in operation using Cumulus from 2008-10-12 until 2017-12-19 but is now dead.
The Oregon Scientific WMR88 was started on 2013-04-07 and is still running fine, I've replaced the rain gauge once.
- kocher
- Posts: 233
- Joined: Sat 19 Apr 2014 7:57 pm
- Weather Station: Davis Vantage Pro2+
- Operating System: Windows 10
- Location: San Sebastian - Spain
- Contact:
Re: New Script that displays a selected daily statistic for every day
Now it seems to work well, thank you very much
I will do tests with the css file to try to improve the vision of the data.
Saludos desde San sebastian
I will do tests with the css file to try to improve the vision of the data.
Saludos desde San sebastian