solved Displaying Total Vote Count for Profile Rating

MySong
MySong
@mysong
10 years ago
155 posts
Got profile rating working based on https://www.jamroom.net/the-jamroom-network/forum/design-and-skin-customization/3962/artists-by-rating-jrrating-module. Now have it showing up on sidebar of all profiles.

Wondering if there is a way to display the total vote count next to the stars so visitors can know how many times that profile was rated to achieve that average.

I know that with 'item ratings' using the following code will display the total votes..

Total Votes: {$item.audio_rating_overall_count}

I also looked up the needed field in the 'JRprofile Datastore' and it is profile_rating_overall_count or profile_rating_1_count

My question is; how to properly plug that into the above snipit of code so it will display. I have tried quite a few variations including ones using $profile but could not get it to work.

Any idea?

Thanks
updated by @mysong: 09/26/14 12:38:04PM
douglas
@douglas
10 years ago
2,793 posts
Which template are you putting the code in?


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
MySong
MySong
@mysong
10 years ago
155 posts
Skin Templates >
profile_footer.tpl
douglas
@douglas
10 years ago
2,793 posts
Have you tried using the jrCore_get_count function?

https://www.jamroom.net/the-jamroom-network/documentation/development/773/jrcore-get-count


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
MySong
MySong
@mysong
10 years ago
155 posts
Tried

Total Votes: {jrCore_get_count module="jrProfile" item_id=$_profile_id name="profile_rating_overall_count"}

it displays 0

also tried

Total Votes: {jrCore_get_count module="jrProfile" profile_id=$_profile_id name="profile_rating_overall_count"}

it displays 0
douglas
@douglas
10 years ago
2,793 posts
Is profile_rating_overall_count in the profile database, you might try this:

{jrCore_get_count module="jrRating" profile_id=$_profile_id name="profile_rating_overall_count"}


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
MySong
MySong
@mysong
10 years ago
155 posts
Tried that now, still shows count as 0

profile_rating_overall_count is in the jrProfile datastore.


Thanks,
brian
@brian
10 years ago
10,148 posts
There's no need to use get counts for this - it should just be:

{$profile_rating_overall_count}

in the profile_footer.tpl

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
MySong
MySong
@mysong
10 years ago
155 posts
Working :)

Thanks
brian
@brian
10 years ago
10,148 posts
MySong:
Working :)

Thanks

Glad to hear it ;)

Anytime you're in a profile_* template, all the variables for the profile are available without any prefix - i.e. $profile_name, etc.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net