Closed (fixed)
Project:
Date picker formatter
Version:
6.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Feb 2010 at 08:22 UTC
Updated:
26 Nov 2010 at 14:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
zeropaperJust a few thoughts about that...
the date picker is a field formatter, so, clearly, unless doing a new handler for views or a (very) complex view, you won't be able to count the votes for a node.
on the other hand, as the module utilize the voting API and as voting API offers the ability to "count" the votes, it *might* be possible to count the votes.
We could maybe start digging if you could post the content type and view definition, but the answers seems to be "no, by design".
Comment #2
itsnotme commentedAh, thanks for the quick reply.
I was just looking into using CCK computed field and extracting the values from the "votingapi_vote" table but I'm not an SQL hero so I'm struggling with the correct query. (Problem is that the table saves all votings ever done, so one needs to filter for the correct node_id and the latest user votes. Which is obviously more than my brain can handle this morning :)
Views doesn't seem to put out any of the votes, no matter how I try...
Comment #3
zeropaperdid you give a try to mix the tables within your view using the "relations"? It might be handy.
by the way... my brain is also in maintenance mode today ;(
Comment #4
itsnotme commentedThe Views w/o relationships didn't work for me, so I ended up writing a little custom module that calculates the votes and prints out a table. Might share when it's done. :)
Comment #5
zeropaperneat :)
I'll be happy see that (perhaps integrate it within the module?)
Comment #6
itsnotme commentedHere the current implementation in my project. A module called doodle_calculate, which puts out an extra table for the results. It comes with this .module code:
And this in the node...tpl.php:
Plus some formatting in the css. If anyone knows a way to better integrate this into the CCK proceedings, I'd welcome hints. The extra table is not my favorite but I didn't find a way to add the results right below the CCK fields (which would have given the doodle look).
Comment #7
j0nathan commentedsubscribing
Comment #8
socialnicheguru commentedsubscribing.
Comment #9
thepanz commentedHi, I've implemented this and other features (like #836564: provide .date-picker-formatter-yes and .date-picker-formatter-no classes):
- voting counts for each date-time
- customizable vote-icon (using pure CSS)
- customizable voting-cells (CSS)
- customizable voting stats cell (CSS)
- "winner" indicator, each color is linked using CSS to the item-value defined in date-picker-formatter (CSS applicable even if two o more votes equals)
- if "checkbox" is selected, in the summary will present only the "Yes" count
Attached some previews..
Feel free to contact me for donations..
Regards
Comment #10
zeropaperVery neat!
may I ask you to post a zip of your module (I hate patches :) ).
I'll then make a new release of the module.
Thanks and best regards,
Valentin
PS: i you do want to co-maintain the module... that would be awesome (I can not give it enough attention and it's a shame for me...)
Comment #11
thepanz commentedYep! Add me as a module-maintainer / co-maintainer.. I'll be glad to help!
My patches are still under development.. i'll accept donations to finish the work!
Comment #12
itsnotme commentedAwesome. I'm very interested in implementing this new version, and will do testing soon.
The "maybe" count is also cool and had been a feature request in my Intranet a while ago.
Comment #13
thepanz commentedHi itsnotme: unfortunately my client dropped this feature request and I can't work on it anymore nor release my customer module source code (even if incomplete) due to some restrictions written in my work-contract.
I accept donations to finish my work if you're interested in (maybe you can consider this as a module sponsorship?).
Regards
Comment #14
zeropaperI do not know exactly the terms of your contract.. but.. GPL is pretty clear about transmitting work/code, if you do it for 1 you have to make the code available to everyone.
If you work as an employee, this is an other story.
Comment #15
thepanz commentedYes, I'm in the last option you gave. I can't "stole" the code, but I can "re-do" the same work for someone else ;)
If anyone is interested, please PM me...
Regards
Comment #16
thepanz commentedI'm proud to announce that the new 2.x branch is ready for testing with all the new features listed here.. feedbacks are welcome!