display voting summary as stars
jbhan - November 4, 2006 - 21:37
| Project: | mediumvote |
| Version: | 4.7.x-1.x-dev |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
it would be nice to have the voting results displayed in the 5-star view as well. maybe rounding it to the nearest star or 1/2 star?
jason

#1
Yes, I also would love to have the same. Right now the Medium Vote is so great, since it is simple, works with Voting API, and I could customize it slightly in regards to what nodes I allow votes on and who can vote. For the users with voting privilege, the design is great. I have it as:
1. showing all stars gray if nobody has voted
2. black stars what the current vote is (if the user hasn't voted)
3. and a red star during the user casting his vote.
However, the anonymous user can only see the number without any nice design. As you can see from 2., the privileged user can actually see the current vote displayed as stars, but once he votes, they are gone. (This sort of indicates to the user that he has voted and cannot vote anymore)
I am going one step further here, to what I would like to have. Basically, instead of the number in brackets I would like to see the stars as the current vote (as Jason suggests). Underneath, as currently, for the privileged user, I would like to see the stars where I can vote on. Personally, it would be nice for me, if those stars (in the second line) would show how I voted in brackets and not the average vote (that's in the first line). Also, it would be great, since it shows my vote, if I could change my vote.
I know I am asking a lot, but it would be nice if the module had a few clear defined constants or functions, where the programmer could customize it. Then, when I install the module, I could just set a few switches according to my needs. (E.g., if one can change one's vote, if one's own vote is shown, etc.)
#2
Ok, I changed the code for myself to do exactly what I was talking about in the above post. It shows the ratings with stars in one line. For certain authorized users there will be a second line that let's them vote. It also shows how they have voted, and they can change their vote.
All of this helped me to familiarize myself a little with the code. Since my changes were rather invasive, it would be inappropriate to post the whole file, but I can help anybody who has questions.
I would also suggest a few changes in general to the code, put more comments in, etc. If there is interest, feel free to contact me.
You are welcome to check the result here: http://libertyvalley.com/club/hot_commodities_by_jim_rogers
You will only see the first line since you are not logged in. If you would like to see what it looks like when you login, contact me and I can give you the login information for a guest account.