get('show_vote', null)) { $rating = (int) @$row->rating; $view = JFactory::getApplication()->input->getString('view', ''); $img = ''; // Look for images in template if available $starImageOn = JHtml::_('image', 'system/rating_star.png', JText::_('PLG_VOTE_STAR_ACTIVE'), null, true); $starImageOff = JHtml::_('image', 'system/rating_star_blank.png', JText::_('PLG_VOTE_STAR_INACTIVE'), null, true); for ($i = 0; $i < $rating; $i++) { $img .= $starImageOn; } for ($i = $rating; $i < 5; $i++) { $img .= $starImageOff; } $html .= '
'; if ($view == 'article' && $row->state == 1) { $uri = JUri::getInstance(); $uri->setQuery($uri->getQuery() . '&hitcount=0'); // Create option list for voting select box $options = array(); for ($i = 1; $i < 6; $i++) { $options[] = JHTML::_('select.option', $i, JText::sprintf('PLG_VOTE_VOTE', $i)); } // Generate voting form $html .= ''; } } return $html; } }