How do you limit the # of times a profile appears on a ranking?

iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
11 years ago
517 posts
In JR4, there was a ranking filter that would limit the number of times a profile could appear in a ranking.

For instance, let's say I have a "Top 20" song ranking, and let's say the same artist shows up 4 times (w/ 4 different songs) in that list. I want to limit it to 2. Or 1 even. How does that look in the JR5 side?

Thanks!
updated by @ilovehousemusic: 03/31/14 09:18:26AM
douglas
@douglas
11 years ago
2,806 posts
You can use a group_by parameter in your jrCore_list function...

{ jrCore_list module="jrAudio" group_by="profile_name" etc... }

That should show a single song from each artist.

Hope this helps,
Douglas


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
11 years ago
517 posts
Thanks @douglas! So just so I understand that better,
If I have ArtistA w/ three songs:

song1 - 80 plays
song2 - 65 plays
song3 - 10 plays

This listing would generate a list for top 20 songs, in the past 7 days, in audio_genre xxxx, and limit ArtistA to 1 listing - which would be song1?

{jrCore_list module="jrAudio" chart_field="audio_file_stream_count" group_by="profile_name" chart_days="7" search1="audio_genre = {$audio_genre}" template="index_list_songs.tpl" pagebreak="20" require_image="audio_image" page=$_post.p}
douglas
@douglas
11 years ago
2,806 posts
Are you getting any results?

It should actually be something like:

{ jrCore_list module="jrAudio" chart_field="audio_file_stream_count" chart_days="7"  group_by="profile_name" search1="audio_genre = `$audio_genre`" template="index_list_songs.tpl" pagebreak="20" require_image="audio_image" page=$_post.p}

note that I changed the "{" around the audio_genre variable to back ticks "`", which you must do if you use a variable inside double quotes.


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos

Tags