Rtmedia in buddypress profile


#1

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.


#2

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?


#3

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.


#4

@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)); ?>  

#5

It’s working!
Thanks a lot!


#6

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!


#7

@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.


#8

@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.


#9

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


#10

@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")); ?>


#11

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


#12

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


#13

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


#14

Can support help me?


#15

Bump. We are having the same issue.


#16

@supergrower, Well it require some custom modification.

@Charles, What issue you are facing?


rtMedia: On "Profile-Site"
#17

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/


#18

Use this code for media gallery

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


#19

Thank you for your job!


#20

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.