* @license Apache License, Version 2.0 */ if ( ! $this->_pzdxMerchant ) return; $captions = array( 'must_login' => 'You must login before you can vote! - Just click, we\'ll take you there and back!', 'vote_up' => 'Vote Up', 'vote_down' => 'Vote Down' ); $merchant = $this->_pzdxMerchant; $community = $this->_pzdxCommunity; $config = $this->_pzdxConfig; $link = $this->_permalink($merchant); $voteCount = intval($merchant->votes->count); $votePosCount = intval($merchant->votes->pos_count); $baseUrl = rtrim($community->base_url, '/'); if ( $voteCount < 1 ) $voteCss = 'novotes'; elseif ( isset($merchant->self->rating) ) $voteCss = 'voted-' . $merchant->self->rating; $voteUpTitle = ( isset($merchant->self) ) ? $captions['vote_up'] : $captions['must_login']; $voteDownTitle = ( isset($merchant->self) ) ? $captions['vote_down'] : $captions['must_login']; $voteUpTitle = str_replace('"', '"', $voteUpTitle); $voteDownTitle = str_replace('"', '"', $voteDownTitle); if ( isset($config['translations']) && is_array($config['translations']) && ! empty($config['translations']) ) $captions = array_merge($captions, $config['translations']); if ( isset($config['lang']) && is_string($config['lang']) && ! empty($config['lang']) ) $langCss = 'praized-vote-button-' . $config['lang']; else $langCss = ''; $xhtml .= <<
Stats:
{$votePosCount}/{$voteCount}
Actions:
EOS; ?>