[buddypress-trac] [BuddyPress Trac] #6772: BuddyPress Embeds for activity, user profiles, groups

buddypress-trac noreply at wordpress.org
Wed Dec 16 08:03:34 UTC 2015


#6772: BuddyPress Embeds for activity, user profiles, groups
------------------------------------+------------------
 Reporter:  imath                   |       Owner:
     Type:  idea                    |      Status:  new
 Priority:  normal                  |   Milestone:  2.5
Component:  API                     |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |
------------------------------------+------------------

Comment (by imath):

 @r-a-y i've just tested so here is my first feedbacks :)

 About DJPaul's concerns on the maturity of the embed-template.php i think
 the WP tickets @netweb shared in his first comment are worthing to be
 favorited and followed.

 Then i think it's important we check our `BP_Embed` class because i think
 if `bp_activity_embed_add_oembed_provider()` is needed that's because of
 this class. WP's class has changed its behavior in 4.4 authorizing by
 default "discover" and BP_Embed is not. A good way to figure this out is
 to do this
 {{{
 add_filter( 'embed_oembed_discover', '__return_false' );
 }}}
 and you'll see that WP Editor won't build the Post Embed Box anymore. And
 another good reason to look at it is Embedding a post into the Activity
 Stream is failing.
 But this might be another ticket's story :)

 The improvements you added in 02.patch are really, really interesting:
 great work. Maybe there's something to improve again, because if i do
 `http://site.url/members/imath/activity/2/?embed=true` everything is
 great, but if i do `http://site.url/members/imath/activity/2/embed/` then
 the content is displayed but `true === is_404()`. And i wonder if as
 BuddyPress is not supporting "unpretty" permalinks if the second url is
 better...

 About the new embed directory in `bp-template/bp-legacy/buddypress`, i
 think i would have put the new templates into the assets directory, but
 it's a detail :)

 I think maybe we should 'bp_' prefix the `embed_content` hook inside your
 template as it's used by WordPress, or maybe use a specific template tag
 instead.. But maybe you did it on purpose to let any plugin adding content
 to post embeds to also put this content into the activity embeds ?

 I saw css.php was temporary :)

 First targetting the Activity object seems logic, but i have a fiew
 concerns on this/your approach:
 1) i don't know if it's possible but maybe we should try to abstract some
 functions. @r-a-y if i wanted to add embeddable profile i would have to
 create a bp-members-embeds.php and copy/paste/adapt most functions of bp-
 activity-embeds.php ? Could it be possible to have a bp-core-embeds.php
 containing a set of functions components could use to "register" their
 embed support ?

 2) it's also very complex object to start with imho, here are some issues
 your 2 patches are not dealing with :
 - A spammed activity keeps on being displayed into the post it's embed
 into.
 - A deleted activity is displayed like this :
 [[Image(https://cldup.com/ifdINSuL0q.png)]]
 - When an activity contains an embed code like youtube, and is embed into
 a post, we get a black screen
 [[Image(https://cldup.com/0ooFwl5OZz.png)]]
 - to embed an activity, we need to open the single view, copy the Url, and
 put it in a WordPress site. We don't get the "not powered by WordPress
 embed code". For my plugin i've added a button to get it, i think it can
 be interesting to have it too so that it's more user friendly to embed a
 BuddyPress content :) here's an example of what i'm doing in my plugin:
 https://flic.kr/p/Ca26Zr

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6772#comment:9>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list