theme_pipes_rating

Definition

theme_pipes_rating($rating = array())
pipes/pipes.module, line 338

Description

Theme a pipes rating

Code

function theme_pipes_rating($rating = array()) {
  if (!empty($rating)) {
    if ($rating['AverageRating'] != 'NaN') {
      $output = '<br /><b>' . t('Rated @average of 5 stars by @total Yahoos', array('@average' => $rating['AverageRating'], '@total' => $rating['TotalRatings'])) . '</b><br />';
    }
    else {
      $output = '<br /><b>' . t('No Yahoo! Ratings') . '</b><br />';
    }
    if (!empty($rating['LastReviewIntro'])) {
      $output .= '<blockquote>"' . filter_xss($rating['LastReviewIntro']) . '"<div align="right"><small>' . t('Yahoo! review posted @date', array('@date' => format_date($rating['LastReviewDate']))) . '</small></div></blockquote>';
    } 
      return $output;
  }
  return t('No ratings found');
}