AJAX-WD-readme.txt Version 1.02 - 08-Jan-2006 http://saratoga-weather.org/scripts-WD-AJAX.php ------------------------------------------------------------------------------------------------------- Package contents in the .zip file: wxlocal.html ... wxlocal9.html : the carterlake multiple page template set modified for AJAX wxlocal-metric.html : replacement for wxlocal.html if your site is all-metric units. wxlocal-onepage-E.html : the carterlake one-page WD template with USA(English) units and AJAX wxlocal-onepage-M.html : the carterlake one-page WD template with Metric units and AJAX ajaxWDwx.js : the main AJAX script (note: has optional settings at top of file) ajaxgizmo.js : script to provide rotating conditions display on wxlocal1.html .. wxlocal9.html. Used with the ajaxWDwx.js script to provide the conditions to rotate. (note: has one setting to change if you DON'T have Davis VP UV sensor) AJAX-WD-readme.txt: this file -- the instructions :-) AJAX-WD-FAQ.txt : a short FAQ file with ajax id= tags to use in html ./ajax-images : directory containing wind direction arrows, rising/falling arrows and weather conditions graphics. carterlake template original files (if you've already installed these, no need to replace them) readme.pdf : Tom's instructions on configuring Weather Display for wxlocal..wxlocal9.html use newmoon.jpg : graphic used by templates sunicon.jpg : graphic used by templates firstquartermoon.jpg: graphic used by templates fullmoon.jpg : graphic used by templates lastquartermoon.jpg : graphic used by templates weather-print.css : CSS files used by the full-site templates weather-screen.css : CSS files used by the full-site templates ------------------------------------------------------------------------------------------------------- Installation overview: 1) unzip the contents of the .zip file into a working directory of your choice, and include the ./ajax-images directory. 2) upload the ./ajax-images to your website to the /ajax-images directory on your website. If you don't have subdirectory support on your webhoster (like some personal home page directories on ISP's), then you can upload the contents (all image files) to the main directory on your website, then change var imagedir = './ajax-images'; // place for wind arrows, rising/falling arrows, etc. in ajaxWDwx.js to: var imagedir = '.'; // place for wind arrows, rising/falling arrows, etc. 2) NEW carterlake template users need to perform the customizations on the wxlocal.html .. wxlocal9.html files in this package. These files are already AJAXed, but you still have to perform the changes to page titles, station names, station description, and changing 'your@email.com' to your real email address. Find the areas highlighted by ##### in each page and follow the instructions there. You'll need to upload the carterlake *.jpg and *.css files to your website too. If your new site is metric, be sure to copy wxlocal-metric.html over wxlocal.html so users without JavaScript enabled will see native metric units. EXISTING carterlake template users should follow the detailed instructions for adding AJAX to their current website by editing copies of their wxlocal*.html files using the steps shown below. You DON'T NEED to replace the carterlake *.jpg nor *.css files on your website. If your site is metric, be sure to copy wxlocal-metric.html over wxlocal.html so users without JavaScript enabled will see native metric units. 3) edit the two JavaScript files and change any settings as required .. see below for instructions. 4) upload ajaxWDwx.js and ajaxgizmo.js to your website's home directory (using ASCII upload, such as used for webpage upload). 5) when you're satisfied with the webpage customizations, then copy the wxlocal.html .. wxlocal9.html to your Weather-Display /webfiles directory. NEW carterlake template users should follow Tom's instructions on WD setup in readme.pdf to have WD start substituting for WD tags and uploading the pages to your website. The instructions for the one-page templates uses the above steps, except you rename the page of your choice (the US(English) or Metric page) to wxlocal.html before copying to your /webfiles directory. For US(English units) rename wxlocal-onepage-E.html -> wxlocal.html For Metric units, rename wxlocal-onepage-M.html -> wxlocal.html Then customize the HTML markup of the page as directed by -------------------- and change it to be: -------------------- -------------------- 3) find: --------------------
%tempnodp%°F
-------------------- and change it to be: --------------------
%tempnodp%°F
-------------------- 4) find: --------------------
Updated: %date% %time%
-------------------- and change it to be: --------------------
Updated: %date% %time%
-------------------- 5) find: -------------------- Click for extended -------------------- and change it to be: -------------------- Click for extended

Current Conditions

    %weathercond%\%Currentsolardescription%

