Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

Yet Another Dayfile Reader (PHP)

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

Moderators: daj, TNETWeather

User avatar
beteljuice
Posts: 2455
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Yet Another Dayfile Reader (PHP)

Postby beteljuice » Sat Feb 01, 2014 11:46 am

Yet Another Dayfile Reader (PHP)

Release..V3.1

>Large< . . . . . . . . . >750 px wide< . . . . . . . . >700 px wide< with buttons .......>700 px wide< with dropdown

You should be happy with general logic and PHP.
You should be uploading your dayfile.txt to 'the web' on a regular basis.
You should have a good understanding of your own data and spot any anomalies or glitches.
You should be able to follow comments and have little (If any) instruction ! - Cumulus, saratogaWX and WeatherByYou examples in "How To" file.

It can be used as a stand-alone or dropped into a suitable site template.
It can 'read' saratogaWX templates for language and $SITE Units Of Measure decisions.
It can 'read' Weather By You templates for language decisions.

23 Feb 2014 - v3.0
    ALL css files updated because
    betel_readDayfile modified - DO NOT MIX OLD AND NEW !
    *new* Weather By You (meteo) css
    readDayfile modded - fix to language working in saratogaWX environment
    language files - Czech added, thank you milos.jirik
    "How To .." file updated

25 Feb 2014 - v3.0
    Small error in 'cs' language file fixed

04 Mar 2014 - v3.1
    betel_readDayfile small niggle with Chrome / Safari fixed

06 Mar 2014 - v3.1
    "How To ..." expanded and *new* "Weather By You" example (Thanks to joewith)


Distribution Contains:
    Three 'default' holders which use
    Three different css files. (plus meteo template css)
    betel_readDayfile.php
    ... a few optional graphics.
    language translations file ...
      cs (milos.jirik)
      en (anon)
      de (KarlS)
      fi (mikkimii)
      fr (laulau)
      nl (nitrx)
      pl (pernaczy)
    "How To" text file.

ALL files should be edited / saved as UTF-8 no BOM
beteljuice.zip

Most dayfile data has been represented, and any unwanted options can easily be 'turned off'.

For ease of updates - main files as stand alone downloads. [They ARE included in distribution above]
betel_readDayfile.zip
css_files.zip
betel_dayfile_languages.zip
betel_Dayfile_HowTo.zip

Known limitations:
    Unable to show * (incomplete data advisory) for Daylight Hours.
    Will give unreliable calculations for 'false' data which is 0 or 0.0 instead of null.
    Although it can handle , (comma) decimal delimiter, o/p will be eg. 12.3
    Davis EVT ... There is a known problem for Jan 1st data.

Anyone can 'play', but the beteljuice will NOT be answering any 'general' enquiries along the lines of "How do I ..." and "I want ...".

If you have unexpected figures - PLEASE check / clean-up your dayfile.txt

Edit: "Forgot To Mention"
If allowed vistors to the page will have their display unit preferences remembered by cookies for 30 days.

You can change the 'button' style menu for a 'drop-down'.

You can change the default table from 'daily' to 'seasonal'.

You can change the default content from Max Temp to ......
You do not have the required permissions to view the files attached to this post.
Last edited by beteljuice on Mon Jun 16, 2014 10:18 am, edited 58 times in total.
Image
......................Imagine, what you will KNOW tomorrow !

water01
Posts: 1401
Joined: Sat Aug 13, 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)

Postby water01 » Sat Feb 01, 2014 12:23 pm

OK accepted the challenge!!

Here is mine minus UV and Solar, showing C, in, mph and mb as defaults and picking up dayfile.txt in default weather directory.

http://www.dmjsystems.co.uk/weather/basic.php

User avatar
beteljuice
Posts: 2455
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Postby beteljuice » Sat Feb 01, 2014 12:31 pm

Your 2011 Jan => Mar data needs cleaning up ;)
Now try 'dropping' it in your own site style 'template' ..
Image
......................Imagine, what you will KNOW tomorrow !

water01
Posts: 1401
Joined: Sat Aug 13, 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)

Postby water01 » Sat Feb 01, 2014 1:02 pm

Don't actually have data for 2011 Jan,Feb,Mar as only started in Apr 2011, so I put in 3 dummy lines to make some other code work.

Code: Select all

01/01/11,0.0,0,17:44,9.1,23:44,20.2,18:14,1012.8,17:14,1014.6,23:14,0.0,00:00,0.0,0.0,0.0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
01/02/11,0.0,0,17:44,9.1,23:44,20.2,18:14,1012.8,17:14,1014.6,23:14,0.0,00:00,0.0,0.0,0.0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
01/03/11,0.0,0,17:44,9.1,23:44,20.2,18:14,1012.8,17:14,1014.6,23:14,0.0,00:00,0.0,0.0,0.0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,


Your wish is my command http://www.dmjsystems.co.uk/weather/basic.php NB not edited into my menu system yet, next task, but need some breakfast!!

EDIT have now tidied up dayfile.txt for Jan, Feb, Mar.

User avatar
jdc
Posts: 121
Joined: Tue Jun 19, 2012 8:51 pm
Weather Station: Davis VP2 : Instromet
Operating System: Win 10 : Win XP
Location: Berwick-upon-Tweed, England.
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby jdc » Sat Feb 01, 2014 2:49 pm

