Recent Topics

1 Jul 19, 2007 16:53    

I wanted to show both temperatures (F/C) in the weather plugin, so I kept standard as default and added the conversion. I had to reduce the font size for the current temp to 190% to fit in my sidebar. YMMV.

    		// Current temp
    		echo	$params['temp_start'].
    			$weather['cc']['tmp'].
    			'°'.
    			$weather['head']['ut'].
    			// $params['temp_end'];
    		// Current temp
    		// $params['temp_start'].
    			'/'.
    			round((((($weather['cc']['tmp']) - 32) / 9) * 5),0).
    			'°C'.
    			$params['temp_end'];


And

    		// Show today's low temp, if there is one
    		if ( ($weather['dayf']['low'] != 'N/A') and ($weather['low']) ) {
    			echo 	T_('Low').': '.
    				$weather['dayf']['low'].
    				'°'.
    				$weather['head']['ut'].
    			'/'.
    			round((((($weather['dayf']['low']) - 32) / 9) * 5),0).
    			'&deg;C'.'<br />';
    		}


My weather never shows the daily high, but I think that's because I don't look at it at night? Weather.com shows the high for the *next* day, so I only ever get the daily low on my blog. I'll have to check it out after midnight, and see what it shows then.

[url=http://www.moonchild.ch/blog/index.php]See it here[/url].


Form is loading...