Author Topic: Davis ticker - not displaying  (Read 11974 times)

0 Members and 1 Guest are viewing this topic.

Offline cappelen

  • Member
  • *
  • Posts: 33
    • Laughlin, NV
Davis ticker - not displaying
« on: June 05, 2015, 01:28:19 PM »
The Davis ticker is not displaying and I am a loss of why not.
http://www.ponderosaca.com/LIVE-wx/wx.html
Any help is appreciated.
Carl,

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Davis ticker - not displaying
« Reply #1 on: June 05, 2015, 01:40:05 PM »
The Davis ticker JAVA app should probably be replaced with a JavaScript instead .. multiple browser no longer enable JAVA by default, and for security reasons, that's a good idea.

That means most of your website viewers will likely not have JAVA enabled, so the old ticker would not work.

Something like http://www.dynamicdrive.com/dynamicindex2/ajaxticker.htm could be a replacement for the Davis Ticker.

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Davis ticker - not displaying
« Reply #2 on: June 06, 2015, 01:52:59 PM »
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
Code: [Select]
<applet CODE="davisticker.class" ...

</applet>
and replace it with
Code: [Select]
<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
Code: [Select]
</head> put
Code: [Select]
<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
Code: [Select]
<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
Code: [Select]
<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:

&#176;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
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline cappelen

  • Member
  • *
  • Posts: 33
    • Laughlin, NV
Re: Davis ticker - not displaying - fixed
« Reply #3 on: June 06, 2015, 08:07:50 PM »
Ken,

Many thanks, this is working just great.

Carl,

Online chief-david

  • Educational Weather
  • Forecaster
  • *****
  • Posts: 2845
  • Space Academy for Educators
    • Benilde-St. Margaret's Weather
Re: Davis ticker - not displaying
« Reply #4 on: June 06, 2015, 09:14:11 PM »
I just completely axed my java ticker. Decided there was no use to it.

Our gradebook will dump its java version July 1.

I worry that flash will go away soon too- that would be the end of Weather Display live

I had to start using Puffin browser on my phone because of the flash/Android issue.



You can't phase me-I teach Middle School.
It's not you-It's WU.