CVS: phpweather/output pw_images.php,1.1,1.2
Brought to you by:
iridium
From: Martin G. <gim...@us...> - 2002-03-18 16:20:02
|
Update of /cvsroot/phpweather/phpweather/output In directory usw-pr-cvs1:/tmp/cvs-serv24830/output Modified Files: pw_images.php Log Message: There has to be a way to specify the path of the icons relative to the document that uses pw_images to display them. Index: pw_images.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/output/pw_images.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- pw_images.php 17 Mar 2002 13:39:04 -0000 1.1 +++ pw_images.php 18 Mar 2002 16:19:59 -0000 1.2 @@ -347,9 +347,11 @@ // The correct image can be selected from the array. if (($night == 1) || ($this->itime == 'nite')) { - return 'icons/' . $this->n_images[$phenomena_group][$maxcoverage]; + return $this->properties['icons_path'] . + $this->n_images[$phenomena_group][$maxcoverage]; } else { - return 'icons/' . $this->images[$phenomena_group][$maxcoverage]; + return $this->properties['icons_path'] . + $this->images[$phenomena_group][$maxcoverage]; } } @@ -372,14 +374,15 @@ if (!empty($processed_metar_data['wind'])) { $wind = $processed_metar_data['wind']; if ($wind['deg'] == 'VRB') { - return 'icons/' . $this->wind_vrb_image; + return $this->properties['icons_path'] . $this->wind_vrb_image; } elseif (($wind['deg'] == 0) && ($wind['knots'] == 0)) { - return 'icons/' . $this->wind_nodir_image; + return $this->properties['icons_path'] . $this->wind_nodir_image; } else { - return 'icons/' . $this->wind_dir_images[round($wind['deg']/22.5)]; + return $this->properties['icons_path'] . + $this->wind_dir_images[round($wind['deg']/22.5)]; } } else { - return 'icons/' . $this->wind_nodata_image; + return $this->properties['icons_path'] . $this->wind_nodata_image; } } // ------------------------------------------------------------------------ @@ -400,12 +403,12 @@ if (!empty($processed_metar_data['temperature'])) { if ($processed_metar_data['temperature']['temp_c'] > 0) { - return 'icons/' . $this->temp_high_image; + return $this->properties['icons_path'] . $this->temp_high_image; } else { - return 'icons/' . $this->temp_low_image; + return $this->properties['icons_path'] . $this->temp_low_image; } } else { - return 'icons/' . $this->temp_nodata_image; + return $this->properties['icons_path'] . $this->temp_nodata_image; } } // ------------------------------------------------------------------------ |