Rtmedia in buddypress profile

Hi,

I added the following in the home.php of the buddypress profiles:

I basically want users to add content under the profile tabs.

Though the uploader appears, both the select files button and the drop space do not work.

Can you please have a look at this?

Thanks,

Laurent.

Hi laurent,
to view uploader and gallery under profile tab, you should add this code into profile.php file

<?php rtmedia_gallery(); ?>  
<?php rtmedia_uploader(); ?>

We tried it on our end, and is working fine. Is there any js error you are facing?

Hi,

Thanks for your quick reply.
I may have a js issue on the website as the submit button doesn’t work.
On another note, I want only to show media that is uploaded on that specific page and not everything that the user uploaded. How do I define the context here?

thanks,
L.

@laurent, yes you can add custom context in shortcode. Right now in profile, gallery shortcode accepts profile context even if you give custom context. It will be fixed in next release.

You can add custom context like,

<?php $user_id = bp_displayed_user_id(); ?>  
<?php rtmedia_uploader(array('context'=> "my_profile", 'context_id'=> $user_id)); ?>  
<?php rtmedia_gallery(array('context'=> "my_profile", 'context_id'=> $user_id)); ?>  

It’s working!
Thanks a lot!

Laurent and Ritesh,

I'm wanting to do a similar thing as Laurent, but am not certain on how exactly to go about it since I'm a newbie to WP and BP. Just to be clear, I simply want a user's uploaded photos (which they've uploaded via the Media tab) to be displayed in the Profile section immediately following the user fields. Currently on my site, each user's photos appear within the Media tab under Photos section. I want all of those photos to now appear on the Profile tab and be publically visible whenever anyone clicks on a given user's profile.

You guys mentioned above that the home.php and profile.php files needed to be modified. Are you referring to the files located in the following path?

/buddypress/bp-templates/bp-legacy/buddypress/members/single/

I would greatly appreciate it if someone could tell me specifically the path location and all the files that need to be modified with additional code added to accomplish this. Thank you!

@gwonwp, You need to override BuddyPress templates for that and apply your custom changes in you theme only. Do not change any file in plugin as all the changes will vanishes in next update of that plugin.

@gwonwp, Copy all the buddypress files in your theme and alter them there. I simply copied the folders within the theme folder and it works.

Hallo. How can I show only albums in this case. Not all media gallery.

@supergrower, you need to add one more parameter to specify media type. <?php rtmedia_gallery(array('context'=> "my_profile", 'context_id'=> $user_id, 'media_type' => "album")); ?>

Unfortunatly doesnt work. This code shows all media gallery again.

@supergrower, sorry, my bad. It will only show media gallery for photos, videos, audio etc. It won't accept media_type = album attribute.

So, the question is open: How to show albums (titles) in profile instead all media gallery in profile? Is it possible?

Can support help me?

Bump. We are having the same issue.

@supergrower, Well it require some custom modification.

@Charles, What issue you are facing?

HELP!

<?php rtmedia_gallery(); ?> <?php rtmedia_uploader(); ?> <?php do_action( 'bp_after_profile_content' ); ?>

This code is not working in new version! There are no media now in profile. Example: http://fotofotografov.ru/photographers/malgazhdarov/

Use this code for media gallery

<?php rtmedia_gallery( array( 'context' => 'profile', 'context_id' => bp_displayed_user_id() ) ); ?>

Thank you for your job!

Hallo!
The error is appeared in new version:
Fatal error: Call to undefined function rtmedia_gallery() in /home/s/stnefe/fotofotografov.ru/public_html/wp-content/themes/plexus/buddypress/members/single/profile.php on line 53

Please, help to solve the problem.