• Resolved eldenroot

    (@eldenroot)


    1) Please could you tell me how to add wind direction next to the picture after the speed?

    you know now we have:

    picture of wind speed of wind and then I would like to show direction (N,W, NW, etc)

    2) I would like to add some space before the weather radar, or <hr> – where to add this? Thank you

    http://wordpress.org/plugins/wp-forecast/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author tuxlog

    (@tuxlog)

    you can change all this in wp-forecast-show.php around line 300

    Thread Starter eldenroot

    (@eldenroot)

    could you help me what to add to show wind direction? rest I can make it by myself…

    example:
    radar …….. speed of wind (2m/s), NW (wind direction)

    Plugin Author tuxlog

    (@tuxlog)

    try
    `$a=wp_forecast_data(“A”); // gets the data for widget A in array $a
    print_r($a); // print out all data’
    you will get all available data fields

    You get the wind direction using $a['winddir']

    Thread Starter eldenroot

    (@eldenroot)

    OK, I am working on this… I hope it will be working 😀

    Thread Starter eldenroot

    (@eldenroot)

    // show wind on the right side if windicon is active
    		if ($windicon == "1")
    			$out .= '<div class="wp-forecast-wind-right">' . $w['windspeed']$a
    
    ['winddir']."</div>\n";

    is is correct or am I missing something?

    EDIT: Ok, it is not working… I will look at this when I come home… if you could write me it it would be better

    Plugin Author tuxlog

    (@tuxlog)

    $out.=$w[‘winddir’].”</div>\n”;
    would be better

    Thread Starter eldenroot

    (@eldenroot)

    OK, it shows wind direction but it doubled the image in widget (double wind radar and icon of weather)… I am lost a little 😀

    Thread Starter eldenroot

    (@eldenroot)

    OK, after 1 hour of cahnging code – no success… help is welcome, thanks 🙂

    Plugin Author tuxlog

    (@tuxlog)

    It would be great if you can give the code you have tried and what does not work. I think my code works. Do you know php?

    Thread Starter eldenroot

    (@eldenroot)

    I know php a little bit… it is not my daily work but I can make it.

    You code was OK, but it doubled my icons in widget… it would be better if you can post we a whole code or entire the line in code

    thank you or your help

    Plugin Author tuxlog

    (@tuxlog)

    Well, I think

    // show wind on the right side if windicon is active
    
    if ($windicon == "1")
    $out .= '<div class="wp-forecast-wind-right">' . $w['windspeed'] . " " . $w['winddir']."</div>\n";

    would be better I think.

    works?

    Thread Starter eldenroot

    (@eldenroot)

    Thank you very much – it is working, I just added “,” between wind speed and winddirection 😉

    Thank you!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Wind direction – style’ is closed to new replies.