Viewing 15 replies - 76 through 90 (of 207 total)
  • Nevermind, I got it…I changed the function in weather.php to:
    function show_wp_weather($station=”,$location=”) {
    and then changed the index.php to:
    <?php show_wp_weather($station = ‘KNKX’, $location=’la jolla, ca’); ?>
    Thanks for your help Beel!!

    Maybe I am confused, I thought you wanted to show the weather for two different locations.

    I did want two different locations, I just didn’t post the rest of the code. ??
    <?php show_wp_weather($station = ‘KNKX’, $location=’la jolla, ca’); ?>
    <?php show_wp_weather($station = ‘KSJC’, $location=’san jose, ca’); ?>
    here it is in action:
    https://scvcstar.host.sk/wp/index.php

    I did have my-hacks.php enabled. What else could I be doing wrong?

    About now a link to view the error might be helpful. If you have weather.php included in my-hacks.php and my-hacks support is enable in WP, you should not be getting a function error with the simple call “show_wp_weather()”

    Okay, apparently IE doesn’t display the transparent .png images like other browsers. Does anyone know a source to get different weather images, either in .gif or .jpg extensions?
    -Daisyhead

    Okay this is a cool hack, except when the weather server goes down and your page takes a minute to load.
    Also make sure these lines are set up properly so when it does go down so your menu is not screwed up:
    if ($metar==''||$metar==false||$metar==null||($wxInfo['TEMP_C']==''&&$wxInfo['TEMP_F']==''))
    {
    $weather = $weather . "<li id='weather'>"._NOTAVAILABLE."

    ";
    Note yours may differ from “

    ” depending on your menu structure.
    I am looking into making transparent gifs or jpegs.. Will let you know in a few.

    Yup I can make transparent gifs from the original pngs. If you can wait a couple of days I will have them done.

    Just get the new myweather that the hack is based on, it has all new gifs (better looking than the png’s, too).

    I have uploaded the weather hack and I must say it is pretty spiffy. I am having trouble displaying the temperature. I guess it is a degrees character that is harfing. It shows as a reverse-image question mark. But the degrees show up right on the Heat Index. Hmm… I changed the encoding, and also in my browser. Maybe there is something you can change?

    david, if you could make some transparent gif’s, that’d be awesome. let us know when you have em ready
    -jon

    You can check out the transparent gifs from myWeather on my site, no sense in spending time converting if you don’t have to.

    After searching the internet for ways to fix transparent pngs in IE, I managed to use javascript to get it to work. Here’s how: https://homepage.ntlworld.com/bobosola/
    And to see it working: https://snurl.com/wordp

    Thread Starter jeremiah

    (@jeremiah)

    Anyone interested in testing this as a plugin?
    I’ve got it working here, but I have a history of forgetting pieces.. lol
    Link in a moment…

    Sure, I haven’t gotten around to converting it myself – might save me some time. In the meantime, I have some links to some transparent gifs (they won’t stay there so get ’em while they are hot):
    https://www.billhayes.us/wordpress/wp-weather/blackbg.zip
    https://www.billhayes.us/wordpress/wp-weather/small.zip

Viewing 15 replies - 76 through 90 (of 207 total)
  • The topic ‘Weather Hack’ is closed to new replies.