How to show vote credits remaining ?

1 month 1 week ago #2651
Topic Author
jan95's Avatar
Posts: 61
How to show vote credits remaining ?

Hello,

We are offering our voters 3 credits (number of votes per contest) and would like to inforem them about remaining votes,
we add a message to inform them but lot of them spent all votes ..

i suggest to show remaining votes number after they vote in the hover message, you see ?

1 month 1 week ago #2652
Eugene's Avatar
Posts: 623
How to show vote credits remaining ?

Hi Mohamed,
There is no such option in NorrCompetition.


Like our extensions and support?
Add your voice to the JED listing with a 5 score review:: bit.ly/2ciJBqC
Thanks!
Last edit: 1 month 1 week ago by Eugene.

1 month 1 week ago #2653
Topic Author
jan95's Avatar
Posts: 61
How to show vote credits remaining ?

Yes i know i checked all options :)

Its a suggestion, maybe that can help other users here !
i think thats a crucial information for voters until they know where to put their votes, someones contacted me and they were little bit frustrated about loosing all their credits .. even we mentionned that they can vote for 3 people they didnt see it.

1 month 1 week ago #2654
Eugene's Avatar
Posts: 623
How to show vote credits remaining ?

Thank you for your suggestion.
We are working on the Unvote feature soon to be released, so this feature can help the users to undo vote for the previous entry and vote for a new one. So, I will help in the situation when the user has changed opinion and decided to vote for another entry.

Perhaps such a feature will cover the needs of your site visitors.


Like our extensions and support?
Add your voice to the JED listing with a 5 score review:: bit.ly/2ciJBqC
Thanks!
Last edit: 1 month 1 week ago by Eugene.

1 month 1 week ago #2655
Topic Author
jan95's Avatar
Posts: 61
How to show vote credits remaining ?

Yeees awesome, the unvote is realy usefull in this case

any chance to have this option this week ?

1 month 1 week ago #2656
Eugene's Avatar
Posts: 623
How to show vote credits remaining ?

Well, I mentioned this feature is in the process, but we are not able to release new versions of the component each week :-)
It's planned in ver.1.8.2 (the latest version is 1.8.0 at the moment)

If you need this feature urgent, it is dedicated support.


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

1 month 1 week ago #2657
Dmitry's Avatar
Posts: 790
How to show vote credits remaining ?

Actually NorrCompetition is powerful enough to display this info out of the box :side: There is a $voteData object that contains all information about the user votes. So you only need to modify layout to show needed info to voters.

As far as I remember you are using uikit theme. So in your case:

1. Create layout override for file components/com_competition/themes/uikit/_vote_button.php

2. Find this peace of code:

$inListMethod     = $isList ? 'voteInList' : 'vote';

3. Paste this code just before:
if ($voteData->allowedParticipantVotes > 1 && $canVote)
{
	$leftVotes = $voteData->allowedParticipantVotes - $voteData->participantVotes;
	$tooltip .= '<br>Votes remaining: ' . $leftVotes;
}

It should look like this B)


Dmitry


Like our extensions and support?
Add your voice to the JED listing with a 5-score review: bit.ly/2ciJBqC
Thanks!
Attachments:
Last edit: 1 month 1 week ago by Dmitry.

1 month 1 week ago #2658
Topic Author
jan95's Avatar
Posts: 61
How to show vote credits remaining ?

No choice we'll wait for next release :)

1 month 1 week ago #2659
Topic Author
jan95's Avatar
Posts: 61
How to show vote credits remaining ?

Thanks Dmitry, i just tried to edit but id dont show remaining votes,
i think its because we are giving 1 vote credit per entry, in your screenshot it show that the person have 2 other votes in addition of already given!

What i need is little bit different, show in hover the global remaining votes based on contest votes and not entry votes.

1 month 1 week ago #2660
Dmitry's Avatar
Posts: 790
How to show vote credits remaining ?

You can play around with $voteData object. It has different information inside and allowedCompetitionVotes is also there. Here is the example var_dump($voteData):

object(stdClass)[916]
  public 'canVote' => boolean true
  public 'votingActive' => boolean true
  public 'hasPermission' => boolean true
  public 'fraud' => boolean false
  public 'success' => boolean false
  public 'competitionVotesLimit' => boolean false
  public 'participantVotesLimit' => boolean false
  public 'lastVote' => string '2019-12-03 10:06:18' (length=19)
  public 'lastCompetitionVote' => string '2019-12-06 15:42:18' (length=19)
  public 'allowedCompetitionVotes' => int 10
  public 'allowedParticipantVotes' => int 3
  public 'nextVote' => string '' (length=0)
  public 'competitionVotes' => int 8
  public 'participantVotes' => int 2

Probably
if ($voteData->allowedCompetitionVotes > 1 && $canVote)
{
	$leftContestVotes = $voteData->allowedCompetitionVotes - $voteData->competitionVotes;
	$tooltip .= '<br>Contest votes remaining: ' . $leftContestVotes;
}


Dmitry


Like our extensions and support?
Add your voice to the JED listing with a 5-score review: bit.ly/2ciJBqC
Thanks!
Attachments:
Last edit: 1 month 1 week ago by Dmitry.

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.

Product Latest Update

Follow us in social media