Request to mod GetWeather plugin (10 posts)

  1. martinez
    Posted 9 years ago #

    I use this nifty plugin to show the local weather and time on my travel blog. The local time however is being submitted in "4:34 PM" format whereas I would like it to be displayed in 24h "16:34" format, which would require a little clever string replacement coding, I guess. The original developer at http://jrm.cc/ has no contact information, so I can't really bug the original author. Can't say I'm up for the challenge myself, but I was hoping someone else had the skills..

    Example XML from weather.com..

    ..being parsed by getweather.php:

    Help would be greatly apprecieted since most of my friends in Europe get confused over the whole AM/PM thing (btw, what does it stand for?)

    Cheers, Martin

  2. jwurster
    Posted 9 years ago #

    Looks like no one responded to you. First of all AM means any time between 12:01 midnight and 12:00 noon. PM is the rest of the time. Do you still need help? I was getting ready to look at modifying the plugin to display the temperature in both F and C.

  3. seanrox
    Posted 9 years ago #

    Try this plugin out:


    works really nice and does everything you want. I recommend using the beta 3 version. It works really nice.

  4. ladydelaluna
    Posted 9 years ago #

    i agree with seanrox - however use caution - that plugin makes your site not valid HTML - some people are concerned about that

  5. maerk
    Posted 9 years ago #

    AM = Ante Meridiem
    PM = Post Meridiem

    Ante means before (as in words like ante-natal or anterior), post means after. Meridiem means midday!


  6. jwurster
    Posted 9 years ago #

    I've modified the GetWeather plugin to display 24-hour time by setting a new variable. And I also added the display of temperatures in both F and C degrees. If anyone is interested, please let me know.

    WeatherIcon looks really good, but seemed to be overkill for my needs.

  7. seanrox
    Posted 9 years ago #

    ladydelaluna: with a couple of small changes to source files, I was able to get it to validate 100%. I've sent the code to the plugin creator so maybe it will get added into the final release.

  8. however use caution - that plugin makes your site not valid HTML - some people are concerned about that

    Huh? My site has always been valid XHTML and I've been using WeatherIcon it for like... ever. ;)

    I think the problem is just the configuration you're using (i.e. you can't have it output in <li>'s if you don't wrap it in some <ul>'s).

  9. ladydelaluna
    Posted 9 years ago #

    I put the code on it just like you had it in the readme or wherever, VB... I took it out because it instantly made my site invalid... :(

  10. Well I'm sorry, but then you obviously didn't 'cause this should make valid code (copied from the v2.x readme):

    <?php WeatherIcon('station=KLFK&before=<li>&after=</li>'); ?>

    I take making valid code very seriously:



Topic Closed

This topic has been closed to new replies.

About this Topic