cloudy cloudy

Author Topic: Alternative ajaxWDwx.js Script v 9.14  (Read 82568 times)

0 Members and 1 Guest are viewing this topic.

Offline Meerkat

  • Rainer
  • Posts: 703
  • VP2+, WD v10.37R b37, Win 7, ACER i5 4GB 64bit
  • Pretoria, South Africa
    • Bashewa
Alternative ajaxWDwx.js Script v 9.14
« on: January 10, 2010, 08:00:07 AM »
ajaxWDwx.js  - RELEASE V9.14

DESCRIPTION:
This alternative ajaxWDwx.js script has been heavily modified and has many new ajax tags.
Setup has been simplified and many new features have been added (see history below).


Weather website templates similar to the above available at: Saratoga-Weather.org

EXAMPLE:
Go to: Bronberg Weather Station


MAJOR ADDITIONS:
o UOM switching button for METRIC and ENGLISH (imperial).
o RESTART button to resume updates without having to reload the page.
o External SETTINGS script file which should simplify upgrading to newer versions.
o Webcam image update and management.
o Swapping of current conditions icon with your webcam during day/night and vice-versa.
o Easier management of icon sets (current / wind / FWI / UV etc.).
o Dynamic cloud height graphic implementation.
o Simplified Unit-of-Measure management.
o Tag for acurate moon phase picture (black & white background).
o Alert if "clientraw.txt" can not be found.
o Loading of "clientrawextra.txt" for history like rain.
o Packed version of "ajaxWDwx.js" i.e "ajaxWDwx-packed.js" for smaller file size.
   For the packed version you'll need to use "ajaxWDwx-settings.js" for your configuration.
o ... and many additional "ajaxtags".

For all the available "ajaxtags" see the next post on this page.


HOW TO IMPLEMENT EXTERNAL SETTINGS:
If you want to implement the separate external settings file "ajaxWDwx-settings.js"
then you need to add the following line to your "top.php" file:
     <script type="text/javascript" src="ajaxWDwx-settings.js"></script>
right below this line in "top.php":
     <script type="text/javascript" src="ajaxWDwx.js"></script>

For completely striped down version of the external settings file have a look at mine here:
http://www.bashewa.com/ajaxWDwx-settings-bws.js


HOW TO HAVE YOUR SCRIPT LOAD FASTER:
If you have implemented the external settings script above then you
can use the packed version of this script i.e. "ajaxWDwx-packed.js".
Upload this file to your server and then replace the following line in your "top.php" file:
     <script type="text/javascript" src="ajaxWDwx.js"></script>
with this one:
     <script type="text/javascript" src="ajaxWDwx-packed.js"></script>


HOW TO IMPLEMENT UOM SWITCHING:
For implementation see:  http://www.bashewa.com/ajax-dashboard.php?sce=view

Add the following code somewhere into your "ajax-dashboard.php":
Code: [Select]
<div onClick="javascript:ajax_changeUnits();" style="cursor: pointer"><b>
      <span id="uomM" style="color: gray;">METRIC</span> |
      <span id="uomE" style="color: blue;">IMPERIAL</span></b>
 </div>

Or even better is to replace the top row in the table in "ajax-dashboard.php" which will make it look like in the picture above:
Code: [Select]
<!-- TOP TABLE ROW - FOR UPDATED HEADER & UOM SWITCHING -->
<?php // get last update time from testtags.php
   
$tagsInterval 5// testtags.php upload interval in minutes
   
$updTime mktime($time_hour,$time_minute,0,$date_month,$date_day,$date_year);
   
$nextUpd mktime($time_hour,$time_minute+$tagsInterval,0,$date_month,$date_day,$date_year);
?>

<tr align="center">
   <td>
      <div onClick="javascript:ajax_changeUnits();" style="cursor: pointer;" title="Toggle units-of-measure &amp; restart"><b>
         <span id="uomM" style="color: gray;"><?php langtrans('METRIC'); ?></span> |
         <span id="uomE" style="color: blue;"><?php langtrans('IMPERIAL'); ?></span></b>
      </div>
   </td>
   <td class="data1" colspan="3" style="text-align: center">
      <span class="ajax" id="ajaxindicator"><?php langtrans('Updated'); ?>:</span>
      <span class="ajax" id="ajaxdate@">
         <noscript>
            <?php echo date("j/n/Y @ h:ia",$updTime).' - '.langtransstr('next update at').' '.date("h:ia",$nextUpd); ?>
         </noscript>
         <script type="text/javascript"><!--
            document.write("<?php echo $date.' @ '.$time?>");
         //--></script>
      </span>
      <span class="ajax" id="ajaxntimess">&nbsp;</span>
      <script type="text/javascript"><!--
         document.write(' <small><i>(<span id="ajaxcounter">0</span>&nbsp;<?php langtrans('sec ago'); ?>)</i></small>');
      //--></script>
   </td>
