Closed (fixed)
Project:
Decisions
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Apr 2010 at 09:32 UTC
Updated:
12 May 2010 at 05:00 UTC
I am using custom PHP code to display a custom message, depending on if the logged-in user has already voted or not:
if (arg(0) == 'node' && is_numeric(arg(1)) && ! arg(2)) {
global $user;
$uid = $user->uid;
$nid = arg(1);
$vote_count = 0;
$vote_count = db_result(db_query('SELECT COUNT(*) FROM {votingapi_vote} WHERE content_id = %d AND uid = %d', $nid, $uid));
if ($vote_count < 1) {
print 'Please select your preferred candidate!';
} else {
print 'You have already voted. You can view the results once the voting has been closed.';
}
}
However, the module also outputs a hard coded message "Your vote has been recorded." on submitted nodes. This is disturbing and should be removable.
Comments
Comment #1
roball commentedHm, I don't see the "Your vote has been recorded." message anymore with the latest dev version. Has it already been removed?
Comment #2
anarcat commentedThis is now fully themable.