-------------------- 6) find: --------------------
MEASURE CURRENT MAX/MIN RATE
Temperature %temp% %maxtemp% at %maxtempt%
%mintemp% at %mintempt%
%tempchangelasthourfaren% °F /hr
Humidity %hum%% %highhum%% at %highhumt%
%lowhum%% at %lowhumt%
%humchangelasthour%% /hr
Pressure %baroininches2dp% in. %highbaro% at %highbarot%
%lowbaro% at %lowbarot%
%trend%
%pressuretrendname%
Wind %avgspd% %dirlabel% Last hour: %maxgsthr%
Max day: %maxgst% %maxgstdirectionletter%
%bftspeedtext%
Rain %timeoflastrain% %dayrnusa% %dayswithnorain% day(s) without rain
Month Rain: %monthrn%
%hourrn% /hr
%totalrainlast3hours% /3 hr
Feels Like:
%feelslike% °F
Dew Point:
%dew%
Wet Bulb:
%wetbulb%
Cloud Height:
%cloudheightfeet% ft
-------------------- and replace it with (note.. this step will override any customization you've done to the main table): --------------------
MEASURE CURRENT MAX/MIN RATE
Temperature %temp% %maxtemp% at %maxtempt%
%mintemp% at %mintempt%
%tempchangelasthourfaren% °F /hr
Humidity %hum%% %highhum%% at %highhumt%
%lowhum%% at %lowhumt%
%humchangelasthour%% /hr
Pressure %baroininches2dp% in. %highbaro% at %highbarot%
%lowbaro% at %lowbarot%
%trend% /hr
%pressuretrendname%
Wind %avgspd%   %dirlabel% Last hour: %maxgsthr%
Max day: %maxgst% %maxgstdirectionletter%
%bftspeedtext%
Rain %timeoflastrain% %dayrnusa% %dayswithnorain% day(s) without rain
Month Rain: %monthrn%
%hourrn% /hr
%totalrainlast3hours% /3 hr
UV index %VPuv%   High UV: %highuv% at %highuvtime% Yesterday UV high: %highuvyest% at %highuvyesttime%
Solar radiation %VPsolar% W/m2 (%currentsolarpercent%% of max) High Solar: %highsolar% at %highsolartime%  
Feels Like:
%feelslike% °F
Dew Point:
%dew%
Wet Bulb:
%wetbulb%
Cloud Height:
%cloudheightfeet% ft
-------------------- 6) If you don't have a Davis Vantage Pro Plus with UV and Solar sensors, you should delete the table rows ... that display those functions in the insertion above. See the instructions in the HTML comments in the code above. 7) save your changes. OTHER PAGES CUSTOMIZATION ( ------------- wxlocal2.html to wxlocal9.html --------------------- ) Adding the AJAX gizmo to the right-side heading of the wxlocal2..wxlocal9 pages involves changing the HTML markup in three parts of each page. Here's the step-by-step changes needed on your pages: 1) edit the page with notepad or other text editor. 2) find: -------------------- -------------------- and change it to be: -------------------- -------------------- 3) find: --------------------
%tempnodp%°F
-------------------- and change it to be: --------------------
%tempnodp%°F
-------------------- 4) find: --------------------
Updated: %date% %time%
-------------------- and change it to be: --------------------
Updated%date%  %time%
 
-------------------- Repeat the above steps for the rest of your wxlocalN.html pages you wish to have display the rotating conditions AJAX gizmo. ------------------------------------------------------------------------------------------------------- ACKNOWLEDGEMENTS AND THANKS: (id) is on http://www.weather-watch.com/smf/index.php forum Brian Hamilton at http://www.weather-display.com/ for developing Weather-Display and adding the clientraw.txt uploads which makes all this possible. Thanks too for his ongoing outstanding support. Tom (carterlake) at http://www.carterlake.org/ for the wxlocal*.html templates for WD, and for developing with Jozef (pinto) at http://joske-online.be/ for developing the first AJAX enabled routines for WD. Larry (anole) at http://weather.anolecomputer.com/ for allowing use of his condition icons (in ./ajax-images) from his excellent Weather Sticker PHP script package. Mike (MCHALLIS) at http://www.carmosaic.com/weather/index.php for developing the seconds counter and adding error handling to the XMLHttpRequest for getting clientraw.txt FourOhFour (on wxforum.net) at http://skigod.us/ for replacing all the x.responseText.split(' ')[n] calls with a simple array lookup.. much better speed and a streamlined version of getUVrange. Package author: Ken True - webmaster@saratoga-weather.org - 14-Dec-2006 Support (as available) by postings on http://www.weather-watch.com/smf/index.php forum or email to the author.