</tr>

You need to enclose your static fields in "ajax-dashboard.php", i.e. fields that don't have an "ajaxtag" which
you want to have converted during UOM switching, with one of the following corresponding <span> classes:
    ----------------------------------------------------------
    <span class="convTemp">82.7&deg;F</span>   ...for temp
    <span class="convWind">   2.7 mph</span>   ...for wind
    <span class="convBaro">30.30 inHg</span>   ...for baro
    <span class="convRain">   1.04 in</span>   ...for rain
    <span class="convSnow">   12.4 in</span>   ...for snow
    <span class="convAlti">   2793 ft</span>   ...for altitude
    <span class="convDist">  15 miles</span>   ...for distance
    <span class="convDate">20-10-2009</span>   ...for dates
    <span class="convTime">  15:32:27</span>   ...for times
    ----------------------------------------------------------

NOTE: the value in the span must include the units-of-measure for them to be converted.
If you need CSS styling on the same field then you can specify it in the same class tag like this for instance:
    <span class="convRain rainStyle">171.4 mm</span>

You'll also need the modified thermometer.php script that supports UOM switching.


I HAVE PROBLEMS - I DON'T SEE THE AJAX UPDATES:
Have you pressed CTRL-F5 to refresh your browser?
Your browser caches javascript and stylesheets and you might still be seeing the old versions.

Make sure all your other scripts that you have included on your page don't have javascript errors.
If this happens the javascript engine grinds to a complete halt and then this script might not run.

Also make sure you have not made any mistakes in your "ajaxWDwx-settings.js" file which will cause javascript errors.
Check your FIREFOX "Javascript Error Console" for possible errors please before reporting any problems.
Alternatively you can implement the following code on your pages: Javascript Error Dialog Box
which will inform you of onpage Javascript errors.


ADDITIONAL SCRIPTS:
Additional scripts you might be interested in.
Cloud Base Graphic
Gradient Thermometer
Mobile / Cellphone / iPhone Safari Script


ADDITIONAL ICONS & GRAPHICS:
Additional graphics you might be interested in.
Make sure to unzip into your root folder with "use folder names" ticked when unzipping them.
If you do so it will leave your current graphics intact.
-------------------------------------------------------------------------------------------
  All of the icons below:  http://www.bashewa.com/downloads/bws-iconsets.zip        (2.5mb)
-------------------------------------------------------------------------------------------  ---------FOLDER----------
Current conditions icons:  http://www.bashewa.com/downloads/bws-icons-current.zip   (269kb)  "./ajax-images/icon/...."
       Moon pictures x28:  http://www.bashewa.com/downloads/bws-icons-moon.zip      (188kb)  "./ajax-images/moon/...."
      Fire Weather Index:  http://www.bashewa.com/downloads/bws-icons-fire.zip      (291kb)  "./ajax-images/fire/...."
         Wind Rose icons:  http://www.bashewa.com/downloads/bws-icons-wind.zip      (822kb)  "./ajax-images/wind/...."
                UV icons:  http://www.bashewa.com/downloads/bws-icons-uv.zip        ( 20kb)  "./ajax-images/uv/......"
           Forcast icons:  http://www.bashewa.com/downloads/bws-icons-forecast.zip  (1.1mb)  "./forecast/images/1/..."
 Sun/Moon bg, Moon ph x4:  http://www.bashewa.com/downloads/bws-icons-moonphase.zip ( 19kb)  "./....................."
-------------------------------------------------------------------------------------------  -------------------------


VERSION HISTORY:
Version 9.00 - 15-Apr-2009
Added...... fetching of "clientrawextra.txt" for history data (e.g. rain etc.).
Added...... tag "ajaxrainSun" ...... for last Sunday's rain
                   ..thru..
                "ajaxrainSat" ...... for last Saturday's rain
Added...... tag "ajaxwinddeg" ...... for wind in degrees e.g. 334
Added...... tag "ajaxsnowDepth" .... for current snow depth
                "ajaxsnowToday" .... for todays snow
                "ajaxsnowMonth" .... for this months snow
                "ajaxsnowSeason" ... for this seasons snow
