Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.6.6 (build 3082) - 1 June 2020 (please see important announcement regarding releases since 3.5.0)
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of the NOAA report and Snow Index drop-down menus to 2030)

See the Wiki to download the software or click on the Downloads link in the Forum Banner.

Yet Another Dayfile Reader (PHP)

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

water01
Posts: 1885
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by water01 »

the beteljuice is in hospital ATM, so very limited support or attention span :o
Get well soon, hope it's nothing serious!!
David
Image

Matt.j5b
Posts: 471
Joined: Mon 28 Nov 2011 2:13 am
Weather Station: Davis VP2 with DFARS
Operating System: RPi Raspbian (Buster)
Location: Ferny Grove, Brisbane, Australia
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Matt.j5b »

Sorry to hear :(

I don't see anything in the logs from what I can see but when I enable the error reporting in the script I do get:

Fatal error: Uncaught Error: Call to undefined function cal_days_in_month() in /home/fernygro/public_html/test/betel_readDayfile.php:670 Stack trace: #0 /home/fernygro/public_html/test/betel_readDayfile.php(2226): drawCalendar('2019') #1 /home/fernygro/public_html/test/annual-data-summary.php(11): include_once('/home/fernygro/...') #2 {main} thrown in /home/fernygro/public_html/test/betel_readDayfile.php on line 670
Regards, Matt of Brisbane, Australia
Ferny Grove Weather
Image

User avatar
beteljuice
Posts: 2921
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: ex XP SP3 - now W10 laptop grr
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post by beteljuice »

Uncaught Error: Call to undefined function cal_days_in_month
according to wobbly wibbly wisdom - "recompile php with the '--enable-calendar'" option."

This is not program error, but a PHP function that is not performing correctly.
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
beteljuice
Posts: 2921
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: ex XP SP3 - now W10 laptop grr
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post by beteljuice »

@matt

knock, knock ....
Is everything working now ?

BTW - still at the vets, hopefully an escape bid tomorrow :clap:
Image
......................Imagine, what you will KNOW tomorrow !

Matt.j5b
Posts: 471
Joined: Mon 28 Nov 2011 2:13 am
Weather Station: Davis VP2 with DFARS
Operating System: RPi Raspbian (Buster)
Location: Ferny Grove, Brisbane, Australia
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Matt.j5b »

Hi,

Yes, it's working correctly once I figured this out, in its proper location: https://www.fernygroveweather.com/annua ... mmary.php

Hope you have a great escape. :)
Thanks
Regards, Matt of Brisbane, Australia
Ferny Grove Weather
Image

User avatar
beteljuice
Posts: 2921
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: ex XP SP3 - now W10 laptop grr
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post by beteljuice »

@Matt - back to basics nice clean, clear site you've made.

Only comment I would make is with the temperature gradients you have, and your High / Low values you may as well tweak the code so that the actual 'value' is font color black for greater clarity, or modify the value where it changes from black to white.

The beteljuice has literally just been sprung from confinement (12 hours later than promised due to a paper chase)
Now trying to get some sort of schedule together for pill taking, washing, pill taking, shopping, pill taking, district nurse visit, pill taking, go see practise nurse, pill taking etc. etc .etc.

Oh ..... nearly time for a four hourly pill ... rattle rattle :groan:
Image
......................Imagine, what you will KNOW tomorrow !

Matt.j5b
Posts: 471
Joined: Mon 28 Nov 2011 2:13 am
Weather Station: Davis VP2 with DFARS
Operating System: RPi Raspbian (Buster)
Location: Ferny Grove, Brisbane, Australia
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Matt.j5b »

Thanks for the feedback. A clean and responsive design but not necessarily a simple site was the intention. The idea behind that I didn't want to get bogged down in a web design project that would take forever and instead let the content do the heavy lifting instead.

Good point regarding the colour contrast and so I tried having all the temperature values of black font colour. That worked fine but not so with the dark red at 40 C +. So instead I darken the colours slightly and the colour contrast looks OK to me. What do you think now?

The default colours were not suitable for my subtropical location, which shows every 30 C + day in red. A maximum around 30 C is normal in summer and while that is hot, 35 C and above is of greater significance.
Regards, Matt of Brisbane, Australia
Ferny Grove Weather
Image

User avatar
beteljuice
Posts: 2921
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: ex XP SP3 - now W10 laptop grr
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post by beteljuice »

@Matt

... dosen't really work for my tired old eyes I'm afraid.
You could try adding font-weight: bold; or <b> .... </b> to the color white decision build-up.
Last edited by beteljuice on Sat 08 Jun 2019 10:22 pm, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !

Matt.j5b
Posts: 471
Joined: Mon 28 Nov 2011 2:13 am
Weather Station: Davis VP2 with DFARS
Operating System: RPi Raspbian (Buster)
Location: Ferny Grove, Brisbane, Australia
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Matt.j5b »

I think I have this more readable now. I have adjusted the colours slightly and also modified the black/white font colour value changes.
Regards, Matt of Brisbane, Australia
Ferny Grove Weather
Image

User avatar
beteljuice
Posts: 2921
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: ex XP SP3 - now W10 laptop grr
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post by beteljuice »

@Matt - yup that looks more readable.

Most of my scripts are meant to be customisable, but this one is long and not as friendly as others - so well done :clap:

.. carry on regardless
Image
......................Imagine, what you will KNOW tomorrow !

pekkie
Posts: 20
Joined: Mon 20 May 2019 1:16 am
Weather Station: PCE-FWS-20
Operating System: Windows 10
Location: Limbiate, Italy
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by pekkie »

Hi everyone, I have a problem in the dayfile reader, as you can see the pages are loaded, on cumulus the dayfile is seen.
It gives me this error "filed to open dayfile".
http://meteobrianza.altervista.org/wp-c ... ummary.php
I tried to track the file extension etc. but nothing to do. :bash:
Image

User avatar
beteljuice
Posts: 2921
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: ex XP SP3 - now W10 laptop grr
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post by beteljuice »

Change:

Code: Select all

$dayfile = "/meteo/dayfile.txt"; // to work correctly this should be a relative address NOT full url
To:

Code: Select all

$dayfile = "dayfile.txt"; // to work correctly this should be a relative address NOT full url
Image
......................Imagine, what you will KNOW tomorrow !

pekkie
Posts: 20
Joined: Mon 20 May 2019 1:16 am
Weather Station: PCE-FWS-20
Operating System: Windows 10
Location: Limbiate, Italy
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by pekkie »

Image

Phil23
Posts: 471
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Win7 Pro
Location: Australia

Re: Yet Another Dayfile Reader (PHP)

Post by Phil23 »

Just found what I'm looking for in this & have uploaded some files to give it a try.

http://weather.inverellit.com/basic.php

The unexpected thing is that I see an error, "Failed to open day file",
BUT only when I choose to view EVT, ironically what I was most interested in.

Have had a browse thru readDayFile.php, but don't see anything that stands out.

All the others work, including Solar & UV.

Any thoughts anyone.

Thanks

Phil

User avatar
beteljuice
Posts: 2921
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: ex XP SP3 - now W10 laptop grr
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post by beteljuice »

Looks like you fixed it :P
Image
......................Imagine, what you will KNOW tomorrow !

Post Reply