Music Player

Is it possible to move the music player into the profile tab. If it’s a matter of moving lines of code, I can handle that. Let me know.

Hi Susan,
Can you give me some more detail exactly what you want to achieve?

My name is Travis, I’m actually the design for the site that is being
worked on.

What I would like to do is on the profile page for a user, if a user has
uploaded mp3’s I would like the player to show up on the profile tab. I
have the profile page set so that that profile tab is the default to show
up when going on the page, I would like the music player to be in that tab
so it comes up first without someone having to go into the media tab and
all that to get to the player.


Hi Travis,
Please check this support thread -> it will help.

You just need to change this line
$results = $model->get(array(‘media_type’ => ‘photo’, ‘context’ => ‘group’, ‘context_id’ => $group_id), 0, $n);
to this
$results = $model->get(array(‘media_type’ => ‘music’, ‘context’ => ‘profile’, ‘context_id’ => bp_displayed_user_id() ), 0, $n);
and then you need to bind media element player to this music gallery.

Check this link -> it will help you to bind media element player.

What file is that line that needs to be changed in? I searched my entire plugins folder and didn’t find that line. Also I’m not completely sure what you mean by bind the player to gallery.

Hi Susan,
have you checked the first link I gave you in my last reply?? In that code you need to change that line. You need to add custom code to achieve this in your theme.

Bind the player to music gallery means, you need to manually assign media element js to the music files.

Hey Travis (on Susan’s account).
Where you able to accomplish this, I am interested in something similar.


Hi Yonah,

Can you tell me what you are trying to accomplish?