I did a bit of scripting to replace the Davis JAVA ticker with the ajaxticker JavaScript on the classic VantagePro Davis template and thought it would be useful for those still running the JAVA ticker (and want to change to JavaScript).
1) download the ajaxticker.js file from
here and upload it to your website.
2) Change the main .htx page in the WeatherLink Templates directory with the code
<applet CODE="davisticker.class" ...
</applet>
and replace it with
<script type="text/javascript">
var xmlfile="data.htm" //path to ticker txt file on your server.
//ajax_ticker(xmlfile, divId, divClass, delay, optionalfadeornot)
new ajax_ticker(xmlfile, "ajaxticker1", "ajax", [3500, 60000], "fade");
</script>
and before the
</head>
put
<style type="text/css">
/* CSS for demo ticker*/
#ajaxticker1 {
width: 300px;
height: 40px;
border: 2px ridge black;
padding: 5px;
background-color: #FEEEB8;
}
#ajaxticker1 div {
/*
IE6 bug fix when text is bold and fade effect (alpha filter) is enabled.
Style inner DIV with same color as outer DIV
*/
background-color: #FEEEB8;
}
.ajax { //class to apply to your scroller(s) if desired
}
</style>
<script src="ajaxticker.js" type="text/javascript">
/***********************************************
* Ajax Ticker script (txt file source)- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
</script>
and save the Template .htx file.
3) create a data.htx file in the Template directory and use
<div>
<div class="message">Updated: <!--date--> at <!--time--></div>
<div class="message">Temperature: <!--outsideTemp--> °F High: <!--hiOutsideTemp--> Low: <!--lowOutsideTemp--></div>
<div class="message">Humidity: <!--outsideHumidity-->% Dew Point: <!--outsideDewPt--> °F</div>
<div class="message">Wind from: <!--windDirection--> <!--windSpeed--> <!--windUnit--> Gust: <!--windHigh10--> <!--windUnit--></div>
<div class="message">Pressure: <!--barometer--><!--barUnit--> (<!--BarTrend-->)</div>
<div class="message">Rain today: <!--dailyRain--><!--rainUnit--> Rate: <!--rainRate--><!--rateUnit--> Storm: <!--stormRain--></div>
<div class="message">Forecast: <!--ForecastStr--></div>
</div>
as the contents for a 'current conditions' ticker, or use
<div>
<div class="message">This Month's Highs & Lows:</div>
<div class="message">Temperature High <!--hiMonthlyOutsideTemp-->°F Low <!--lowMonthlyOutsideTemp-->°F </div>
<div class="message">Humidity High <!--hiMonthlyHumidity--><!--humUnit--> Low <!--lowMonthlyHumidity--><!--humUnit--> </div>
<div class="message">Dewpoint High <!--hiMonthlyDewpoint-->°F Low <!--lowMonthlyDewpoint-->°F </div>
<div class="message">High Wind Speed <!--hiMonthlyWindSpeed--> <!--windUnit--></div>
<div class="message">Barometer High <!--hiMonthlyBarometer--> <!--barUnit--> Low <!--lowMonthlyBarometer--> <!--barUnit--> </div>
<div class="message">Low Wind Chill <!--lowMonthlyWindchill-->°F <br/>High Heat Index <!--hiMonthlyHeatindex-->°F</div>
<div class="message">High Rain Rate <!--hiMonthlyRainRate--> <!--rateUnit--> </div>
<div class="message">High UV <!--hiMonthlyUV--> <!--uvUnit--> <br/>High Solar Rad <!--hiMonthlySolarRad--> W/m<sup><small>2</small></sup></div>
<div class="message">This Year's Highs & Lows:</div>
<div class="message">Temperature High <!--hiYearlyOutsideTemp-->°F Low <!--lowYearlyOutsideTemp-->°F </div>
<div class="message">Humidity High <!--hiYearlyHumidity--><!--humUnit--> Low <!--lowYearlyHumidity--><!--humUnit--> </div>
<div class="message">Dewpoint High <!--hiYearlyDewpoint-->°F Low<!--lowYearlyDewpoint-->°F </div>
<div class="message">High Wind Speed <!--hiYearlyWindSpeed--> <!--windUnit--></div>
<div class="message">Barometer High <!--hiYearlyBarometer--> <!--barUnit--> Low <!--lowYearlyBarometer--> <!--barUnit--> </div>
<div class="message">Low Wind Chill <!--lowYearlyWindchill-->°F <br/>High Heat Index <!--hiYearlyHeatindex-->°F</div>
<div class="message">High Rain Rate <!--hiYearlyRainRate--> <!--rateUnit--> </div>
<div class="message">High UV <!--hiYearlyUV--> <!--uvUnit--> <br/>High Solar Rad <!--hiYearlySolarRad--> W/m<sup><small>2</small></sup></div>
<div class="message">Sunrise: <!--sunriseTime--> Sunset: <!--sunsetTime--></div>
</div>
for a display of Monthly and Yearly min/max (like the original template from Davis).
4) Use the internet settings on Weatherlink to process the data.htx template to data.htm on your website (1 minute intervals for current, or 5 minute intervals for the month/year/min/max).
That should do it.
Some caveats about using WeatherLink tags.. don't use <!--tempUnit--> or <!--solarUnit--> as WeatherLink will use characters that aren't compatible with the ajaxticker. If you look closely in the two data.htx templates, I'd substituted:
°F for <!--tempUnit-->
W/m<sup><small>2</small></sup> for <!--solarUnit-->
to prevent gripes by the JavaScript processing engine in your browser.
To add your own info (or mix/match), just make sure each entry is enclosed in
<div class="message"> ... </div>
and you can use other HTML like <br/>, <strong>, etc to style each display in the ticker.
Best regards,
Ken