Serwis wykorzystuje pliki cookies. Korzystajc z forum wyraasz zgod na uywanie cookies. Wicej informacji w regulaminie.
StacjePogody.waw.pl

Autor Wątek: Widget YoWindows na własnej stronie.  (Przeczytany 4190 razy)

Offline blacha_mc

  • Cirrocumulus
  • **
  • Wiadomości: 58
  • Otrzymał podziękowań: 4
  • Płeć: Mężczyzna
  • Typ stacji: ws-0101usb
Widget YoWindows na własnej stronie.
« dnia: 19 Lipca, 2013, 16:52:24 »
Czy może ktoś krok po kroku przedstawić jak zrobić aby na stronie wyświetlał się mój własny krajobraz.
Postępuję wg opisu ze strony YoWindows:
Cytuj
Make sure you can open the landscape in YoWindow.

Upload the landscape folder to your web-server.

Upload your files carefully to avoid errors.

WARNING: make sure that image file(s) are transferred in binary FTP mode.

WARNING: file names are case sensitive on the server usually.
If the image is referred in .ywl file as LondoN.PNG, make sure its file name is LondoN.PNG, but NOT LONDON.PNG or london.png.
Otherwise the image will not be found by YoWindow widget.

Put a special crossdomain.xml file in your server ROOT directory.
crossdomain.xml is used on the web to allow outside web-servers to connect to your server. You need this file to open an access to yowindow.com web-server, to let the widget load your landscape.

This is the most simple crossdomain.xml file required to open an access for yowindow.com.

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" secure="true"/>
</cross-domain-policy>

To download this file you have to click with right mouse button on the following link and choose "Save Target As".
Only this way, otherwise you may occasionally save the file in a wrong format.
crossdomain.xml.

WARNING: YoWindow will NOT be able to load your landscape if crossdomain.xml is missing or wrong.

YoWindow weather widget is a Flash application.
For security reasons Flash can download data from another server only if the server has a special crossdomain.xml file placed in the root directory.
You may read this Adobe article on the subject if you want to know the technical details.
http://kb2.adobe.com/cps/142/tn_14213.html


Put crossdomain.xml in the root directory on your server.
ROOT directory ONLY, NOT any other one.
For example, http://microsoft.com/crossdomain.xml

Modify your widget HTML code.
Set "landscape" variable to the URL of your landscape.ywl file on your server.

Example:
<param name="flashvars"
value="location_id=360630&amp;landscape=http://myserver.com/landscapes/london/london.ywl"/>
By the way, you may display landscapes from any URL on the Internet.
If you like, you may test one of our landscapes in your widget, set "landscape" variable to this URL. http://landscape.yowindow.com/landscapes/colosseum/colosseum.ywl

By this time you should have the widget up and running.
However, most visitors of your page will have to wait up to to a minute for the landscape to load.Because the landscape file is very large.
Please follow the last section of this tutorial to solve this problem and make your widget perfect!

i dalej mam wioskę na stronie zamiast własnego krajobrazu.
Nawet nie wioskę, z reszta zobaczcie sami:www.pogodawpulawach.cba.pl
Oto kod widgetu:
<center>
<div style="width:750px; height:300px;">
    <object type="application/x-shockwave-flash" data="http://swf.yowindow.com/yowidget3.swf" width="750" height="300">
    <param name="movie" value="http://swf.yowindow.com/yowidget3.swf"/>
    <param name="allowfullscreen" value="true"/>
    <param name="wmode" value="opaque"/>
    <param name="bgcolor" value="#FFFFFF"/>
    <param name="flashvars"
    value="location_id=760924&amp;landscape=http://pogodawpulawach.cba.pl/landscapes/Lato/Lato.ywl&amp;current_weather_url=http://pogodawpulawach.cba.pl/yowindow.xml&amp;location_name=Pu%C5%82awy&amp;time_format=24&amp;unit_system=metric&amp;lang=pl&amp;background=#FFFFFF&amp;copyright_bar=false"/>
        <a href="http://WeatherScreenSaver.com?client=widget&amp;link=copyright"
        style="width:750px;height:300px;display: block;text-indent: -50000px;font-size: 0px;background:#DDF url(http://yowindow.com/img/logo.png) no-repeat scroll 50% 50%;"
        >Widget Pogodowy</a>
    </object>
</div>
<div style="width: 750px; height: 15px; font-size: 14px; font-family: Arial,Helvetica,sans-serif;">
<span style="float:left;"><a target="_top" href="http://WeatherScreenSaver.com?client=widget&amp;link=copyright" style="color: #2fa900; font-weight:bold; text-decoration:none;" title="Widget Pogodowy">YoWindow.com</a></span>
<span style="float:right; color:#888888;">Forecast by&nbsp;<a href="http://yr.no" style="color: #2fa900; text-decoration:none;">yr.no</a></span>
</div>
</center>
W aplikacji krajobraz jest.
« Ostatnia zmiana: 19 Lipca, 2013, 17:03:47 wysłana przez blacha_mc »
www.pogodawpulawach.cba.pl -strona mojej stacji

https://www.facebook.com/NOAAPulawy -zdjęcia z satelitów NOAA

Forum Użytkowników Stacji Pogodowych

Widget YoWindows na własnej stronie.
« dnia: 19 Lipca, 2013, 16:52:24 »

Offline snow0010

  • Cirrocumulus
  • **
  • Wiadomości: 31
  • Otrzymał podziękowań: 0
  • Typ stacji: WH1090
Odp: Widget YoWindows na własnej stronie.
« Odpowiedź #1 dnia: 24 Lipca, 2013, 22:52:35 »
Podsyłam linię kodu jaka u mnie zadziałała i mam zmienione tło na własne. value="location_id=3098924&amp;landscape=http://www.adres_strony.pl/landscapes/golubie/widok.ywl&amp;current_weather_url=http://adres_stronypl/yowindow.xml&amp;location_name=Go%C5%82ubie&amp;time_format=24&amp;unit_system=metric&amp;lang=pl&amp;background=#FFFFFF&amp;copyright_bar=false"

Pozdrawiam
gołubie-pogoda.kaszuby.pl