Shape 5

Joomla Free Extensions => Weather Module - Free => : kkennedy March 09, 2009, 11:30:19 AM



: 1 Day Forecast?
: kkennedy March 09, 2009, 11:30:19 AM
I reviewed the forum and was unable to find a response to this question:

Is it possible to edit the php file to only show one day as opposed to three on your site?


: Re: 1 Day Forecast?
: jonahh March 10, 2009, 10:11:21 PM
Hello,

To do this open up the weather.class.php file look for and remove the below code:

:
for($pos = 0; ($pos = strpos($data, 'yweather:forecast', $pos)) !== false; $pos+=2) {
$attr = explode('"', substr($data, $pos, strpos($data, '/>', $pos)-$pos));
if($metric) {
$attr[5] = number_format(($attr[5] - 32) / 1.8, 0);
$attr[7] = number_format(($attr[7] - 32) / 1.8, 0);
}
$day = array();
$day['when'] = $attr[1];
$day['low'] = $attr[5].'°'.$units[0];
$day['high'] = $attr[7].'°'.$units[0];
$day['text'] = $attr[9];
$day['image'] = $attr[11];
$ret[] = $day;
}