Added...... tag "ajaxwebcamimg" .... for webcam image support
Added...... tag "ajaxmoonimg" ...... for moon image support
Added...... tag "ajaxmoonphase" .... for current phase e.g. "First Quarter"
Added...... tag "ajaxmoonpct" ...... for current moon illumination e.g. 24%
Added...... tag "ajaxcloudheightimg" for cloud height graphic
Added...... tag "ajaxuvimg" ........ for UV graphic (current UV)
Added...... tag "ajaxuvburnrate" ... for UV skin burn rate (in minutes)
Added...... "REFRESH" hyperlink to "Updates paused" for restarting ajax script.
Added...... window.onload function to prevent early ajax loading.
Added...... support for UOM switching [ metric | english ].
Added...... support for UOM switching on static field values.
Modified... thermometer.php to support UOM switching and different styles.
Modified... UV color words to official web colors as specified by WHO, WMO & UNEP.
Modified... overall settings setup for easier configuration.
Modified... UOM conversions and added functions convertSnow & convertDist.

Version 9.01 - 05-Jan-2010
Fixed...... problem with Moon Phase.

Version 9.02 - 07-Jan-2010
Added...... Webster Weather modifications (v2.80, v3.00, v4.10)

Version 9.03 - 10-Jan-2010
Added...... tag "ajaxRcdRain" ......... rain record (record all-time daily rain)
Added...... tag "ajaxRcdRainTime" ..... rain record time
Added...... tag "ajaxRcdRainDate" ..... rain record date
Added...... tag "ajaxRcdRainHr" ....... rain record Hr (record all-time daily rain in 1 hour)
Added...... tag "ajaxRcdRainHrTime" ... rain record Hr time
Added...... tag "ajaxRcdRainHrDate" ... rain record Hr date
Added...... tag "ajaxDaysRain" ........ rain days (MTD)
Added...... tag "ajaxDaysNoRain" ...... rain absent days

Version 9.04 - 10-Jan-2010
Implemented Webcam support for useCamAtNight and delayDayNight

Version 9.05 - 10-Jan-2010
Fixed...... problem with "number_format" function not showing correct decimal value.
Added...... ALERT when "clientraw.txt" file can not be found (error 404)
Removed.... ajaxLoaderInBody - can no longer be supported i.e. <body onload="ajaxLoader(...)">
            You need to remove all references to the "ajaxLoader" in your scripts i.e.
            you need to replace it with <body> only.
Added...... ClientRawExtra file will now always be loaded on startup as well.
Implemented external "ajaxWDwx-settings.js" for separate setup outside of this script.

Version 9.06 - 12-Jan-2010
Fixed...... problem with incorrect language translations.
Added...... modified "language-??.js" files to installation zip.
Added...... tag "ajaxVPleaf" ... VP leaf wetness
Added...... alert to your visitors if you have Weather Station problems.
Simplified. the setup in the external settings file "ajaxWDwx-settings.js".

Version 9.07 - 13-Jan-2010
Added...... support to use English Windrose images only (for Multilingual Systems).
Simplified. the setup in the external settings file "ajaxWDwx-settings.js" even more.
            Your external settings file will now be compatible with all future versions of the script.

Version 9.08 - 17-Jan-2010
Fixed ...... problem with dates when time format is set to 12h clock (AM/PM) in WDisplay.

Version 9.09 - 17-Jan-2010
Fixed ...... problem with JS Date function showing 00:15pm instead of 12:15pm

Version 9.10 - 19-Jan-2010
Fixed ...... problem with dates showing 19:00pm instead of 07:00pm when switching UOM.

Version 9.11 - 19-Jan-2010
Added ...... code for displaying JavaScript errors on page ... see Javascript Error Dialog Box.
   a) ...... changed UV to float value to show decimal point.
      ...... added ajaxdate2 = ajaxdate@ for W3C validation.

Version 9.12 - 19-Jan-2010
Added ...... classes "convDate" and "convTime" for static field UOM switching.
Removed .... Bashewa icon nameing convention function i.e. ajax_getIconName2().
Implemented. Icon Nr specification on icon names eg. "{0NR}-{PIC}.gif" = "01-nskc.gif"

Version 9.13 - 16-Jan-2011
Fixed ...... fixed Moon Phase data (Thanks goes to Ken True, Ken True - Saratoga-weather.org)

Version 9.14 - 29-Sep-2012
Fixed ...... fixed UOM conversions/switching for static fields.
Fixed ...... tags "convTime" and "convDate" and conversion functions.
Added ...... tags "ajaxLiveFWI10" and "ajaxLiveFWI" for live FWI.
Added ...... tag  "ajaxVPforecast"
Fixed ...... "ajax_getUVrange" function.
Fixed ...... "date" prototype function.



