You Have Already Voted Message

1 week 6 days ago #3324
Topic Author
Donald Golden's Avatar
Posts: 9
You Have Already Voted Message

After individuals have voted, if the try to vote again they see multiple version of the same message (same computer, same browser).

Per the attached image, in Case 1, clicking on the vote button, the the get a popup saying they have already voted. " Entry votes left -1" is confusing

Case 2- same computer same browser, there is no reaction to clicking on the vote button if you hover you get a different message.

Attachments:

1 week 6 days ago #3325
Dmitry's Avatar
Posts: 861
You Have Already Voted Message

Hi Donald.

Please send a screenshot of you contest voting options.

Best regards,
Dmitry


Like our extensions and support?
Add your voice to the JED listing with a 5-score review: bit.ly/2ciJBqC
Thanks!

1 week 5 days ago #3326
Topic Author
Donald Golden's Avatar
Posts: 9
You Have Already Voted Message

Attached is the screen shot you requested

Thanks for your help

Attachments:

2 days 20 hours ago #3331
Dmitry's Avatar
Posts: 861
You Have Already Voted Message

Sorry for the delay I need more time to investigate this issue.


Like our extensions and support?
Add your voice to the JED listing with a 5-score review: bit.ly/2ciJBqC
Thanks!

1 day 21 hours ago #3332
Dmitry's Avatar
Posts: 861
You Have Already Voted Message

I found the problem. When the limit for contest votes is reached it should not display the information about entry votes.

Quick fix for it - open file components/com_competition/themes/default/_vote_button.php and find there this piece of a code:

if ($voteData->allowedCompetitionVotes > 0 && !$isList)
{
	$leftContestVotes = $voteData->allowedCompetitionVotes - $voteData->competitionVotes;
	$tooltip .= '<br>' . JText::sprintf('COM_COMPETITION_CONTEST_VOTES_LEFT', $leftContestVotes);
}

if ($voteData->allowedParticipantVotes > 0)
{
	$leftEntryVotes = $voteData->allowedParticipantVotes - $voteData->participantVotes;
	$tooltip .= '<br>' . JText::sprintf('COM_COMPETITION_ENTRY_VOTES_LEFT', $leftEntryVotes);
}

Change it to:
if ($voteData->allowedCompetitionVotes > 0)
{
	if ($voteData->competitionVotesLimit && $isList)
	{
		$tooltip .= '<br>' . JText::sprintf('COM_COMPETITION_VOTES_LIMIT_COMPETITION', $voteData->allowedCompetitionVotes);
	}
	elseif (!$isList)
	{
		$tooltip .= '<br>' . JText::sprintf('COM_COMPETITION_CONTEST_VOTES_LEFT', $voteData->allowedCompetitionVotes - $voteData->competitionVotes);
	}
}

if ($voteData->allowedParticipantVotes > 0 && !$voteData->competitionVotesLimit)
{
	if ($voteData->participantVotesLimit && $isList)
	{
		$tooltip .= '<br>' . JText::sprintf('COM_COMPETITION_VOTES_LIMIT_PARTICIPANT', $voteData->allowedParticipantVotes);
	}
	else
	{
		$tooltip .= '<br>' . JText::sprintf('COM_COMPETITION_ENTRY_VOTES_LEFT', $voteData->allowedParticipantVotes - $voteData->participantVotes);
	}
}

This will be slightly improved version for different voting status situations.


Like our extensions and support?
Add your voice to the JED listing with a 5-score review: bit.ly/2ciJBqC
Thanks!

You can get our help: Monday - Friday / 09:00 to 17:00 (GMT+2). but not limited. Our staff will be pleased to provide Premium support to every paid subscriber asap, but sometimes you should be ready to wait for our reply for up to 3 days. In case of free extensions we do the best to develop and maintain them either, but their support is not necessary.

Follow us in social media