/** * Shows the voting screen */ function _showVotes() { global $mainframe, $rsgConfig, $rsgAccess; $gallery = rsgGalleryManager::get(); $vote_view = $rsgConfig->get('voting') && ($rsgAccess->checkGallery("vote_view", $gallery->id) || $rsgAccess->checkGallery("vote_vote", $gallery->id)); if ($vote_view) { $css = "<link rel=\"stylesheet\" href=\"" . JURI_SITE . "/components/com_rsgallery2/lib/rsgvoting/rsgvoting.css\" type=\"text/css\" />"; $mainframe->addCustomHeadTag($css); $voting = new rsgVoting(); if ($rsgAccess->checkGallery("vote_view", $gallery->id)) { $voting->showScore(); } if ($rsgAccess->checkGallery("vote_vote", $gallery->id)) { $voting->showVoting(); } } else { echo JText::_('Voting is disabled!'); } }