I have broken the layout when I add my .css (which has some same names in it) and reduce width in this q&d include page here.
I had to add a font size to '#table_container table td,table th' as data table font remained large.

Functionality is spot on, data totals/averages are correct (compare with my page from db) - I would just need to sort out styling.
I only removed 'UV' and altered menu_split number.

Very nice, BTW!

User avatar
beteljuice
Posts: 2455
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Postby beteljuice » Sat Feb 01, 2014 4:21 pm

@ jdc

Your columns are too narrow (or font too large !)
See baro entries (table 'breaks' container width) or where * has been added (table cells wrap)

In YOUR table_name css you need to remove your height attribute.
BTW - Your baro seems to be absolute from 18th Dec ?

I need to modify the menu 'break' code - it has given you an extra line although there is nothing to be put there.
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
beteljuice
Posts: 2455
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Postby beteljuice » Sat Feb 01, 2014 4:26 pm

@ David

hmm .......
Should I make all the 'content' of the 'title' transparent or fill with white ?
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
nitrx
Posts: 1300
Joined: Sun Dec 13, 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby nitrx » Sat Feb 01, 2014 4:28 pm

I've a headache atm but http://apeldoorn.tk/weer/basic.php works fine even with decimal comma's 8-) have to translate and validate the data thanks for sharing Betel :geek: .


EDIT al values are rounded to nul after the decimal , have to dinner now

User avatar
beteljuice
Posts: 2455
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Postby beteljuice » Sat Feb 01, 2014 4:35 pm

@ Ron - a pleasure as always, I wait for you to break it languagewise :lol:

Looks like I've got to double-check the way I create the 'season' o/p - sigh ..
EDIT al values are rounded to nul after the decimal , have to dinner now

EDIT: Bu**er - I thought forgot it isn't always . dec separator.
.. BIG problems .. don't go any further Ron .. unless you just want to play with translations.

have to pub now :?
Last edited by beteljuice on Sat Feb 01, 2014 7:20 pm, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
nitrx
Posts: 1300
Joined: Sun Dec 13, 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby nitrx » Sat Feb 01, 2014 4:49 pm

As I said I've an headace will try tthe translations asap if you need my dayfile its here for testing http://www.apeldoorn.tk/weer/dayfile.txt (I also miss december 2009 bon appetit :lol:

User avatar
laulau
Posts: 525
Joined: Tue Oct 13, 2009 10:52 pm
Weather Station: WeatherDuino Pro2
Operating System: Win 7
Location: Meyenheim, Alsace, FR
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby laulau » Sat Feb 01, 2014 5:22 pm

Hi,
Here is mine http://meteo.laurentmey.fr/Viewdayfile/dayfileb.php
I've a problem with "Vent" give me an error
Warning: number_format() expects parameter 1 to be double, string given in /homez.764/laurentmp/www/meteo/Viewdayfile/betel_readDayfile.php on line 510
ok with "Rafale" :oops:
Was working in prévious version.
You should put kilometers in translation section ;) !
Laurent

Image

water01
Posts: 1401
Joined: Sat Aug 13, 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)

Postby water01 » Sat Feb 01, 2014 7:15 pm

beteljuice wrote:@ David

hmm .......
Should I make all the 'content' of the 'title' transparent or fill with white ?


Well personally I like it, looks very clean and unfussy.

User avatar
beteljuice
Posts: 2455
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Postby beteljuice » Sat Feb 01, 2014 7:30 pm

@ Laurent

Native km/h bug - to fix
Do mean eg. Kilometres ? - I had a Damn Yankee moment, sorry !

@ David

I was thinking about the dropdown selector(s) when the background 'interferes' ...
Image
......................Imagine, what you will KNOW tomorrow !

mikkimii
Posts: 42
Joined: Fri Mar 23, 2012 3:17 pm
Weather Station: Davis VP2
Operating System: Windows 7 x64 Pro
Location: Vilppula, Finland

Re: Yet Another Dayfile Reader (PHP)

Postby mikkimii » Sat Feb 01, 2014 9:52 pm

nitrx wrote:EDIT al values are rounded to nul after the decimal , have to dinner now

I have same issue here. Here is my testing in Finnish and Leuven template: http://www.phpoint.fi/leka446/weather2/index.php?p=900 (Sorry, my host is veeery slow at this moment) :evil:

I change UV to Max. Solar radiation.

Now I need few (read at least 10) beers :lol:
Br,
Mika
Image

nossis
Posts: 68
Joined: Wed Nov 28, 2012 6:12 am
Weather Station: Station closed
Operating System: none at present
Location: No fixed Address

Re: Yet Another Dayfile Reader (PHP)

Postby nossis » Sat Feb 01, 2014 10:29 pm

Thanks a heap!
I have been looking at others who had similar with great admiration and dreamed that I could to. You have made my day!

Test page http://members.iinet.net.au/~nossis/weather/basic.php

I will see if I am clever enough to adjust the colorings. We get a bit hot here.

Lost the anemometer in 2013 as the data shows.
Also will investigate why not getting UV index values, had the instrument as of early 2013.

Barry
Barry
Station Closed (Travelling around Australia)


Return to “Web site - General”

Who is online

Users browsing this forum: No registered users and 6 guests