TODO LIST / DEVELOPMENT IN PROGRESS:
 1. Tag for WDLive "Input Daily Weather" -> "Weather Warning Forecast Input" and/or "Davis VP Forecast/Warning Text" ... tag: ajaxforecastwarning
 2. Tag for Radar picture with frequent update (minutes settable)  ... tag: ajaxradarimg
 3. Tag for Chandler Burning Index ... tag: ajaxCBI & ajaxCBIimg
 4. Tag for Tide image/graph ... tag: ajaxtideimg
 5. Tag for Sun Position image/graph ... tag: ajaxsunposimg
 6. Tag for Sun Path image/graph ... tag: ajaxsunpathimg
 7. Tag for Wind Direction Plot Graph ... tag: ajaxwinddirplotimg
 8. Tag for any kind of imaginable image or graph with optional update frequency.
 9. Load "ajaxWDws-settings.js" dynamically from within script in case it's not declared in "top.php".

CREDITS:
Credits go to the following persons who all had a part in making this script:
  Matthew Romer ..       http://wawaweather.net/
  Kevin Reed .....       http://www.tnetweather.com
  Pinto ..........       http://www.joske-online.be
  Tom ............       http://CarterLake.org
  Ken True ....... v2.00 http://Saratoga-weather.org
  Mike Challis ...       http://www.carmosaic.com/weather/
  FourOhFour .....       http://skigod.us (at wxforum.net)
  Jim ............       http://jcweather.us
  Scott .......... v3.00 http://www.WebsterWeatherLIVE.com
  Rainer ......... v9.00 http://www.bashewa.com (myself)

DOWNLOAD: ajaxWDwx.js (82kb)  (NOTE: see Clientraw Parser for available data)
PS: When doing upgrades do not copy over your current settings file.
To prevent this I recommend you name your settings file to something like this: "ajaxWDwx-settings-mws.js" (or similar)


PS: Why all of a sudden the jump to version 9.00?
Well, it makes it easier to follow which developer made which changes and for other developers to "steal" each others changes.
I suggest that each developer sticks to one major version for his development i.e. my range would be 9.00-9.99 and I suggest
Scott to use 3.00-3.99 and Ken to stick to the 2.00-2.99 range. Myself and Ken have agreed on this (see his post below).
This will make life mush easier in tracking modifications.
« Last Edit: September 29, 2012, 10:03:33 AM by Meerkat »
Cheers,
Rainer

Meerkat's Script Collection
Script download links always available on the first page of my threads

Offline Meerkat

  • Rainer
  • Posts: 703
  • VP2+, WD v10.37R b37, Win 7, ACER i5 4GB 64bit
  • Pretoria, South Africa
    • Bashewa
Re: Alternative ajaxWDwx.js Script v 9.14
« Reply #1 on: January 10, 2010, 08:01:01 AM »
SUMMARY OF AJAX ID TAGS:
Example: <span class="ajax" id="ajaxtemp">77F</span>

TEMPERATURE (outdoor):
   "ajaxtemp" ................ current temperature
   "ajaxtempNoU" ............. current temperature (no units)
   "ajaxtemparrow" ........... rising/falling image
   "ajaxtemprate" ............ temperature rate
   "ajaxtempmin" ............. min temperature today
   "ajaxtempmax" ............. max temperature today
   "ajax24hDiff" ............. 24h temperature difference
   "ajaxthermometer" ......... thermometer image
   "ajaxtempcolor" ........... current temperature in a colored box

WET BULB:
   "ajaxwetbulb" ............. wet bulb temperature

HUMIDITY:
   "ajaxhumidity" ............ current humidity (%)

DEWPOINT:
   "ajaxdew" ................. current dew-point
   "ajaxdewmin" .............. min dew-point today
   "ajaxdewmax" .............. max dew-point today

HUMIDEX:
   "ajaxhumidex" ............. current humidex
   "ajaxhumidexmin" .......... min humidex today
   "ajaxhumidexmax" .......... max humidex today

HEAT INDEX:
   "ajaxheatidx" ............. current heat index
   "ajaxheatidxmin" .......... min heat index today
   "ajaxheatidxmax" .......... max heat index today

WINDCHILL:
   "ajaxwindchill" ........... current windchill
   "ajaxwindchillmin" ........ min windchill today
   "ajaxwindchillmax" ........ max windchill today

FEELS LIKE:
   "ajaxfeelslike" ........... current feels like (temperature)
   "ajaxheatcolorword" ....... current colored heat/chill word

APPARENT TEMPERATURE:
   "ajaxapparenttemp" ........ current apparent temperature
   "ajaxapparenttempmin" ..... min apparent temperature today
   "ajaxapparenttempmax" ..... max apparent temperature today

PRESSURE / BARO:
   "ajaxbaro" ................ current baro pressure
   "ajaxbaroNoU" ............. current baro pressure (no units)
   "ajaxbarotrend" ........... current baro trend (units)
   "gizmobarotrend" .......... current baro trend (units)
   "ajaxbaroarrow" ........... rising/falling image (up/down)
   "ajaxbarotrendtext" ....... baro trend text (rising/steady/falling)
   "ajaxbaromin" ............. min baro pressure today
   "ajaxbaromax" ............. max baro pressure today

