WXforum.net

Web Weather => Weather Web Resources => Topic started by: WeatherBeacon on August 04, 2007, 08:47:14 PM

Title: Anole's Weather Graphic $winds
Post by: WeatherBeacon 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...
Title: Re: Anole's Weather Graphic $winds
Post by: saratogaWX 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
Title: Re: Anole's Weather Graphic $winds
Post by: WeatherBeacon on August 05, 2007, 02:47:57 PM
As always, thanks a lot, Ken! That did it! \:D/

Regards,

Kevin...