Welcome to the Cumulus Support forum.

Latest Cumulus MX release v3.0.2 build 3052 - 13 September 2019.
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014

See the Wiki for downloading either version.

Yet Another Dayfile Reader (PHP)

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

Moderator: daj

water01
Posts: 1549
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 7 64bit HP SP1
Location: Somewhere in the USA
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by water01 » Tue 04 Jun 2019 1:03 pm

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

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

Re: Yet Another Dayfile Reader (PHP)

Post by Matt.j5b » Tue 04 Jun 2019 1:05 pm

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

User avatar
beteljuice
Posts: 2714
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 » Tue 04 Jun 2019 5:35 pm

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: 2714
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 » Thu 06 Jun 2019 8:16 pm

@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: 460
Joined: Mon 28 Nov 2011 2:13 am
Weather Station: Davis VP2 with DFARS
Operating System: RPi Raspbian (Stretch)
Location: Ferny Grove, Brisbane, Australia
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Matt.j5b » Fri 07 Jun 2019 8:25 am

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

User avatar
beteljuice
Posts: 2714
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 » Fri 07 Jun 2019 11:24 pm

@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: 460
Joined: Mon 28 Nov 2011 2:13 am
Weather Station: Davis VP2 with DFARS
Operating System: RPi Raspbian (Stretch)
Location: Ferny Grove, Brisbane, Australia
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Matt.j5b » Sat 08 Jun 2019 1:57 am

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

User avatar
beteljuice
Posts: 2714
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 » Sat 08 Jun 2019 2:23 am

@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: 460
Joined: Mon 28 Nov 2011 2:13 am
Weather Station: Davis VP2 with DFARS
Operating System: RPi Raspbian (Stretch)
Location: Ferny Grove, Brisbane, Australia
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Matt.j5b » Sat 08 Jun 2019 5:09 am

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

User avatar
beteljuice
Posts: 2714
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 » Sat 08 Jun 2019 10:31 pm

@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 !

User avatar
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 » Tue 11 Jun 2019 9:37 am

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: 2714
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 » Tue 11 Jun 2019 9:58 am

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 !

User avatar
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 » Tue 11 Jun 2019 10:03 am

Image

Phil23
Posts: 203
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 » Sun 30 Jun 2019 9:51 pm

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
Image

User avatar
beteljuice
Posts: 2714
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 » Sun 30 Jun 2019 10:08 pm

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

Post Reply