Replies
- Ravi on December 21, 2023 at 8:30 am in reply to: [Resolved] No Error Message when required field in billing or shipping address stays empty #51180
Hello Rudolf,
I am working on it and will update you at the day end.
Regards
Ravi - Ravi on December 21, 2023 at 5:45 am in reply to: Trying to integrate WP ULike with MediaPress #51178
Hello,
I have tried the following code:
function mpp_wpulike_show_button() { if( function_exists( 'wp_ulike' ) ) { echo wp_ulike('put'); } } //show it on single media page add_action( 'mpp_media_meta', 'mpp_wpulike_show_button' ); //show it in lightbox add_action( 'mpp_lightbox_media_meta', 'mpp_wpulike_show_button' );
It is working for me.
Regards
Ravi - Ravi on December 20, 2023 at 12:02 pm in reply to: Trying to integrate WP ULike with MediaPress #51173
Hello,
Please try the following code:
function mpp_wpulike_show_button() { if( function_exists( 'wp_ulike_put_posts' ) ) { echo wp_ulike_put_posts(''); } } //show it on single media page add_action( 'mpp_media_meta', 'mpp_wpulike_show_button' ); //show it in lightbox add_action( 'mpp_lightbox_media_meta', 'mpp_wpulike_show_button' );
Regards
Ravi Hello Cordial,
Please upgrade to the latest version of MediaPress i.e. 1.5.9 and use the following code:
add_filter( 'mpp_upload_prefilter', function ( $file ) { if ( ! isset( $file['type'] ) || ! isset( $file['size'] ) ) { return $file; } // 1 MB in byte. $mb_in_byte = 1 * 1000000; if ( strstr( $file['type'], 'video/' ) && $file['size'] > 10 * $mb_in_byte ) { $file['error'] = __( 'video upload limit is 10MB' ); } elseif ( strstr( $file['type'], 'image/' ) && $file['size'] > 1 * $mb_in_byte ) { $file['error'] = __( 'image upload limit is 1MB' ); } return $file; } );
Please give it a try
Regards
RaviHello,
Thank you for the acknowledgement. The above shared code only works on the galleries directory page. If you want to modify the gallery title at all other places. Please remove the ‘mpp_is_gallery_directory() &&’ from the code and give it a try.
Regards
Ravi- Ravi on December 20, 2023 at 7:15 am in reply to: [Resolved] Buddypress Activity plus post limit #51170This reply has been marked as private.
- Ravi on December 19, 2023 at 9:34 am in reply to: Trying to integrate WP ULike with MediaPress #51164
Hello,
Sorry for the inconvenience. Please give it a try after switching to default WordPress default. Your theme might be causing the issue.
Please let me know if it works or not.
Regards
Ravi Hello,
Please try the following code:
add_action( 'mpp_before_gallery_entry', 'buddydev_modify_gallery_title' ); remove_action( 'mpp_after_gallery_entry', 'buddydev_modify_gallery_title', 10 ); function buddydev_modify_gallery_title() { add_filter( 'mpp_get_gallery_title', function ( $title, $gallery_id ) { if ( mpp_is_gallery_directory() && mpp_is_wall_gallery( $gallery_id ) ) { $gallery = mpp_get_gallery( $gallery_id ); if ( 'groups' === $gallery->component ) { $title = sprintf( '%s wall gallery', bp_get_group_name( $gallery->component_id ) ); } else { $title = sprintf( '%s wall gallery', bp_core_get_user_displayname( $gallery->user_id ) ); } } return $title; }, 10, 2 ); }
Please give it a try and let me know if it helps or not.
You can put this code in ‘bp-custom.php’ file. For more info check the following URL:
https://buddydev.com/docs/buddypress-guides/what-is-bp-custom-php/
Regards
Ravi- Ravi on December 18, 2023 at 1:34 pm in reply to: [Resolved] Buddypress Activity plus post limit #51160
Hello,
Sorry for the delayed reply. I am working on it and will update you soon.
Regards
Ravi Hello,
Thank you for posting. I will check if we can modify the gallery name by user name on the galleries directory. I will update you soon.
Regards
Ravi