From d25a0f6d7269d9ce66ecf28a19459e53f7bf4253 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Fri, 17 Jul 2015 16:57:58 +0200 Subject: [PATCH] make the icon using the image proxy --- curweather/curweather.php | 5 +++-- curweather/templates/widget.tpl | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/curweather/curweather.php b/curweather/curweather.php index 88eee9c97..59d7e3788 100644 --- a/curweather/curweather.php +++ b/curweather/curweather.php @@ -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'], diff --git a/curweather/templates/widget.tpl b/curweather/templates/widget.tpl index 9c6cacd3b..b893eef66 100644 --- a/curweather/templates/widget.tpl +++ b/curweather/templates/widget.tpl @@ -3,7 +3,7 @@

{{$title}}: {{$city}}

- +