--- NP_Weatherreport.php 2007-09-16 07:53:00.000000000 -0700 +++ NP_Weatherreport.php.new 2007-09-16 07:57:44.000000000 -0700 @@ -38,9 +38,9 @@ function install() { - $this->createOption('city_id','City ID number (search at http://xoap.weather.com/search/search?where=XXX)','text','NLXX0015'); - $this->createOption('city_name','Name of the city (leave empty to pick automaticly)','text','Rotterdam'); - $this->createOption('unit','Measure format','select','m' , 'Metric (Celcius)|m|Imperial (Fahrenheid)|c'); + $this->createBlogOption('city_name','Name of the city','text','Rotterdam'); + $this->createBlogOption('city_id','City ID number (search at http://xoap.weather.com/search/search?where=XXX)','text','NLXX0015'); + $this->createBlogOption('unit','Measure format','select','m' , 'Metric (Celcius)|m|Imperial (Fahrenheid)|c'); $this->createOption('icons_url','Root location or relative path of the icons (end with /)','text','http://www.ditnetwel.nl/weathericons/'); $this->createOption('icon_size','Icon size','select','128x128' , '128x128|128x128|64x64|64x64|32x32|32x32'); $this->createOption('extension','Icon extension','select','png' , 'PNG|png|GIF|gif'); @@ -108,9 +108,11 @@ { +global $blogid; + //Get the weather conditions echo "\n\n"; -$path = "http://xoap.weather.com/weather/local/".$this->getOption('city_id')."?cc=*&unit=".$this->getOption('unit'); +$path = "http://xoap.weather.com/weather/local/".$this->getBlogOption($blogid,'city_id')."?cc=*&unit=".$this->getBlogOption($blogid, 'unit'); $timeout = $this-> getOption('time_out'); ini_set (default_socket_timeout, $timeout); @@ -172,7 +174,7 @@ //City Name if ($this->getOption('show_cityname') == "yes") { - if ($this->getOption('city_name') <> '') { echo $this->getOption('city_name')."
\n"; } + if ($this->getBlogOption($blogid,'city_name') <> '') { echo $this->getBlogOption($blogid,'city_name')."
\n"; } else { echo $xml->loc->dnam."
\n"; } }