[SOLVED] CB Rating count and log info

12 years 9 months ago - 12 years 9 months ago #168410 by userbk
I started to use your Rating plugin, which is, as usually, cool and functional.
I have two questions about it:
1. Where is the count of how many users rates the member, That information is obviously vital if a user has 5 stars, he/she could get there easily with one vote, so we need a count
2. I enabled logging of the rater's info. Where can I view hat information?

Tnx,
BK

Please Log in to join the conversation.

12 years 9 months ago #168645 by krileon
Replied by krileon on topic Re: CB Rating count and log info

1. Where is the count of how many users rates the member, That information is obviously vital if a user has 5 stars, he/she could get there easily with one vote, so we need a count

As far as I am aware there is no counter. It displays overall rating through the stars.

2. I enabled logging of the rater's info. Where can I view hat information?

There's no frontend or backend viewing for this information. It's stored within your database in table _comprofiler_ratingfield_log.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

12 years 9 months ago #168687 by userbk
Replied by userbk on topic Re: CB Rating count and log info
Hey K,

I'm guessing the star rating is an average calculated according to rating divided by how many people voted, right? Is there a way I can display how many people voted just next to the stars? like ***** (75 votes).

How do I do that?

Have a good week,
BK

Please Log in to join the conversation.

12 years 9 months ago #168725 by krileon
Replied by krileon on topic Re: CB Rating count and log info

How do I do that?

As stated earlier there's no feature in the rating field for this. You'd need to edit the source code of the field (which I can't assist with) or you could use for example incubator project CB Query Field which allows displaying the results of a database query as a field. You could use that to query the database for the vote count.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

12 years 9 months ago #168978 by userbk
Replied by userbk on topic Re: CB Rating count and log info
Alright, I downloaded it and installed.
Any chance you could tell me what the query is to display that information? Once I have that example I will know how to query other fields.
thnx, bk

Please Log in to join the conversation.

12 years 9 months ago #168989 by krileon
Replied by krileon on topic Re: CB Rating count and log info

Any chance you could tell me what the query is to display that information? Once I have that example I will know how to query other fields.

Any valid MYSQL will work; except substitutions and Joomla syntax is also supported (example #__ for table prefix instead of jos_). Below query will pull vote count.
SELECT COUNT(*) FROM `#__comprofiler_ratingfield_log` WHERE `rateduserid` = [user_id]


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.393 seconds

Facebook Twitter LinkedIn