Weather Icon in export output file

Discussion in 'Weather Watcher - Skins' started by mteuling, Nov 16, 2006.

  1. mteuling

    mteuling Member

    Joined:
    Nov 16, 2006
    Messages:
    9
    Likes Received:
    0
    Hello All,

    I have a little question , I use the export function ,so a html file is created ,is it possible to include a current weathericon in this file ?

    I add a line in the Export template (export tab) :see below
    but it will not display an Icon in the output HTML file ,but only an URL , Is this possible ? and if possible ,how to do it ?

    Thanks,

    Michel

    I use the latest version of weather Watcher.
    <HTML>
    Location: [Location]<BR />
    Condition: [Condition]<BR />
    Temperature: [Temp]<BR />
    Feels Like: [Feels]<BR />
    Dew Point: [Dew]<BR />
    Humidity: [Humidity]<BR />
    Wind: [Wind]<BR />
    Visibility: [Visibility]<BR />
    Barometer: [Barometer]<BR />
    UV Index: [UV]<BR />
    Sunrise: [Sunrise AMPM]<BR />
    Sunset: [Sunset AMPM]<BR />
    icon:[ICON]<BR/>
    <BR />
    [Updated]
    </HTML>
     
  2. Ed_P

    Ed_P Well-Known Member

    Joined:
    Aug 7, 2004
    Messages:
    2,248
    Likes Received:
    0
    :-s

    According to the WW Help file the [ICON] tag returns the URL of the weather.com's gif which is the same results as using the [MOON ICON], [HOURLY ICON], [DAILY ICON], etc tags. What you Export is all text, what you do with it is up to you. If you want to see the actual icon you will need to write actual HTML code to display it.

    Something like:
    Code:
    <HTML>
    Location: [Location]<BR />
    Condition: [Condition]<BR />
    Temperature: [Temp]<BR />
    Feels Like: [Feels]<BR />
    Dew Point: [Dew]<BR />
    Humidity: [Humidity]<BR />
    Wind: [Wind]<BR />
    Visibility: [Visibility]<BR />
    Barometer: [Barometer]<BR />
    UV Index: [UV]<BR />
    Sunrise: [Sunrise AMPM]<BR />
    Sunset: [Sunset AMPM]<BR />
    <IMG SRC="[ICON]" ALT="Thanks to EdP"><BR/>
    <BR />
    [Updated]
    </HTML>
    
    should work. :iconbiggrin:
     
  3. mteuling

    mteuling Member

    Joined:
    Nov 16, 2006
    Messages:
    9
    Likes Received:
    0
    Thanks a lot ED :thumbright:
    It works , This is wat I wanted, I should study some HTML someday


    kind regards
    Michel
    the Netherlands
     
  4. jeromy

    jeromy Well-Known Member

    Joined:
    Apr 9, 2005
    Messages:
    57
    Likes Received:
    0

    Haha.. Always trying to get your name out Ed. :iconbiggrin:
     
  5. mteuling

    mteuling Member

    Joined:
    Nov 16, 2006
    Messages:
    9
    Likes Received:
    0
    Hello All,

    This seems to work at first ,the Icon shows, but only if someone has the icons local on their PC ,(I'm uploading the output file to my webpage you see) if you ask for the properties for the Icon in the output html file it says: "file:///C:/Program%20Files/Weather%20Watcher/Skins/Icons/Classic/33.gif"

    but the moon icon for example says :http://image.weather.com/web/common/moonicons/52/6.gif" and this icon shows on the webpage.

    So the question is ,how come those two things show different file paths?
    should that not be something like "http://image.weather.com/web/common/wxicons/52/12.gif"

    for clearity here is what i've in the template :

    <HTML>
    Location: [Location]<BR />
    Condition: [Condition]<BR />
    <IMG SRC="[ICON]" ALT="Thanks to EdP"><BR/>
    Temperature: [Temp]<BR />
    Feels Like: [Feels]<BR />
    Dew Point: [Dew]<BR />
    Humidity: [Humidity]<BR />
    Wind: [WIND FULL]<BR />
    Visibility: [Visibility]<BR />
    Barometer: [Barometer]<BR />
    UV Index: [UV]<BR />
    Sunrise: [Sunrise AMPM]<BR />
    Sunset: [Sunset AMPM]<BR />
    Moonphase:[MOON]<BR />
    <IMG SRC="[MOON ICON]"ALT="Thanks to EdP"><BR/>
    <BR />
    [Updated]
    </HTML>

    I hope someone Knows a solution for this

    Regards,

    Michel
    the Netherlands
     
  6. Ed_P

    Ed_P Well-Known Member

    Joined:
    Aug 7, 2004
    Messages:
    2,248
    Likes Received:
    0
    I don't have a Classics icon folder in my Weather Watcher Icon's folder and when I have my WW FOREcast icons set to Classic my export shows:

    Code:
    <IMG SRC="http://image.weather.com/web/common/wxicons/52/27.gif" ALT="Thanks to EdP"><BR/>
    Rename your Classics icon folder to be something else, Michels would be a good name. :icon_smile:
     
  7. mteuling

    mteuling Member

    Joined:
    Nov 16, 2006
    Messages:
    9
    Likes Received:
    0
    Hi ,

    Well it seems that the Icon tag returns the wrong code, it returns a local path and not a path to image.weather.com ,
    I renamed the classic icon folder just as you said , but I've got this:
    (part of the export file code)
    <HTML>
    Location: Dordrecht, Netherlands<BR />
    Condition: Fair<BR />
    <IMG SRC="C:\Program Files\Weather Watcher/Skins/Icons/michels/34.gif" ALT="Thanks to EdP"><BR/>
    Temperature: 8,9?C<BR />



    I use WW version 5.6.16
    Moon icon works fine .

    I hope there is a solution for this

    Regards,

    Michel
    the Netherlands
     
  8. Ed_P

    Ed_P Well-Known Member

    Joined:
    Aug 7, 2004
    Messages:
    2,248
    Likes Received:
    0
    :shock:

    Change your forecast icons to something other than Michels. Try SFGate. Click Apply and OK. Verify that the WW window shows the new icons. Remove the Michels icons folder from the Skins\Icons folder and make sure there is no Classic folder in the Skins\Icons folder also. Close down WW and then restart it. Make sure your WW window is showing the new icons. Now change the Forecast icons to the Classic option. Click on Apply and OK. Then do an Update.

    What does the Export file look like now?
     
  9. mteuling

    mteuling Member

    Joined:
    Nov 16, 2006
    Messages:
    9
    Likes Received:
    0
    Hi EdP,

    Did what you said ,but no, still a local path in the output file, also tried a clean install first, but nothing seems to help.

    Michel
     
  10. mteuling

    mteuling Member

    Joined:
    Nov 16, 2006
    Messages:
    9
    Likes Received:
    0
    Hello,
    I think I've found the problem :icon_smile:

    I just deinstalled version 5.6.16 and removed every trace from the registry, then installed version 5.6.14 tested this ,and everything works fine, then updated to version 5.6.15 tested and worked fine also , then updated to 5.6.16 tested and it didn't work ,I've got a local path , so I think it's the latest version ,the Icon tag generate al localpath instead of the weather.com path , so I'm on version 6.5.15 for now.

    maby this little thing can be fixed in the next version . ;-)

    regards ,

    Michel
     
  11. msinger

    msinger Administrator
    Staff Member

    Joined:
    Nov 6, 2002
    Messages:
    4,668
    Likes Received:
    0
    Unfortunately, it's not something that can be fixed. All of the icons are stored locally.

    If you're a Javascript whiz, you should be able to replace that path with the URL :cool:
     
  12. Ed_P

    Ed_P Well-Known Member

    Joined:
    Aug 7, 2004
    Messages:
    2,248
    Likes Received:
    0
    :shock: Why??? The Classics were not a part of the earlier versions of WW, something about copyrighted images. :-s So what changed?

    @mteuling

    I apologize for misleading you mteuling. I haven't upgraded my desktop machine to 5.6.16 yet and thus was not seeing your problem. I just checked my nb which does have 5.6.16 and the Classic icons are indeed included in the Skins\Icons folder. Apparently the WW Template Codes help is outdated.
    Code:
    [ICON] = http://image.weather.com/web/common/wxicons/52/26.gif	
    Your solution to the problem appears to be the best one.
     
  13. Ed_P

    Ed_P Well-Known Member

    Joined:
    Aug 7, 2004
    Messages:
    2,248
    Likes Received:
    0
    Alright mteuling, replace the original line I gave you with this one.
    Code:
    <SCRIPT LANGUAGE="JavaScript">var WWicon ="[ICON]";WWicon = WWicon.substr(WWicon.length-6,6);if (WWicon.substr(1,1) == "/") WWicon = WWicon.substr(2,5);TWCicon="http://image.weather.com/web/common/wxicons/52/"+WWicon;document.write("<IMG SRC='"+TWCicon+"' ALT='Wow EdP!!'>");</script><BR/>
    
    Sorry I didn't see the problem earlier.

    BTW I wrote this as all ONE line, forum wrapping may impact it's presentation and what you add to your Export template. You may want to cut & paste it into Notepad to unwrap it before updating your Export template.

    (Not everything that gets changed is documented in the RSS feeds.)
     
  14. mteuling

    mteuling Member

    Joined:
    Nov 16, 2006
    Messages:
    9
    Likes Received:
    0
    Thanks EdP, :eek:
    Looks impressive
    I'll test it tonight, and let you know I'm at work right now .

    regards ,

    Michel
     
  15. Ed_P

    Ed_P Well-Known Member

    Joined:
    Aug 7, 2004
    Messages:
    2,248
    Likes Received:
    0
    Michel, please note, that it will result in a TWC weather.com icon being displayed regardless of which Forecast icons you select for your WW forecast window. ;-)
     
  16. mteuling

    mteuling Member

    Joined:
    Nov 16, 2006
    Messages:
    9
    Likes Received:
    0
    Hello EdP,

    I just tested the code, and it works very well :thumbright: ,

    thanks a lot for solving this ,

    regards ,

    Michel
    the Netherlands
     
  17. Ed_P

    Ed_P Well-Known Member

    Joined:
    Aug 7, 2004
    Messages:
    2,248
    Likes Received:
    0
    I'm glad to hear that worked for you mteuling. Try this code and see if you like the results any better. :icon_smile:

    Code:
    <!-- saved from url=(0031)http://www.singerscreations.com -->
    <HTML>
    <TITLE>The Weather</TITLE>
    <B>Location:</B> [Location]<BR />
    <B>Condition:</B> [Condition]<BR />
    <B>Temperature:</B> [Temp]<BR />
    <B>Feels Like:</B> [Feels]<BR />
    <B>Dew Point:</B> [Dew]<BR />
    <B>Humidity:</B> [Humidity]<BR />
    <B>Wind:</B> [Wind]<BR />
    <B>Visibility:</B> [Visibility]<BR />
    <B>Barometer:</B> [Barometer]<BR />
    <B>UV Index:</B> [UV]<BR />
    <B>Sunrise:</B> [Sunrise AMPM]<BR />
    <B>Sunset:</B> [Sunset AMPM]<BR />
    <!IMG SRC="[ICON]"><SCRIPT LANGUAGE="JavaScript">var WWicon ="[ICON]";WWicon = WWicon.substr(WWicon.length-6,6);if (WWicon.substr(1,1) == "/") WWicon = WWicon.substr(2,5);TWCicon="http://image.weather.com/web/common/wxicons/52/"+WWicon;document.write("<IMG SRC='"+TWCicon+"'>");</script><BR />
    <BR />
    <FONT SIZE=-1>[Updated]</FONT>
    </HTML>
    Replace the whole Export template code with this. To be safe, use the mouse to highlight all the template code you are currently using then with the mouse on the highlighted text right click and choose Copy. Create a text document someplace that you will remember and Paste the copied code into it and Save it. Thus if you don't like the new template you can restore to what you have.
     
  18. mteuling

    mteuling Member

    Joined:
    Nov 16, 2006
    Messages:
    9
    Likes Received:
    0
    Hi Ed,

    YES! :iconbiggrin: definitely looks nicer wiyh the bold font on the left and the smaller font below ,

    BTW , there is a way to get your own custom icons to display in the output file, If you have some webspace , you can copy an icon folder over there , and then replace the weather.com URL (in the template code) with your own URL, should work !

    thank and regards,

    Michel,
    the Netherlands
     
  19. Ed_P

    Ed_P Well-Known Member

    Joined:
    Aug 7, 2004
    Messages:
    2,248
    Likes Received:
    0
    mteuling, you might like the template I posted here:

    http://www.singerscreations.com/forum/v ... 12&start=4

    And you can still replace the weather.com URL with a personalized one including the address of the folder of WW icons on your home LAN (ie \\Home Desktop\Weather Watcher\Skins\Icons\Weather Network\). Or any weather related URL icon folder, so long as it supports the weather.com icon naming convention, 0.gif - 48.gif plus -.gif.