make the icon using the image proxy

pull/281/head
Tobias Diekershoff 2015-07-17 16:57:58 +02:00
parent 7c6ae901d9
commit d25a0f6d72
2 changed files with 4 additions and 3 deletions

View 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'],

View 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>