We've been building out a judging/rating module that has a dependency on votingapi for its end-user voting functionality. The client was not totally happy with the 1-day vote rollover option for anon and auth users. They requested that we instead compare a vote's calendar day to the current calendar day instead of the full 24-hour check with the 1-day rollover option:
DATE_FORMAT(FROM_UNIXTIME(timestamp), '%Y-%d-%m') = '2014-04-03'
While this could have been accomplished by implementing hook_votingapi_storage_select_votes in our custom mod, it occurred to us that this "calendar day" option might be a welcome addition for other devs out there. To that end, we elected to create a patch for votingapi that adds this new option and accounts for it in votingapi_select_votes and votingapi_votingapi_storage_select_votes.
Comment | File | Size | Author |
---|---|---|---|
#1 | calendar-day-option-2232751-1.patch | 1.87 KB | natemow |
Comments
Comment #1
natemow CreditAttribution: natemow commentedAttaching patch.
Comment #2
natemow CreditAttribution: natemow commentedComment #3
natemow CreditAttribution: natemow commented