You are here

function theme_weather_es in Weather_es 5

Same name and namespace in other branches
  1. 6 weather_es.module \theme_weather_es()

Custom theme function for the weather_es block output

1 theme call to theme_weather_es()
block_weather_es_contents in ./weather_es.module
Show the weather_es contents

File

./weather_es.module, line 611
Non-displayable characters.

Code

function theme_weather_es($data, $usrcnf) {
  $img_ext = '.png';
  $content .= t('<p><strong>Day: ' . filter_xss($data->day) . '</strong></p>');
  $content .= '<ul>';
  if ($data->sky_txt1 != '') {
    $content .= '<li>' . filter_xss($usrcnf->sky) . ' ' . filter_xss($data->ampm) . ' : <div style="text-align:center;"><img src="' . drupal_get_path(module, weather_es) . '/images/' . filter_xss($data->sky_img1) . $img_ext . '" title="' . filter_xss($data->sky_txt1) . '" alt="' . filter_xss($data->sky_txt1) . '" width="64" height="64" /></div></li>';
  }
  if ($data->sky_txt2 != '') {
    $content .= '<li>' . filter_xss($usrcnf->sky) . ' pm: <div style="text-align:center;"><img src="' . drupal_get_path(module, weather_es) . '/images/' . filter_xss($data->sky_img2) . $img_ext . '" title="' . filter_xss($data->sky_txt2) . '" alt="' . filter_xss($data->sky_txt2) . '" width="64" height="64" /></div></li>';
  }
  if ($data->rain != 999) {
    $content .= '<li>' . filter_xss($usrcnf->rain) . ': ' . filter_xss($data->rain) . '</li>';
  }
  if ($data->snow != 9999) {
    $content .= '<li>' . filter_xss($usrcnf->snow) . ': ' . filter_xss($data->snow) . '</li>';
  }
  if ($data->tmax != 99) {
    $content .= '<li>' . filter_xss($usrcnf->tmax) . ': ' . filter_xss($data->tmax) . '</li>';
  }
  if ($data->tmin != 99) {
    $content .= '<li>' . filter_xss($usrcnf->tmin) . ': ' . filter_xss($data->tmin) . '</li>';
  }
  if ($data->win_dir1 != '') {
    $content .= '<li>' . filter_xss($usrcnf->win_dir) . ' ' . filter_xss($data->ampm) . ': ' . filter_xss($data->win_dir1) . '</li>';
  }
  if ($data->win_dir2 != '') {
    $content .= '<li>' . filter_xss($usrcnf->win_dir) . ' pm: ' . filter_xss($data->win_dir2) . '</li>';
  }
  if ($data->win_spd1 != 999) {
    $content .= '<li>' . filter_xss($usrcnf->win_spd) . ' ' . filter_xss($data->ampm) . ': ' . filter_xss($data->win_spd1) . '</li>';
  }
  if ($data->win_spd2 != 999) {
    $content .= '<li>' . filter_xss($usrcnf->win_spd) . ' pm: ' . filter_xss($data->win_spd2) . '</li>';
  }
  if ($data->iv_max != 99) {
    $content .= '<li>' . filter_xss($usrcnf->iv) . ': ' . filter_xss($data->iv_max) . '</li>';
  }
  if ($data->rsk != '') {
    $content .= '<li>' . filter_xss($usrcnf->rsk) . ': ' . filter_xss($data->rsk) . '</li>';
  }
  $content .= '</ul>';
  return $content;
}