Display amount of comment voters

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 06-08-2007, 09:37 AM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
Since comment voting is disabled for more than on attempt I believe that the voters are stored. Therefore it should be possible to sum the number of voters and display the figure next to the rating.

My opinion is: A vote of (+)1 has a greater value if it´s aggregated of 19 voters (10 +, 9 -) than of one voter (1 +). Therefore the number of voters should be displayed.

Is anyone interested in implementing this? Maybe together with my other wish (Individual comment link.

Last edited by tbones; 06-08-2007 at 09:52 AM. Reason: Reference to my other wish
Reply With Quote
  #2 (permalink)  
Old 06-09-2007, 06:40 PM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
I´ve realized that it´s getting more and more difficult for those who want to help the community to overlook all the posts. Therefore I´ve created a little linklist of my wishes, sorted by priority:

1. This topic
2. Pligg + OpenID (minor bugfix, I hope) [Takes longer]
3. v9.5: Upcoming view - Video-ID is displayed [DONE]
4. Individual comment link [DONE]
5. v9.5: Time error in live view [DONE]

Thx in advance!

Last edited by tbones; 07-18-2007 at 02:24 AM.
Reply With Quote
  #3 (permalink)  
Old 06-12-2007, 03:50 AM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
If it´s to much work could you provide me a SQL statement to get comment ID, story ID and the number of voters for static analysis?
Reply With Quote
  #4 (permalink)  
Old 06-12-2007, 05:46 AM
savant's Avatar
Constant Pligger
 
Join Date: Apr 2006
Location: UK
Posts: 1,181
hey tbones, when i have free time and i want to write some features, i'll definitely look at your list.
Reply With Quote
  #5 (permalink)  
Old 06-12-2007, 05:55 AM
Pligg Donor
 
Join Date: May 2007
Posts: 14
Quote:
Originally Posted by tbones View Post
If itīs to much work could you provide me a SQL statement to get comment ID, story ID and the number of voters for static analysis?
I'm not sure I understand what you're looking for exactly, but maybe this will help?

SELECT comment_link_id as story_id, comment_content, vote_link_id as comment_id, count(vote_id) FROM pligg_votes, pligg_comments
where vote_type='comments' and pligg_votes.vote_link_id=pligg_comments.comment_id
group by vote_link_id
Reply With Quote
  #6 (permalink)  
Old 06-12-2007, 01:34 PM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
Quote:
Originally Posted by savant View Post
hey tbones, when i have free time and i want to write some features, i'll definitely look at your list.
Hi savant,
good to hear from you! I thought about writiing you, Ash and kbeeveer next weekend to give me a notice whether you work on it, work on bigger things for pligg or just want to spend time in real life. I could live with all alternatives, just to hear something from you after a week of waiting.

I really appreciate your help. Take you all the time you want!
Reply With Quote
  #7 (permalink)  
Old 06-12-2007, 01:42 PM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
Quote:
Originally Posted by dystopia View Post
I'm not sure I understand what you're looking for exactly, but maybe this will help?

SELECT comment_link_id as story_id, comment_content, vote_link_id as comment_id, count(vote_id) FROM pligg_votes, pligg_comments
where vote_type='comments' and pligg_votes.vote_link_id=pligg_comments.comment_id
group by vote_link_id
I donīt have any access to the DB at the moment but this should it be. My original intention was to display in Pligg " Rating: -1 by 11 (users)" instead of " Rating: -1 ", Thank you for your help!
Reply With Quote
  #8 (permalink)  
Old 06-12-2007, 04:41 PM
Pligg Donor
 
Join Date: May 2007
Posts: 14
Quote:
Originally Posted by tbones View Post
I donīt have any access to the DB at the moment but this should it be. My original intention was to display in Pligg " Rating: -1 by 11 (users)" instead of " Rating: -1 ", Thank you for your help!
Ah, I got it. The previous SQL query is more generic and covered all comments/stories. If you're only looking for the vote tally for a specific comment, this is probably closer to what you're looking for:

SELECT vote_link_id, count(vote_id) FROM pligg_votes, pligg_comments
where vote_link_id=2 and vote_type='comments' and pligg_votes.vote_link_id=pligg_comments.comment_id
group by vote_link_id

(replace the 2 in "vote_link_id=2" with your comment_id)
Reply With Quote
  #9 (permalink)  
Old 06-13-2007, 03:35 AM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
Hi dystopia.
your site is cool!

If I take the more specific statement I would need the comment_id like described on #4 of my list above. Dou you have any clue how to realize that in Pligg?
Reply With Quote
  #10 (permalink)  
Old 06-13-2007, 03:06 PM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
Quote:
Originally Posted by dystopia View Post

SELECT comment_link_id as story_id, comment_content, vote_link_id as comment_id, count(vote_id) FROM pligg_votes, pligg_comments
where vote_type='comments' and pligg_votes.vote_link_id=pligg_comments.comment_id
group by vote_link_id
Iīve tried it and it works fine but I forgot to mention that I need also the author (user id) and the list sorted by author. Could you modify it? Thx
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
A proposal for a more robust way of comment deletion. sefs Questions and Comments 0 10-12-2007 05:30 PM
Story Display on other sites Simon Questions and Comments 32 09-25-2007 08:33 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development