Page 30 of 55

Re: Yet Another Dayfile Reader (PHP)

Posted: Sun 14 Oct 2018 7:36 pm
by Paul C
OK

Uploaded new version and worked straight away

But isnt picking up new data for the last few days, guessing I dont have the right path for the dayfile etc ?

Can someone please remind me on how to get that right please. Looking at how my website is setup it looks like all my files get uploaded into a file called public_html

Thanks

Re: Yet Another Dayfile Reader (PHP)

Posted: Sun 14 Oct 2018 10:09 pm
by BCJKiwi
If your dayfile.txt is in the same folder as betel_readDayfile.php
Change:-
$dayfile = 'data/dayfile.txt'; // to work correctly this should be a relative address NOT full url
to
$dayfile = 'dayfile.txt'; // to work correctly this should be a relative address NOT full url

Re: Yet Another Dayfile Reader (PHP)

Posted: Sun 14 Oct 2018 10:14 pm
by beteljuice
Hi Paul;
... uploaded into a file called public_html
That is simply your 'root' or base folder / directory.

You can create and organise as many directories as you need to emulate your old site and ensure uploads go to the right place ;)

Non-English help please ....

Posted: Sun 14 Oct 2018 10:38 pm
by beteljuice
The beteljuice has nearly finished some major improvement for Sun Hours display ....

I need 'foreign' help please with new phrases in the language files - at present they are best google guess but may be inappropriate / syntactically wrong.

Current supported languages: cs, de, en, es, fi, fr, it, nl, no, pl, pt.

Please look at the test site below, Sunshine Hours and look at the wording in the 'Note' below the selection drop-down box.
For:
Test option '0' longest day (daily table)
Test option '1' daily max (daily table AND seasonal table)
any other test option (daily table)

ROUGH TEST PAGE HERE

Re: Yet Another Dayfile Reader (PHP)

Posted: Mon 15 Oct 2018 5:53 pm
by Paul C
beteljuice wrote:Hi Paul;
... uploaded into a file called public_html
That is simply your 'root' or base folder / directory.

You can create and organise as many directories as you need to emulate your old site and ensure uploads go to the right place ;)
All sorted thanks, new php file worked a treat

many thanks

*** IMPORTANT UPDATES ***

Posted: Thu 18 Oct 2018 12:00 am
by beteljuice
The beteljuice has finished some major improvements for Sun Hours display including sun possible graph and mouse-over info, plus choice of max hours graph scale length.

All things 'Sun' related allow kit upgrade / multiple failure dates so zeros can now be valid.

ALL files have some changes :shock:

*** ALWAYS back-up your existing stuff, if only to remember your site specific settings ! ***

Away to first page for download - and don't forget to READ the How To .... file !!!!

Re: Yet Another Dayfile Reader (PHP)

Posted: Thu 18 Oct 2018 1:24 am
by ConligWX
Thanks for the update and hard work!

Re: Yet Another Dayfile Reader (PHP)

Posted: Fri 19 Oct 2018 2:15 pm
by 92merc
Got everything working, almost. Having an issue with my wind values. Even though I have wind units set to mph, all three of my wind numbers are reading km/h at the top.

https://www.bismarckweather.net/dayfile2/basic.php

Re: Yet Another Dayfile Reader (PHP)

Posted: Fri 19 Oct 2018 2:31 pm
by beteljuice
Everything Looks OK to me ..... have you fixed it ?

Re: Yet Another Dayfile Reader (PHP)

Posted: Fri 19 Oct 2018 3:07 pm
by 92merc
No. All three wind values are showing kilometers per hour instead of miles per hour.

Re: Yet Another Dayfile Reader (PHP)

Posted: Fri 19 Oct 2018 4:47 pm
by 92merc
OK, something must have been cached somewhere. Now it's appearing right.

However, I'd like to integrate it into my Saratoga scripts. I'm trying to put a new PHP file from Saratoga's blank script here:
https://www.bismarckweather.net/dayfile2.php

But my actual dayfiles currently in the /dayfile2 folder. Getting this error you can see if you click on the link.
Failed to open day file.

Re: Yet Another Dayfile Reader (PHP)

Posted: Fri 19 Oct 2018 5:23 pm
by 92merc
Here is the PHP file I used BTW.
dayfile2.txt

Re: Yet Another Dayfile Reader (PHP)

Posted: Fri 19 Oct 2018 7:08 pm
by PaulMy
I've monkeyed with the file a bit so likely that is the cause of my issues of not showing the new sunshine feature and haven't had a chance to get everything restarted from scratch.
http://www.komokaweather.com/weather/be ... ayfile.php
It initially opens but if I click on another element it stays on "getting data ..." until I actually refresh the url.

Enjoy,
Paul

Re: Yet Another Dayfile Reader (PHP)

Posted: Fri 19 Oct 2018 9:08 pm
by beteljuice
92merc wrote:...
However, I'd like to integrate it into my Saratoga scripts. I'm trying to put a new PHP file from Saratoga's blank script here:
https://www.bismarckweather.net/dayfile2.php

But my actual dayfiles currently in the /dayfile2 folder. Getting this error you can see if you click on the link.
Failed to open day file.
Did you see the saratoga example in the "How To ...." file ?

You don't have the css files loading in your page, and did you notice These  in your page ?
That means you've been editing and NOT saved as UTF-8 (NO BOM) and / or your page isn't UTF-8.

You have:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
Whereas it should be:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

It looks like you are including everything in the wrong way - from the saratoga example in the HowTo file

Code: Select all

<div id="datsum">
   <div id="tableData">
      <?php include('betel_readDayfile.php');?>
   </div>
</div>
<div id="tableData"> .... </div> is the 'holder' where the content is injected.

Have a tinker and come on back .....

P.S.
If your weather page and betel_readDayfile are in your web 'root' then the path to your data would be:-
$dayfile = '/dayfile2/dayfile.txt' (root address)

Re: Yet Another Dayfile Reader (PHP)

Posted: Fri 19 Oct 2018 9:22 pm
by beteljuice
PaulMy wrote:I've monkeyed with the file a bit so likely that is the cause of my issues of not showing the new sunshine feature and haven't had a chance to get everything restarted from scratch.
http://www.komokaweather.com/weather/be ... ayfile.php
It initially opens but if I click on another element it stays on "getting data ..." until I actually refresh the url.

Enjoy,
Paul
Looks like you forgot the 'holder' <div id="tableData">... </div> as well ! :D

... but you may be having problems with $this_file_name = basename(__FILE__);
ie. You are trying to call another version of the file (in a different location)