Postponed (maintainer needs more info)
Project:
Voting API
Version:
7.x-2.9
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Jul 2013 at 08:30 UTC
Updated:
27 Feb 2018 at 06:41 UTC
Jump to comment: Most recent
Comments
Comment #1
droddis commentedHey there,
Did you ever get anywhere with this request? I have a similar situation involving multiple videos where you can only vote for 1 item per day.
Comment #2
takyros commentedsome news? i'm just facing a very similar scenario..
Comment #3
kojow7 commentedSorry, I never did find a way to do this. :(
Comment #4
keve commentedPut this code into custom module (It uses Rate module's hook_rate_vote_alter() function.)
It allows one vote (per user per content type).
Comment #5
Tourista commentedHello keve,
I created an empty custom module and added your code. Website doesn't work with this module enabled.
Can you please copy paste the full code which should be on this module file ?
Comment #6
keve commentedTourista:
I guess you missed "/" from the beginning of the php, it should be "/**"
So it should start:
<?php
/**
* Alter the vote before it is saved.
*
Comment #7
Tourista commentedThanks for your answer !
Now the site doesn't crash anymore but my users can vote for several nodes from the same content type.
My content type is "recette", my rate widget name is "concours", can you confirm that the full code should be like that ?
onevote.module :
onevote.info :
Comment #8
pifagor commented