WIND SPEEDS:
   "ajaxmaxgust" ............. max gust
   "ajaxwindmaxgust" ......... max gust ?
   "ajaxwindmaxgusttime" ..... max gust time (hh:mm)
   "ajaxwindmaxavg" .......... current max average speed
   "ajaxwind" ................ current wind speed
   "ajaxwindNoU" ............. current wind speed (no units)
   "ajaxwinduom" ............. hides wind units of measure when calm
   "ajaxgust" ................ current gust speed
   "ajaxgustNoU" ............. current gust speed (no units)
   "ajaxgustuom" ............. hides gust units of measure when calm
   "ajaxbeaufortnum" ......... wind beaufort number
   "ajaxbeaufort" ............ wind beaufort name

WIND DIRECTION:
   "ajaxwinddir" ............. wind direction (name e.g. NNW)
   "ajaxwinddeg" ............. wind direction in degrees (e.g. 338)

WIND ICONS:
   "ajaxwindicon" ............ wind icon arrow direction image (14x14)
   "ajaxwindiconwr" .......... wind rose image

SOLAR RADIATION / UV INDEX
   "ajaxsolar" ............... current solar radiation
   "ajaxsolarpct" ............ percent solar radiation
   "ajaxuv" .................. current UV level
   "ajaxuvNoD" ............... current UV level (no decimal)
   "ajaxuvburnrate" .......... skin burn rate in minutes at current UV level
   "ajaxuvword" .............. None, Low, Medium, High, Very High, Extreme.
   "ajaxuvimg" ............... UV picture

RAIN:
   "ajaxrainratehr" .......... current rain rate per hour
   "ajaxrainratemax" ......... max rain rate

   "ajaxrain" ...............  rain total Today
   "ajaxrainNoU" ............. rain total Today (no units)
   "ajaxrainYes" ............. rain total Yesterday
   "ajaxrainmo" .............. rain total for this Month
   "ajaxrainyr" .............. rain total for this Year

   "ajaxrainSun" ............. rain total last Sunday
   "ajaxrainMon" ............. rain total last Monday
   "ajaxrainTue" ............. rain total last Tuesday
   "ajaxrainWed" ............. rain total last Wednesday
   "ajaxrainThu" ............. rain total last Thursday
   "ajaxrainFri" ............. rain total last Friday
   "ajaxrainSat" ............. rain total last Saturday
   "ajaxrainydy" ............. rain total Yesterday (for compatibility)

   "ajaxRcdRain" ............. rain record (record all-time daily rain)
   "ajaxRcdRainTime" ......... rain record time
   "ajaxRcdRainDate" ......... rain record date

   "ajaxRcdRainHr" ........... rain record Hr (record all-time daily rain in 1 hour)
   "ajaxRcdRainHrTime" ....... rain record Hr time
   "ajaxRcdRainHrDate" ....... rain record Hr date

   "ajaxDaysRain" ............ rain days (MTD)
   "ajaxDaysNoRain" .......... rain absent days

SNOW:
   "ajaxsnowToday" ........... snow total Today
   "ajaxsnowMonth" ........... snow total for this Month
   "ajaxsnowSeason" .......... snow total for Season
   "ajaxsnowDepth" ........... current snow depth

CURRENT CONDITION ICON:
   "ajaxcurrentcond" ......... current weather conditions
   "ajaxconditionicon" ....... current condition icon for Anole Sticker (gif icons 25x25)
   "ajaxconditionicon2" ...... current condition icon (any size)
   "ajaxVPforecast" .......... Davis VP2 forecast ticker message(new)

WEBCAM:
   "ajaxwebcamimg" ........... current webcam snap (170x127)

CLOUD HEIGHT:
   "ajaxcloudheight" ......... cloud height text eg. 2637ft AGL
   "ajaxcloudheightImg" ...... cloud height image

MOON PHASE:
   "ajaxmoonphase" ........... moon phase names eg. "Evening Crescent"
   "ajaxmoonpct" ............. moon illumination %
   "ajaxmoonimg" ............. moon phase image
   "ajaxmoonimg100" .......... 100x100 moon phase image for wxastronomy.php

FIRE RISK:
   "ajaxfireindex" ........... fire risk index
   "ajaxfireimg" ............. fire risk image
   "ajaxLiveFWI" ............. fire risk live(new)
   "ajaxLiveFWI10" ........... fire risk live in last 10 minutes(new)

LIGHTNING:
   "ajaxlightning" ........... lightning strikes
   "ajaxlightningtime" ....... lightning strike time
   "ajaxlightningdist" ....... lightning strike distance
   "ajaxlightningbearing" .... lightning strike bearing

