checkAction()) $iCanRate = 0; } return $this->getVoting($iCanRate, $this->_iSizeStarSmallX, $this->_iSizeStarSmallY, 'small', 0, true, $iVoteRateOverride); } function getManySmallVoting($iCanRate = 1, $iID = 0, $isShowCount = true, $iVoteRateOverride = false) { if ($iCanRate != 0) { if (!$this->checkAction()) $iCanRate = 0; } return $this->getVoting($iCanRate, $this->_iSizeStarSmallX, $this->_iSizeStarSmallY, 'small', $iID, $isShowCount, $iVoteRateOverride); } function getBigVoting ($iCanRate = 1, $iVoteRateOverride = false) { if ($iCanRate != 0) { if (!$this->checkAction()) $iCanRate = 0; } return $this->getVoting($iCanRate, $this->_iSizeStarBigX, $this->_iSizeStarBigY, 'big', 0, true, $iVoteRateOverride); } function getJustVotingElement($iCanRate, $iPossibleID = 0, $iVoteRateOverride = false) { return $this->getManySmallVoting($iCanRate, $iPossibleID, false, $iVoteRateOverride); } function getVoting($iCanRate, $iSizeX, $iSizeY, $sName, $iPossibleID = 0, $isShowCount = true, $iVoteRateOverride = false) { $oSysTemplate = BxDolTemplate::getInstance(); $sSiteUrl = BX_DOL_URL_ROOT; $iMax = $this->getMaxVote(); $iWidth = $iSizeX*$iMax; $sSystemName = $this->getSystemName(); $iObjId = $iPossibleID ? $iPossibleID : $this->getId(); $sDivId = $this->getSystemName() . $sName; if ($iPossibleID>0) { $sDivId .= $iPossibleID; } $sRet = '
'; if ($iCanRate) $sRet .= << var oVoting{$sDivId} = new BxDolVoting('{$sSiteUrl}', '{$sSystemName}', '{$iObjId}', '{$sDivId}', '{$sDivId}Slider', {$iSizeX}, {$iMax}); EOF; $sRet .= '
'; if ($iCanRate) { $sRet .= '
'; for ($i=1 ; $i<=$iMax ; ++$i) { $sRet .= ''; } $sRet .= '
'; } $iVoteRate = (false === $iVoteRateOverride ? $this->getVoteRate() : $iVoteRateOverride); $sRet .= '
'; $sRet .= '
'; if ($isShowCount) $sRet .= ''.$this->getVoteCount(). ' ' . _t('_votes') . ''; $sRet .= '
'; $sRet .= '
'; return $sRet; } function getExtraJs () { BxDolTemplate::getInstance()->addJs('BxDolVoting.js'); } }