Hi Brian! I understand that WD’s own conditions can be set by the language settings in WD. I’m interested in the possible METAR conditions you can emit based on the METAR decode you have built-in to WD. If I can get that list of strings from you, I can set up a possible translation for the ajax part of the clientraw[49] display string.
It’s better to have the translation of the weather conditions strings inside the AJAX script, because in case that you have a bi-lingual weather page like me (English-Greek) you have only
the current WD language option available!
I’m still trying to make the translation of WD into Greek, but it’s a tough project and I need a lot of free time for this! I hope that it will be ready soon! :roll:
I know that Greek language is a tough language to embed into the binary world!
Ken, the new AJAX script is up and running on my pages (English-Greek) like a charm! The only items that are not translated, is the current conditions string and the wind
compass images. I have to draw new ones with wind direction letters in Greek…
Very nice, Thanos! Viewing the Greek page shows the updates and mouseovers in Greek too! Just what I had in mind to let folks translate the fixed English to local language. Well done!
I have installed the latest demo package, the test pages and standalone ones run fine on my site. When I attempt to incorporate the ajax-dashboard.php on my web page I get this error.
Updated: @
Fatal error: Call to undefined function: fixup_time() in /home/content/k/4/r/k4rcb/html/weather/index1.php on line 144
where on your page you wanted it to appear, or did you copy the contents of ajax-dashboard.php into your page. If the latter, then you didn’t include the PHP functions needed to operate the page when it was copied in.
I’d recommend you use the
<?php include("ajax-dashboard.php"); ?>
method to include the page rather than embedding the contents of the page itself… makes it much easier to handle future updates
I think you need to change two settings in your ajaxWDwx.js file from
var clientrawFile = '/vhost/buskelundtoften.dk/httpdocs/vejret/vejrdata/clientraw.txt'; // location of clientraw.txt relative to this page on website
var ajaxLoaderInBody = false; // set to true if you have <body onload="ajaxLoader(..."
var imagedir = 'http://www.buskelundtoften.dk/vejret//scripts/ajax/ajax-images'; // place for wind arrows, rising/falling arrows, etc.
to
var clientrawFile = '/vejret/vejrdata/clientraw.txt'; // location of clientraw.txt relative to this page on website
var ajaxLoaderInBody = false; // set to true if you have <body onload="ajaxLoader(..."
var imagedir = 'http://www.buskelundtoften.dk/vejret/scripts/ajax/ajax-images'; // place for wind arrows, rising/falling arrows, etc.
The clientrawFile variable is the relative or absolute URL path and filename, not the FILE path in the filesystem on your weather hosting website. The JavaScript (since it runs in the client browser) only knows about the URL addresses since it can’t access the filesystem directly (only via the webserver).
I’m not sure about the imagedir setting, but using the full URL of the directory for the AJAX images should work ok… it is an URL address too in the JavaScript.
a question about adding the testtags.txt, which creates a testags.php…when entered into the Control Panel, Web files/Web page setup, Custom Web Page Setup Screen…According to the Read Me in the new Ajax 1.06 Folder. which says the following info here:
(Instructions:
The ‘testtags.txt’ file should be copied to your Weather-Display \webfiles directory,
and you should use the Control Panel, Web files/Web page setup, Custom Web Page Setup Tab
Enter:
testtags.txt in the first open (not used) ‘Local file name’ in the
‘Special file conversion’ box
testtags.php in the ‘Remote file name’ under the ‘Local file name’ box you used
Set the Toggle to ON and press ‘Test’, then OK buttons.
This should create a ‘testtags.php’ file with selected current WD conditions loaded into
PHP variables on your website.
NOTE: this file is required for correct operation of the AJAX demo.)
is this only needed to be done one time Only, for everything to keep working updating?.
after it is uploded the 1 time, do I go back into the custom web page setup screen and turn the toggle to “OFF”
Do I need to enter anything or check any other boxes on ther left side of the CustomWeb Page Setup Screen?
*I included a screen shot picture of my Custom web page setup screen , but havent entered anything in it yet, just wanted to know what other boxes may need to be checked on the left side…if any?
Chris,
You need to do the setup, and leave it on … the testtags.php will be the way your PHP pages refer to the current weather conditions from your station when the page is first loaded. Afterwards, updates are made via AJAX using clientraw.txt on some (but not all the variables) in the page.
So… do put back the testtags.txt and testtags.php in the Local and Remote file names, and turn the switch to ON (and leave it on)
Couple questions along the same line. It said in the instructions I believe to set it to load every 5 minutes but there doesn’t seem to be a way on that setup page to enable 5 minute loading if necessary. Also, when I was leaving it on it wanted to upload every file when I hit the test button. If it’s left on with just the testags conversion is it only going to upload the testags and not everything else, and how about the time period??
Right now I have a test page set up but it’s loading some of the variables and not others. http://www.bigbaywx.com/test.php However it’s interesting that if I go to the dashboard testpage that came with the script it always has all the correct updated information. http://www.bigbaywx.com/ajax-dashboard-testpage.php Looking forward to the completion of the new templates using this mode.
Hello Jack/firewall…Thanks for that link and I will check into it.
as for the (Also the testtags.php needs to be “parsed” by WD in the “Internet Create File Creation and uploads” in the control panel. If I remember it is file 29.)…will check that out also
Update:
I now have the Gizmo page working in real time…seems to be updating.
hopefully I can get this all sorted out, but am sure I may need more help in the process
Hello Jack…NO it is not. I am using the Test page…that was included in the ajax 1.06 folder. I have the dashboard test page working, but the dashboard.php (other Test page)…is not updating.
I do not think that my testtags.php is being updated either. it must be something to do with the internet file creation of the file 29, but I am not sure what I need to enter in the internet file create/upload screen…any help appreciatted.
if you could show a screenshot picture of your’s for file create, and file upload…that would be very helpful
thank you…chris
I have managed to get the Thermometer.php uploaded and it works. I also had to make a wind calm.gif, as there was none included in the ajax-images folder. all i did was use one of the others in their, renamed it, and edited it with paint so that it has no arrows showing (Calm). it looks ok for now.