LEAF WETNESS
   "ajaxVPleaf" .............. current leaf wetness (Davis VP)

CLIENTRAW.TXT DATE & TIME: (the notes below use 16 Apr 2009 @ 14:37:07)
   "ajaxndate" ............... Apr 16, 2009
   "ajaxndate2" .............. 16-Apr-2009
   "ajaxntime" ............... 14:37
   "ajaxntimess" ............. 14:37:07
   "ajaxdname" ............... Thu
   "ajaxdatetime" ............ 16/4/2009 02:37:07pm (WD date & time format)
   "ajaxdate@" ............... 16/4/2009 @          (clientraw.txt date format)
   "ajaxdate2" ............... 16/4/2009 @          (clientraw.txt date format)
   "ajaxdate" ................ 16/4/2009            (clientraw.txt date format)(new)
   "ajaxtime" ................ 02:37:07pm           (clientraw.txt time format)(new)

INDICATORS:
   "ajaxindicator" ........... flash indicator for HTTP fetch request (e.g. Updated)

DEBUG TAGS:
   "ajaxupdatecount" ......... number of updates so far
   "ajaxmaxupdatecount ....... maximum number of updates
   "ajaxState" ............... HTTP request state
   "ajaxStatus" .............. HTTP request status
   "ajaxProgress" ............ progress inside ajaxLoader


SUMMARY OF CLASS TAGS FOR UOM SWITCHING:
This is used for UOM switching where static values do not have an "ajaxtag".
NOTE: the value in the span must include the units-of-measure for them to be converted.
Example: <span class="convWind">8.2 mph</span>

   "convTemp" ................ for temperature placeholders (C, F)
   "convWind" ................ for wind speed  placeholders (kts, mph, km/h)
   "convBaro" ................ for pressure    placeholders (hPa, inHg)
   "convRain" ................ for rainfall    placeholders (mm, in)
   "convSnow" ................ for snow depth  placeholders (cm, in)
   "convDist" ................ for distances   placeholders (km, miles)
   "convAlti" ................ for altitudes   placeholders (m, ft)
   "convDate" ................ for date        placeholders (EURO, USA)
   "convTime" ................ for time        placeholders (EURO, USA)


SUMMARY OF GISMO ID TAGS:
Example: <span class="ajax" id="gizmotemp">77F</span>

TEMPERATURE (outdoor):
   "ajaxbigtemp" ............. current temperature - big (no decimal)
   "gizmotemp" ............... current temperature
   "gizmotemparrow" .......... rising/falling image
   "gizmotemprate" ...........

HUMIDITY:
   "gizmohumidity"  .......... current humidity

DEWPOINT:
   "gizmodew" ................ current dew point

PRESSURE / BARO:
   "gizmobaro" ............... current baro pressure
   "gizmobarotrendtext" ...... baro trend text (rising/steady/falling)

WIND:
   "gizmowind" ............... current wind speed
   "gizmogust" ............... current gust speed
   "gizmowindicon" ........... wind icon arrow direction image
   "gizmowinddir" ............ wind direction (name e.g. NNW)
   "gizmowinddeg" ............ wind direction in degrees (e.g. 338)

UV RATE:
   "gizmouv" ................. current UV level
   "gizmouvword" ............. None, Low, Medium, High, Very High, Extreme.

RAIN:
   "gizmorain" ............... rain total Today

CURRENT CONDITION ICON:
   "gizmocurrentcond" ........ current weather conditions

CLIENTRAW.TXT DATE & TIME: (the notes below use 16 Apr 2009 @ 14:37:07)
   "gizmodate" ............... 16/4/2009  (clientraw.txt date format)
   "gizmotime" ............... 02:37:07pm (clientraw.txt time format)

INDICATORS:
   "gizmoindicator" .......... flash indicator for HTTP fetch request (e.g. Updated)

If you have any additional requests please post your requirements on this forum and I'll see what I can do.
« Last Edit: September 29, 2012, 10:21:29 AM by Meerkat »
Cheers,
Rainer

Meerkat's Script Collection
Script download links always available on the first page of my threads

Offline Meerkat

  • Rainer
  • Posts: 703
  • VP2+, WD v10.37R b37, Win 7, ACER i5 4GB 64bit
  • Pretoria, South Africa
    • Bashewa
Re: Alternative ajaxWDwx.js Script v 9.05
« Reply #2 on: January 10, 2010, 03:48:58 PM »
Version 9.05 released.
It's now possible to have an external settings file which
should make upgrading to new versions easier.

A packed version of ajaxWDwx.js i.e ajaxWDwx-packed.js is also included in the latest release.
If you use the packed version you'll need to use ajaxWDwx-settings.js as well.

Also an ALERT has been added if the "clientraw.txt" file can not be found.

