Author Topic: Anole's Weather Graphic $winds  (Read 3016 times)

0 Members and 1 Guest are viewing this topic.

Offline WeatherBeacon

  • Chief
  • Forecaster
  • *****
  • Posts: 1369
    • http://www.wxbeacon.com
Anole's Weather Graphic $winds
« on: August 04, 2007, 08:47:14 PM »
Hi, folks!

A question about anole's weather graphic. (I use version 5.x.)

I have had the 500x80 banner_big working for several months (see sig below). When I have a wind, the command:

  imagecenteredtext(436, 42, "$winds", 5, 10, $color3, 0);

displays, for example, NW @ 3 mph on banner_big.

I decided to create another graphic using the default 150x150 graphic (I think it's called "default" in the new release?). However, instead of displaying, for example, NW @ 3 mph, it just displays NW @ 3 (no mph). Just inserting mph as text doesn't work, because then when there's no breeze, it displays Calm mph.

I'm stymied. Anyone know what I need to do?

Thanks!

Regards,

Kevin...
« Last Edit: May 07, 2008, 10:53:20 PM by WeatherBeacon »
Mae govannen!
Kevin  (Member AMS) http://www.wxbeacon.com               Genesee County, Michigan
Hardware:  Davis Vantage Pro Wireless, Midland WR-300
Software: VWS 14.01p43, WeatherFlash, & GRLevel3

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9277
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Anole's Weather Graphic $winds
« Reply #1 on: August 05, 2007, 12:25:30 AM »
Kevin,
The code you want is in 'sticker.php' (for V5.x)
Code: [Select]
 case (($wind > 0) and (empty($_REQUEST["type"]))):
    $winds = "$winddir @ $wind";
  break;


change to
Code: [Select]
 case (($wind > 0) and (empty($_REQUEST["type"]))):
    $winds = "$winddir @ $wind$wind_units";
  break;


and the mph will appear, and disappear when 'Calm'.

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 WeatherBeacon

  • Chief
  • Forecaster
  • *****
  • Posts: 1369
    • http://www.wxbeacon.com
Re: Anole's Weather Graphic $winds
« Reply #2 on: August 05, 2007, 02:47:57 PM »
As always, thanks a lot, Ken! That did it! \:D/

Regards,

Kevin...
Mae govannen!
Kevin  (Member AMS) http://www.wxbeacon.com               Genesee County, Michigan
Hardware:  Davis Vantage Pro Wireless, Midland WR-300
Software: VWS 14.01p43, WeatherFlash, & GRLevel3

 

anything