Вообщем сделал голосования как и нужно было звездочками. Для этого заменила шаблон компонента iblock.vote на свой
Там было так:
[CODE] <?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<div class="iblock-vote">
<form method="post" action="<?=POST_FORM_ACTION_URI?>">
<select name="rating">
<?foreach($arResult["VOTE_NAMES"] as $i=>$name):?>
<option value="<?=$i?>"><?=$name?></option>
<?endforeach?>
</select>
<?echo bitrix_sessid_post();?>
<input type="hidden" name="back_page" value="<?=$arResult["BACK_PAGE_URL"]?>" />
<input type="hidden" name="vote_id" value="<?=$arResult["ID"]?>" />
<input type="submit" name="vote" value="<?=GetMessage("T_IBLOCK_VOTE_BUTTON")?>" />
</form>
</div>[/CODE]
Стало вот так:
[CODE]<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<?
$r=round($arResult["PROPERTIES"]["rating"]["VALUE"]);
$x=0;
while ($x++<5){
?>
<form method="post" id="f<?=$arResult["ID"]?>-<?=$x?>" action="<?=POST_FORM_ACTION_URI?>">
<input type="hidden" name="rating" value="<?=($x-1)?>">
<?echo bitrix_sessid_post();?>
<input type="hidden" name="back_page" value="<?=$arResult["BACK_PAGE_URL"]?>" />
<input type="hidden" name="vote_id" value="<?=$arResult["ID"]?>" />
<input type="hidden" name="vote" value="<?=GetMessage("T_IBLOCK_VOTE_BUTTON")?>" />
</form>
<?
if($x<=$r){
echo '<a class="rating_active" onclick="document.getElementById(\'f'.$arResult["ID"].'-'.$x.'\').submit(); return false;"></a>';
}
else{
echo '<a class="rating_noactive" onclick="document.getElementById(\'f'.$arResult["ID"].'-'.$x.'\').submit(); return false;"></a>';
}
}
?>
[/CODE]Это конечно не самое прекрассное решение, но главное что сейчас возможно голосование по нажатию на звездочки.
Там было так:
[CODE] <?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<div class="iblock-vote">
<form method="post" action="<?=POST_FORM_ACTION_URI?>">
<select name="rating">
<?foreach($arResult["VOTE_NAMES"] as $i=>$name):?>
<option value="<?=$i?>"><?=$name?></option>
<?endforeach?>
</select>
<?echo bitrix_sessid_post();?>
<input type="hidden" name="back_page" value="<?=$arResult["BACK_PAGE_URL"]?>" />
<input type="hidden" name="vote_id" value="<?=$arResult["ID"]?>" />
<input type="submit" name="vote" value="<?=GetMessage("T_IBLOCK_VOTE_BUTTON")?>" />
</form>
</div>[/CODE]
Стало вот так:
[CODE]<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<?
$r=round($arResult["PROPERTIES"]["rating"]["VALUE"]);
$x=0;
while ($x++<5){
?>
<form method="post" id="f<?=$arResult["ID"]?>-<?=$x?>" action="<?=POST_FORM_ACTION_URI?>">
<input type="hidden" name="rating" value="<?=($x-1)?>">
<?echo bitrix_sessid_post();?>
<input type="hidden" name="back_page" value="<?=$arResult["BACK_PAGE_URL"]?>" />
<input type="hidden" name="vote_id" value="<?=$arResult["ID"]?>" />
<input type="hidden" name="vote" value="<?=GetMessage("T_IBLOCK_VOTE_BUTTON")?>" />
</form>
<?
if($x<=$r){
echo '<a class="rating_active" onclick="document.getElementById(\'f'.$arResult["ID"].'-'.$x.'\').submit(); return false;"></a>';
}
else{
echo '<a class="rating_noactive" onclick="document.getElementById(\'f'.$arResult["ID"].'-'.$x.'\').submit(); return false;"></a>';
}
}
?>
[/CODE]Это конечно не самое прекрассное решение, но главное что сейчас возможно голосование по нажатию на звездочки.