I have a case where authenticated users can Vote a content many times.
I want a button at the top of the Node saying Vote This and when the users click the button it'll ask for confirmation Do you really want to Vote ?. When confirmed, he'll be redirected back to the same page, and be able to click the button again. However, in the backside, I want to record the time of voting and the user who voted it. Not necessarily the vote count, but just date/time and person.
I tried this with the Flag and Global Flag modules, but the issue is: once flagged, it can only be unflagged.
I also tried Fivestar module, with just one star (which I can change it to a button via CSS), but it doesn't ask for confirmation. It doesn't record the date/time either (I might be wrong here, but playing around with Fivestar, I didn't find a configuration option).
There must be something with VotingAPI which might be useful in my case, but I am unable to identify how to satisfy these conditions. I am seeking guidance.
Update: In addition to @Adam Balsam's answer to have confirmation I did
Use jQuery to add id
to the link like: (I only have one vote in node)
$('.plus1-link').attr('id', 'vote-plus');
Then added jQuery confirm dialog like:
$('#vote-plus').click(function(e) {
var cnf = confirm('Do you really want to vote?');
if(cnf === false) {
e.preventDefault();
}
});
It might not be the elegant solution, but this how I solved my confirmation dialog option.