I would like to find a way to limit how many total nodes can be voted on during a given time period by one user/IP address.

working on a t-shirt voting system, and drupalit fit perfectly with the system. Now the bosses want to have users select their 3 favorite shirts, and only be able to vote for those shirts once a day.

ideas?

Comments

apanag’s picture

You want the counter to start after the first vote?

Madapple’s picture

yes

apanag’s picture

So i am thinking sth like this:

//on function drupalit_count_vote
$time_to_vote = x;
$number_of_votes = y;

$selected_time = select the time of the first node, that the user voted where the uid = get the user_id;
$users_today_votes = select count(votes) where the uid = 1 and voted_time > 00:00

if selected_time > $selected_time + $time_to_vote && $users_today_votes >= y
 exit;
else
 vote;

apanag’s picture

Status: Active » Closed (fixed)
serkan_isin’s picture

how can i use that? i would like a user to vote for only one node or item? We are using a "worker of the month" feature in intranet..

any help?