Replies
- Brajesh Singh on August 23, 2016 at 2:02 pm in reply to: Migrating from BuddyPress Album to MediaPress #5242
Hi Lavish,
My apologies in advance.
We have no plans to create any migrator for BP Album or BuddyPress media(RT media). They are not worth the effort.These plugins have very convoluted schema/code making it difficult to understand their data schema.
If someone is interested, we will help on the MediaPress side of the things(How to add media to MediaPress) but that’s all. you will need to find a developer to do the rest.
Thank you
Brajesh - Brajesh Singh on August 23, 2016 at 8:46 am in reply to: [Resolved] Extended Code for Private Site #5237
You are most welcome Hans 🙂
- Brajesh Singh on August 22, 2016 at 8:12 pm in reply to: [Resolved] How do you get all the available values for a xprofile field (checkbox or select #5233
Hi Jaume,
I am glad it did 🙂 You are most welcome John 🙂
Hi John,
Thank you for the details.I have slightly modified your code
function change_default_settings_tab() { $bp = buddypress(); bp_core_new_nav_default( array( 'parent_slug' => $bp->settings->slug, 'subnav_slug' => 'accountdetails', 'screen_function' => 'your_function_that_loads_templates' //change it ) ); } add_action( 'bp_settings_setup_nav', 'change_default_settings_tab', 5 );Note the ‘screen_function’ key. Please make sure to pass your screen function that loads the template( which you used while registering the nav item). Also, subnav slug only needs the slug not the complete parent/child.
Please let me know if it worked for you or not?
Thank you
BrajeshHi John,
Can you please post the complete code? Use bp_get_template_part instead. bp_core_load_template calls exit so it only loads the first template.Here is a way to do it
1. Use bp_core_load_template to load our custom file
2. In the custom file use bp_get_template_part to load both the files.Hope that helps.
Regards
Brajesh- Brajesh Singh on August 22, 2016 at 7:10 pm in reply to: How to Use Third Party Lightbox Plugin to Open Images #5225
Hi Simon,
No problem.
I will post it as a small plugin on github today/tomorrow. - Brajesh Singh on August 22, 2016 at 6:25 pm in reply to: [Resolved] Extended Code for Private Site #5224
Hi Hans,
Thank you for posting.To be honest, I will not recommend in going to that direction and I will explain why.
1. If you want to prevent images from being visible to anyone, we can either move images to outside the webroot or use htaccess to disable the webserver rendering it.
2. Once we do the above step, we will need php to read the image file depending on who is accessing them(using some sort of route) and that is highly resource intensive and inefficient.
Even Facebook does not do it. Yes, you can access private media directly if you have access to the correct url.
I will rather recommend file name obfuscation(there are many plugins) and using seo plugins to avoid indexing of media files.
Hi Dandy,
Thank you. We will have the Featured widget in a week available. I will find some time this weekend and look at the integration of the above tool. As far as I see, It should be doable.- Brajesh Singh on August 22, 2016 at 5:59 pm in reply to: [Resolved] How do you get all the available values for a xprofile field (checkbox or select #5222
Hi Jaume,
Welcome back.
It’s a good question. Since there does not exist any functions, I wrote one for you
/** * @param int $field_id Field ID * * @return array of options */ function buddydev_xprofile_get_field_options( $field_id ) { $field = xprofile_get_field( $field_id ); $options = $field->get_children(); return wp_list_pluck( $options, 'name' ); }You can put this function in your bp-custom.php or functions.php and then call it like this
print_r( buddydev_xprofile_get_field_options ( 17 ) );17 is field id. Change it with your own field. In case of non multi field, It will give you an empty array.
Hope that helps.
Regards
Brajesh