Tagged: All of the videos will embed and post., If a user pastes more than one video URL into the comments text box
Activity plus reloaded version 1.0.6
If a user pastes more than one video URL into the comments
text box , All of the videos will embed and post.If 20 video URL’s are pasted , 20 embeded videos will appear
on on post ! !activity plus will do this with the video upload option
disabled in settings.Is activity plus suppost to work like that ?
I need a small tweek on the code to restrict video to
one embed per post, and to be able to turn off video
embedsThanks for your help !
WebfriendHi,
Thank you for using the plugin.The embedding of video from urls(such as youtube etc) are handled by BuddyPress. Even if you disable activity plus, users will still be able to add video embeds in BuddyPress activity post/comment.
This is not handled by activity plus(we do add a UI for backward compatibility but that is not needed).
Regards
BrajeshHi Brajesh
Wow ! thanks for the quick response, I should have checked
back sooner.I found this on buddydev.com — BuddyPress Tutorials
—-Link
https://buddydev.com/disabling-oembed-support-buddypress-activity/—-Code for wp ( theme functions )
add_filter( ‘bp_use_oembed_in_activity’, ‘__return_false’ );
This stopped buddypress from embedding video with URL in activity post
/ comment., — now video embed functions only when activity plus is used .
Great ! !Could you help with one more thing ? video coming from one
website is causing problems.
How can I tweek activity plus so that it will deny / stop a video embed
coming from a specific domain.com .
In other words — youtube.com , yes / vimeo.com , yes /
dailymotion.com , yes / ——- crazy.com , NO !Thanks for your help !
WebfriendHi,
Thank you for the reply.
I am glad the original issue is resolved.WordPress does not support crazy.com out of the box.
You can remove a service by using the function ‘wp_oembed_remove_provider’ but you will need to know the format used inoembed for the same.
Regards
BrajeshHi,
Thank you for the reply.I investigated ,went into wp includes folder
looked at file– class-oembed.php
there is a block of code with all providers , each one can
be marked, true or falsethe domain giving me problems isn’t in there, some how its working.
do you know of a buddypress or wp plug that will —
add or remove providersis there theme functions or bp-custom.php snip of code that will
add provider or remove provider?Thanks
webfriendHi webfriend,
Is there any chance that the site being embed is also a WordPress site?Regards
BrajeshHi
BrajeshUnknown, used my browsers web developer, all content
paths have been changed by a plug. It is likely wp . they look
like mineyesterday I discoverd that this code in theme functions
add_filter( ‘bp_use_oembed_in_activity’, ‘__return_false’ );doesn’t stop embeds in activity commenting, 20 videos or
more will embed on one commentit doesn’t work at all in bp-custom.php
What this situation needs for all people using
buddypress, is some code to restrict buddypress
to -one- embed per post or commentand a way to block a domain from embeding.
That would be awesome
Thanks webfriend
Thank you for sharing the details.
The replies use different filter than activity post. I will look into it in the day and share.
I may not be able to assist you with domain black listing as there is not a simple filter for that. It is doable but is beyond the time we provide assistance here.Regards
BrajeshHi,
You may use the following code to disable the oembed in activity post and comments.add_filter( 'bp_use_oembed_in_activity', '__return_false' ); add_filter( 'bp_use_embed_in_activity_replies', '__return_false' );
Regards
BrajeshHi
BrajeshThanks, both of these are working in — bp-custom.php
add_filter( ‘bp_use_oembed_in_activity’, ‘__return_false’ );
add_filter( ‘bp_use_embed_in_activity_replies’, ‘__return_false’ );
Embeds are now cut off of buddypress except when using
—- activity plus reloaded—- to post . which limits embeds to
one per post.Mabey somebody at stackoverflow.com will have some code
to filter or blacklist domains / providers from buddypress embeds.if it works I will come back to post it here.
Thanks
webfriend
You must be logged in to reply to this topic.