Some tags not populated in Carterlake/Ajax

Hi. Been trying to set up the Carter lake templates but having some issues with some tags. The following aren’t getting populated (ie: just get the tags on web page):

%maxtempt%
%mintempt%
%highhum%% at %highhumt%%lowhum%% at %lowhumt%
%humchangelasthour%% /hr
%highbarot%
%lowbarot%
%timeoflastrain%
%wetbulb%

The rest seem to be showing up (and updating properly). Is there some setup of my clientraw.txt file I need to change??

check very carefully your template file
you might find that if you are using the say frontpage, it has altered those tags

and or try putting the tags on a separate line

note, a search of the forum will bring up similar problems but the same solution

It would help if you could add your website URL to your profile so that we can see the problem ?

Thanks guys. I didn’t make many modifications, and used notepad to do them. Interestingly, when I use the raw file without any edits at all, same problem exists. (and yes, it is the main page that I am testing - haven’t set up any of the other ones yet. Also tried it with the default onepage). The url I’m testing at is http://yds.ipupdater.com/wxlocal.html. The main page is the default name wxlocal.html (this is actually the wxlocal-metric.html file that I saved over the wxlocal.html file).

I used the tnet parser to look at my clientraw.txt file. One thing I noted is that my station name is the one I gave it with a time hyphenated onto it. Is this how it is supposed to look? I thought I read somewhere about how hyphen’s cause problems in some files.

Anyway, appreciate if upon looking you can see something I missed.

I think there is some confusion about how this is supposed to work. wxlocal.html is a template file with tags that WD uses to generate the wx.html webpage that is uploaded at intervals to your site. AJAX then updates some of the fast changing parameters like temperature from the clientraw.txt, but other parameters like those you mention, eg %maxtempt% are only update each time WD recreates the wx.html page from the wxlocal.html template.

Ah, yes, there was confusion. I was under the impression that if I had the file in my web folder that it would get populated from the clientraw.txt file. So this file actually needs to get generated from WD then. Now I understand a bit more about the setting of the “Internet File Creation and Upload” pages. Thanks for the help and the patience for a newbie!!

Not to confuse you, but there is a more complex variation of the carterlake template which uses php to update all the fields from the clientraw files and another datafile which is created from tags and uploaded by WD. But, it’s probably best to get this original version working first, and then transition to the full php version.

I’m still having problems. I have put the edited templates in my wdisplay directory now. Since I’m running my own web server, I don’t want to FTP them, but only have them created locally. But it seems in the “Internet File creation and upload” setup there is no option to have them created locally. Each time I try to upload, it want to run the FTP client. Is there no way to just create the wx files to a specified local directory without using FTP?? (BTW - the WD default webfiles get created properly without using FTP).

use the advanced internet setup (customise internet and file creation setup) and set times to create the files needed and make sure no times set to upload those same files

also make sure you have set the desired web files location in the webfiles/web page setup

Thanks Brian. Got that working.

Now, I’ve tried to add some PHP content to my main carterlake template. Don’t know how to make WD generate a file with the php extension? (Recall, I am not using FTP to upload the files as I am running a webserver from the same machine as my WD.)

Now that I’ve started playing around with PHP, I’m interested in the methodology Niko mentioned above to populate pages. Any links to where I can get info on that methodology? I’ve seen some stuff about creating a wxlocal30 template for generating a file, but don’t have a clear picture on how to create that file and/or what to put in it.

there is the special file conversion setup in the custom web page setup, try that, to get a .php extension custom web page created in the webfiles folder
or , you can set the file extension to use, in that custom web page setup , too…try that (i.e you would need a file called wxlocal.php, which would get created as wx.php)

Thanks Brian, but it not at all clear to me where I specify the input files on any of those custom setup pages. The “special file conversion” setup is a complete mystery to me as to what I am supposed to be setting up here (I’d include a screenshot of the page but I’m not currently at my machine with WD on it).

I also tried creating a wxlocal.php template as you suggested, but the wxlocal setup did not generate a wx.php file. I see, when I click the “view upload times” button, that I can specify the filename and extension for an FTP upload, but I’m not using FTP, only trying to generate the files to the local machine.

i dont see any screen shot

you set the file extension to use in the custom web page setup
did you look there?
the special file conversion is there too
you just need to enter the local and remote name
e.g
wxlocal.php
and
wx.php

Ok. :oops: I was looking at the wrong “Special File Conversion” place. I was looking at the “Advanced Internet Settings” tabs under the “Internet File Creation and Uploads” button. Now I see in the “Custom Web Page Setup” tab under the “Web Files/Web Page/Real Time FTP/WDL” button the place to tell WD the input and output files. Got that working.

I’m still interested in the other PHP method Niko mentioned above. Can anyone direct me to some help in the forums on setting that up? If I understand correctly (which, as you can tell from my previous confusion, is not likely!! #-o) a special data file is generated from WD which is then used by PHP engine to populate fields on an HTML page. Am I right? And how do I set up this data file (ie: decide what data to place and figure out the tags) and generate it?

The Carterlake/AJAX templates are designed as pure HTML, and the wxlocal.html…wxlocal9.html should be uploaded via WD on a routine basis so the %wdtags% in the pages can be replaced with current weather values. The AJAX part will update some (but not all) of the current weather values from data in clientraw.txt – that’s because clientraw.txt doesn’t offer all the values used in the pages.

The wxlocal.html … wxlocal9.html should be placed in the Weather-Display \webfiles directory on your PC, then WD will upload them as wx.html … wx9.html (after proper setup in WD).

If you want to use PHP instead, you’ll need to do two things:

  1. first create and begin routine upload of a single page that contains the WD values you wish to use in your pages. There are at least two methods to do this … Tom at Carterlake uses a custom tags page and a small PHP to load the values into PHP variables. I have a slightly different method to load the WD values directly into PHP variables.

  2. once you have the data uploaded, then you need to rewrite the HTML on the pages to use PHP to echo/print the value instead of the %wdtag%. For wxlocal5.html/wx5.html (daily trends), it’s probably better to just have WD upload the page as the variables on that page are really used nowhere else on the site, and it doesn’t make sense to upload all that extra data just for one page.

More info can be found at Tom’s site ( http://www.carterlake.org/weatherphp.php ) and at my site (http://saratoga-weather.org/scripts.php )

Hope this helps…
Best regards,
Ken