Context within buddypress profile page


#1

Hi,

I’m using the Achievements plugin with buddypress and I want to add rtmedia in that specific tab within the profile pages.

Right now I’m using:

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

This however doesn’t work. Once a user upload pictures it becomes visible in all the profiles.
What should I change in the code?

Thank you,
Laurent.


#2

Hi Laurent,

It seems to be some issue. Context is getting set to profile. We will look into it and will be updated in future release.


Displayed group gallery shortcode
#3

Thank you!


#4

Hi Laurent,

I tested again with this code

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

and the context getting set is achievements. It is working fine.
In previous testing I haven’t set $user_id that’s why it is making issue.


#5

It’s working.
Thanks a lot!!!


#6

I am glad to know that your issue is fixed :slight_smile:


#7