See the 1st post above for more modifications and additions.
« Last Edit: January 10, 2010, 04:02:14 PM by Meerkat »
Cheers,
Rainer

Meerkat's Script Collection
Script download links always available on the first page of my threads

Blackjack52

  • Guest
Re: Alternative ajaxWDwx.js Script v 9.05
« Reply #3 on: January 10, 2010, 08:10:07 PM »
I guess this would just require replacing the currently used True's js with yours, and after making the required settings adjustmnts, I would just have to reallign my own customizations that I made to the old js.

Offline Meerkat

  • Rainer
  • Posts: 703
  • VP2+, WD v10.37R b37, Win 7, ACER i5 4GB 64bit
  • Pretoria, South Africa
    • Bashewa
Re: Alternative ajaxWDwx.js Script v 9.05
« Reply #4 on: January 10, 2010, 08:18:20 PM »
I guess this would just require replacing the currently used True's js with yours, and after making the required settings adjustmnts, I would just have to reallign my own customizations that I made to the old js.

All the original tags are still there so you should have no problems.

All you have to do is set your location for clientraw.txt,
your graphic paths and pick your UOM to get started.

Afterwards you can play around with it.
Cheers,
Rainer

Meerkat's Script Collection
Script download links always available on the first page of my threads

Offline saratogaWX

  • Global Moderator
  • Posts: 5,713
  • Ken True
  • Saratoga, CA, USA 37:16:28N, 122:01:23W - Elev: 374ft.
    • Saratoga Weather
Re: Alternative ajaxWDwx.js Script v 9.05
« Reply #5 on: January 10, 2010, 08:41:26 PM »
Congratulations Rainer!!  This is a major leap forward in capability of the ajaxWDwx.js script -- thank you!!

I like your suggestion on version-number ranges, so I'll stick to the 2.xx range for mine.  Would you allow me to bundle your latest version with the 5 template sets?  I'd be pleased to do so :)

Best regards,
Ken
Ken True
Saratoga Weather
CWOP: CW1792
WeatherUnderground: KCASARAT1
Free weather website PHP scripts and WD website AJAX templates

Offline Meerkat

  • Rainer
  • Posts: 703
  • VP2+, WD v10.37R b37, Win 7, ACER i5 4GB 64bit
  • Pretoria, South Africa
    • Bashewa
Re: Alternative ajaxWDwx.js Script v 9.05
« Reply #6 on: January 10, 2010, 09:48:48 PM »
Congratulations Rainer!!  This is a major leap forward in capability of the ajaxWDwx.js script -- thank you!!

I like your suggestion on version-number ranges, so I'll stick to the 2.xx range for mine.  Would you allow me to bundle your latest version with the 5 template sets?  I'd be pleased to do so :)

Best regards,
Ken

Hi Ken,
You are more than welcome to do so.

I've tested this script on my end for the last 6-8 months and it works fine on my end.
However I don't know if there's going to be any hiccups with the script since I only
released it to the community this morning.

I guess I will have to wait until some more people take the plunge.

Forgot to say:
Please download the latest version ... I've added some more documentation to the script.
« Last Edit: January 10, 2010, 09:52:56 PM by Meerkat »
Cheers,
Rainer

Meerkat's Script Collection
Script download links always available on the first page of my threads

Offline BfdWx

  • Posts: 1,605
  • Branford Connecticut
    • Southern CT Weather
Re: Alternative ajaxWDwx.js Script v 9.05
« Reply #7 on: January 10, 2010, 10:01:16 PM »
Have it semi running, the webcam and forecast images are setup so far. All is well so far!

Offline i_fiorentino

  • Alessandro Bardi
  • Posts: 1,688
  • 150 mls Candeglia (Pt), Tuscany, Italy
    • Meteopistoia.it
Re: Alternative ajaxWDwx.js Script v 9.05
« Reply #8 on: January 10, 2010, 10:13:11 PM »
Hi guys,
i have ver. 3.00 of this file....could i install the new version without problem?
I've attached my ajaxWDwx.js file.
Many thanks,

Alessandro

P.S.
Welcome back Ken!

Offline Meerkat

  • Rainer
  • Posts: 703
  • VP2+, WD v10.37R b37, Win 7, ACER i5 4GB 64bit
  • Pretoria, South Africa
    • Bashewa
Re: Alternative ajaxWDwx.js Script v 9.05
« Reply #9 on: January 10, 2010, 10:19:41 PM »
Hi guys,
i have ver. 3.00 of this file....could i install the new version without problem?
I've attached my ajaxWDwx.js file.
Many thanks,

Alessandro
 back Ken!

Should not be a problem ... the Webster Weather modifications have been added to this script.
Cheers,
Rainer

