Download & Extend

limit votes to certain number of nodes, and time

Project:DrupalIt
Version:5.x-1.3-a
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

#1

You want the counter to start after the first vote?

#2

yes

#3

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;

#4

Status:active» closed (fixed)

#5

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?

nobody click here