Since we have now got more solar data in the clientrawhour.txt I have created a new graph called solar_1hr.php which is the solar values for the last whole hour. You just need to install the attached file and rename it to a .php file. I have not yet added this to the package, will do this later. You do need a a fairly recent version of WD for this to work.
I tried to create a language selectable image. So i placed the current line into the graphsconf.php
$lang = 'en'; // default language to be used (lowercase, must correspond to available
// overrides from Settings.php if available
global $SITE;
if (isset($SITE[ālangā])) {$lang = $SITE[ālangā]; }
// end of overrides from Settings.php
The image changed successfully when i change the first line $line = āenā
But it never took the language from the language selector used in the saratoga templates.
Why is this global site setting not coming trough in the graphsconf.php
Can somebody explain this ?
Is this because its an image and not an php inclusion ??
The way the language works in these graphs is that it always includes the graphlang.php and you have to rename the relevant language file to graphlang.php and overwrite the default file. If you want this to work you need to re-write the language logic so that it dynamically includes the correct language file. I never wrote it to do this originally mainly because I only ever got sent one language file so I just did not think there was a need.
I did change the language file from graphlang.php to graphland-en.php and graphlang-nl.php for dutch.
And when i change the language behind $lang = āenā; to $lang = ānlā it does change the language.
But i canāt get the language value from the setting.php to overwrite the file language.
Ah OK, well where in the execution of the script is the settings.php script called? As you rightly say these are images and called directly from the browser when it hits the image tag so its not inline code with the call to create the HTML data. You need to add a call to settings.php somewhere probably in graphconf file, but be careful since this is not my code there is no guarantee that there will be no conflict between variables and other things in the settings.php, my code was not designed to co-exist in execution with Kenās code, it may work but just be awareā¦
the image language is changing when another language is selected.
I Changed the default graphlang.php to graphlang-en.php and also created a dutch version graphlang-nl.php
Just a quick question concerning the 1 hour graphs. I noticed it was the last full hour graphs. Is there a way that it could be current instead of the last full hour. I hope I make sense. By the way nice graphs Stuart, must have taken a while to get those all.
If you take a look at the full set of graphs there are 60 minute graphs which are the past 60 minutes, and there are last whole hour graphs which are updated at 59 minutes past each hour. At least thatās what was there when I created them. I dont believe there are any missing for which data is available, if Iām wrong then let me know where the data isā¦
The _1hr.php graphs are based on clientrawhour.txt, so if your assumption (like mine) is that the file is only updated each hour, but Chuckās is updating each 5 minutes, then maybe the graph isnāt working as intended. I guess we need to understand how the data fields in clientrawhour update with the frequent update?
Yes Chuck PMād me. Iād appreciate some confirmation from Brian as to how the clientrawhour.txt is being updated now. Originally it was once per hour at 59 minutes past each hour. Need to know if this has changed and how often its uploaded.
Iāve been grabbing Chuckās clientrawhour.txt for a while, the data is definitely shuffling left, see below (time stamp at the start of the record is my capture time). If itās going to do this I think it needs a time stamp added so that the data can be interpreted correctly.
The problem is that the Broadstairs wxgraphs put times on the x axis that assume that the last data element is 59 minutes past the hour. That used to be a good assumption, but now thereās no knowing what the time stamps should be.
Yes its going to be a problem knowing what that timing is, it may be possible from the timestamp on the file but even then the tie wont be that accurate. I wonder how Julian works out what to use for the time axis? Right now I cant remember howq I made the timestamp. Iāll have a look later today and see what I can do.