Meerkat's Script Collection
Script download links always available on the first page of my threads

Offline i_fiorentino

  • Alessandro Bardi
  • Posts: 1,688
  • 150 mls Candeglia (Pt), Tuscany, Italy
    • Meteopistoia.it
Re: Alternative ajaxWDwx.js Script v 9.05
« Reply #10 on: January 10, 2010, 11:05:32 PM »
Hi Rainer,
could you explain me how to use new version of ajaxWDwx.js?
I've installed it but it seems to change nothing in my site.
I've seen that the new version has a lot of customization but i don't know how to use some/all of these.
Should i upload the ajaxWDwx-settings.js too?
Many thanks,

Alessandro

Offline Meerkat

  • Rainer
  • Posts: 703
  • VP2+, WD v10.37R b37, Win 7, ACER i5 4GB 64bit
  • Pretoria, South Africa
    • Bashewa
Re: Alternative ajaxWDwx.js Script v 9.05
« Reply #11 on: January 10, 2010, 11:15:00 PM »
Hi Rainer,
could you explain me how to use new version of ajaxWDwx.js?
I've installed it but it seems to change nothing in my site.
I've seen that the new version has a lot of customization but i don't know how to use some/all of these.
Should i upload the ajaxWDwx-settings.js too?
Many thanks,

Alessandro

Yes, I suggest you use "ajaxWDwx-settings.js" for your setup and then upload it to your server.
This will ensure  that you won't have to make changes to it again for the next upgrade.
However keep in mind that you also need to make the patch to "top.php" as suggested in the main post above.
I can''t help you other than that as only you would know where your files/graphics are.
Cheers,
Rainer

Meerkat's Script Collection
Script download links always available on the first page of my threads

Offline i_fiorentino

  • Alessandro Bardi
  • Posts: 1,688
  • 150 mls Candeglia (Pt), Tuscany, Italy
    • Meteopistoia.it
Re: Alternative ajaxWDwx.js Script v 9.05
« Reply #12 on: January 10, 2010, 11:32:10 PM »
Opssssss
I believe that i should change the link about my graphics images in "ajax-images".
The new version has a different folders about icons set used.
Is it ok?
Because, at this time, I don't have any icons in my ajax-dashboard: www.meteocarmignano.it
Thanks,

Alessandro


Offline Meerkat

  • Rainer
  • Posts: 703
  • VP2+, WD v10.37R b37, Win 7, ACER i5 4GB 64bit
  • Pretoria, South Africa
    • Bashewa
Re: Alternative ajaxWDwx.js Script v 9.05
« Reply #13 on: January 10, 2010, 11:39:29 PM »
Opssssss
I believe that i should change the link about my graphics images in "ajax-images".
The new version has a different folders about icons set used.
Is it ok?
Because, at this time, I don't have any icons in my ajax-dashboard: www.meteocarmignano.it
Thanks,

Alessandro

Alessandro,
You need to upload the "ajaxWDwx-settings.js" file to your server as you've included it in your "top.php".
It's not there at the moment. You need to make all the changes in this file.

HERE'S YOUR ICON SETUP: (I think it's this)
// 1: NWS icons (55x58)
wxIconSet1 =
   {src    : imgDir+"#PIC#.jpg" // where #PIC# = picname from table in useName
   ,width  : 55 ,height: 58 ,hspace: 0 ,vspace: 0 ,border: 0
   ,style  : ""  // eg. "border: 2px solid silver"
   ,align  : ""  // [ left | right | top | bottom | middle | texttop | absbottom | absmiddle ]
   ,useName: 1   // must be 1 for this icon set ... NWS icon nameing convention ... see ajax_getIconName1())
   };

Do not delete the #PIC" part as that later gets replaced by a icon name depending on the current condition icon required.

and set this to:
wxIconSet = wxIconSet1; // choose from an icon set above that you want to use.


« Last Edit: January 11, 2010, 12:02:11 AM by Meerkat »
Cheers,
Rainer

Meerkat's Script Collection
Script download links always available on the first page of my threads

Offline i_fiorentino

  • Alessandro Bardi
  • Posts: 1,688
  • 150 mls Candeglia (Pt), Tuscany, Italy
    • Meteopistoia.it
Re: Alternative ajaxWDwx.js Script v 9.05
« Reply #14 on: January 10, 2010, 11:58:01 PM »
Quote
You need to upload the "ajaxWDwx-settings.js" file to your server as you've included it in your "top.php".
It's not there at the moment. You need to make all the changes in this file.

I've just done.
I've set like this "var wxIconSet = wxIconSet1" but i've all images in "ajax-images/".
Unfortunately, there isn't any choise for that.
Do you believe that i come back to the previously version?
Best regards,

Alessandro


 

cumulus