solved jrCharts - How would I put my top ten songs in the media player?

MAD
MAD
@madc
10 years ago
600 posts
I want to add a player to a page on my site showing the top ten songs from the charts module.
What code would I use?
This is the code I am using now for a list of random artists but would rather pull in the top 10

{jrCore_media_player type="jrAudio_player_dark" module="jrAudio" field="audio_file" order_by="audio_title random" limit=12 autoplay=true} 



--
~ https://punkbandpromotions.com ~
Check us out for all your Punk/Alternative Music!
Check us out on Facebook:- https://facebook.com/PunkBandPromotion

updated by @madc: 04/20/14 06:21:23PM
paul
@paul
10 years ago
4,326 posts
In the template that the jrChart calls to list the items there will be an $_items array with all the chart tracks in. I think you can use that in the player -

{jrCore_media_player type="jrAudio_player_dark" module="jrAudio" field="audio_file" items=$_items autoplay=true}


--
Paul Asher - JR Developer and System Import Specialist
MAD
MAD
@madc
10 years ago
600 posts
I am not using it in the charts templates @paul.
I am using it on for example the homepage.
What code would I need to pull it into the homepage?
Do I have to use a literal section?


--
~ https://punkbandpromotions.com ~
Check us out for all your Punk/Alternative Music!
Check us out on Facebook:- https://facebook.com/PunkBandPromotion
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
I haven't tried this with a player, but I'm guessing this in index.tpl:
{jrCore_list module="jrAudio" chart_field="audio_file_stream_count" chart_days="7" template="song_chart_player.tpl" require_image="audio_image" limit=10}

And then this in song_chart_player.tpl (in the skin dir):
{if isset($_items)}
    {jrCore_media_player type="jrAudio_player_dark" module="jrAudio" field="audio_file" items=$_items autoplay=true} 
{/if}



--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 03/11/14 03:38:56AM
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
If it's a new chart you won't see anything until after the daily maintenance check has run so add the code, refresh the page, then wait. Though if you've already created that chart elsewhere you should see the results straight away.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
MAD
MAD
@madc
10 years ago
600 posts
Thanks @SteveX
Worked PERFECTLY!
A bit thrown about the skin tpl file until I went ...Derrr....create it you d%#$ lol
Cheers for that worked perfect and gave me a bit more insight how to manipulate the jrAudio module!
+4 beers owed ;)


--
~ https://punkbandpromotions.com ~
Check us out for all your Punk/Alternative Music!
Check us out on Facebook:- https://facebook.com/PunkBandPromotion

Tags