You are here

function theme_yr_verdata_radar in Yr Weatherdata 6.2

Same name and namespace in other branches
  1. 7 yr_verdata.module \theme_yr_verdata_radar()

Theme function for displaying the radarimage for a location on that location's main forecast page. Caching is done for the whole page, so we don't need to do it here.

Parameters

$vars: An array with the processed radar information for this location.

Return value

Returns themed output with a radarimage for this location, linking to the radarimage page at yr.no.

See also

http://api.yr.no/weatherapi/radar/1.2/documentation

File

./yr_verdata.module, line 950
yr_verdata.module This file contains the code for getting the forecast from yr.no and displaying it on a Drupal site.

Code

function theme_yr_verdata_radar($vars) {
  $image = theme('image', $vars['url'], $vars['text'], $vars['text'], NULL, FALSE);
  $output = '<h3>' . $vars['text'] . '</h3>';
  $output .= l($image, $vars['link'], array(
    'html' => TRUE,
    'attributes' => array(
      'rel' => 'nofollow',
    ),
  ));
  return $output;
}