]> git.mxchange.org Git - friendica-addons.git/commitdiff
make the icon using the image proxy
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Fri, 17 Jul 2015 14:57:58 +0000 (16:57 +0200)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Fri, 17 Jul 2015 14:57:58 +0000 (16:57 +0200)
curweather/curweather.php
curweather/templates/widget.tpl

index 88eee9c9713acccfd6f0ec32836517d2164aec2f..59d7e37886118caad7ea1f7d430f390225d53872 100644 (file)
@@ -10,7 +10,8 @@
  */
 
 require_once('include/network.php');
-include_once('include/text.php');
+require_once("mod/proxy.php");
+require_once('include/text.php');
 
 //  get the weather data from OpenWeatherMap
 function getWeather( $loc, $units='metric', $lang='en', $appid='', $cachetime=0) {
@@ -108,7 +109,7 @@ function curweather_network_mod_init(&$fk_app,&$b) {
        $t = get_markup_template("widget.tpl", "addon/curweather/" );
        $curweather = replace_macros ($t, array(
            '$title' => t("Current Weather"),
-           '$icon' => $res['icon'],
+           '$icon' => proxy_url('http://openweathermap.org/img/w/'.$res['icon'].'.png'),
            '$city' => $res['city'],
            '$lon' => $res['lon'],
            '$lat' => $res['lat'],
index 9c6cacd3bf6134ca7288aa64e99d43f15f3d63d0..b893eef666a42f04fe4add6687066d897757c2f9 100644 (file)
@@ -3,7 +3,7 @@
                <h4 title="{{$lastupdate}}">{{$title}}: {{$city}}</h4>
        </div>
        <p>
-       <img src="http://openweathermap.org/img/w/{{$icon}}.png" title="{{$description}}">
+       <img src="{{$icon}}" title="{{$description}}">
        <ul class="curweather-details">
            <li><strong>{{$temp}}</strong></li>
            <li>{{$relhumidity['caption']}}: {{$relhumidity['val']}}</li>