[buddypress-trac] [BuddyPress Trac] #6026: And if the Blogs component had Single items?

buddypress-trac noreply at wordpress.org
Wed Nov 19 15:32:12 UTC 2014


#6026: And if the Blogs component had Single items?
--------------------------+------------------------------
 Reporter:  imath         |       Owner:
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Blogs         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |
--------------------------+------------------------------
Description changed by imath:

Old description:

> That's the question that came to my mind reading DJPaul's notes about
> your discussions at [http://bpdevel.wordpress.com/2014/11/12/at-wcsf-
> some-attendees-of/ WCSF14]. Here’s the points about the Blogs component :
>
> 1. We like the existing integration into user profile (blogs you’re part
> of).
> 2. We should add integration into groups (aka the groupblog plugin).
> 3. Discoverability of blogs is hard to do because of limited info from
> WP, and of likelihood of integration of external tools for sites that try
> to do this (e.g. elasticsearch).
> 4. Rename component away from “site tracking”.
> 5. Directory:
>  a. add blavatar. (avatars for blogs)
>  b. there are some minor improvements/tweaks we can make to the template.
>  c. add a “subscribe to blog” button and show it perhaps in a user’s
> activity stream, or on a new profile tab.
>
> So unlike a previous ticket about "Avatar attachments" where i
> misunderstood the notes, this time i haven't built a patch but an
> experimental plugin :)
>
> My goal was to explore if it could be interesting to add single items to
> the Blogs component. How would it look like? Behave? What could be the
> features ?
>
> The "fear" that led me into the plugin direction was the second point of
> the list where DJPaul is talking of the Groupblog plugin integration. Is
> it a way to have Groups to manage the different other blogs features
> listed ? If so, then simply set this ticket as invalid :)
>
> The [https://github.com/imath/bp-blogs-extended BP Blogs Extended] plugin
> i wrote this last few days is suggesting an (or improving the) answer on
> points : 1., 3., 5.a., 5.c. and building it, it gave birth to questions
> or potential improvements about some BuddyPress areas such as the use of
> {{{bp_nav}}} and {{{bp_options_nav}}}
>
> ==== Home of the Blogs single item ====
>
> For this kind of single item, in order to improve the “Discoverability of
> blogs”, i think it’s really interesting to rely on the subsite widgets.
> So the plugin includes by default a front.php template, but it’s not
> loading like it’s the case for the Groups component. It’s loading only if
> at least one widget is added into a specific sidebar widgets (created by
> the plugin) from the subsite widgets Administration.
>
> [[Image(https://farm6.staticflickr.com/5602/15819415871_c07377ef91_z.jpg)]]
> https://flic.kr/p/q6UDcv
>
> The widgets approach can be interesting to give the member visiting this
> “Site profile” page a “taste” of what he will find in the Site. Here’s a
> screen shot as an example, where i’ve added 1 text widget and 3 other
> widgets (''latest forum topics*'', latest posts, recent comments)
>
> [[Image(https://farm9.staticflickr.com/8534/15201865713_77bf67d3c0_z.jpg)]]
> https://flic.kr/p/pakx3Z
>
> ''*for plugin’s generated widgets it requires the plugin to be network
> activated or activated on the subsite and on the root site''
>
> ==== Type of Sites ? ====
>
> BuddyPress is hiding from the sites directory the blogs having a
> “blog_public” option not set to 1 (discourage search engines). So i’ve
> defined a first type “Hidden”. Hidden are only accessible to their
> members and it’s not possible to subscribe to these types of sites.
>
> Then, i’ve defined a second type “Lock”, where subscriptions are not
> possible, but members of the community can discover the content of the
> blogs single item.
>
> Then the last type is “Open”, subscriptions are possible.
>
> ==== What to do in these single items ? ====
>
> Apart from discovering the home page, eventually have the curiosity to
> see who are members of the site using the Members tab, People can view
> the Site’s activity (Posts, Comments... tracked by the Blogs component)
> and if the Administrator of the blog defined from the Manage tab of his
> single item a specific setting, members can publish “Site Updates” and
> react to them using the activity features. Else, the administrator can be
> the only one to publish Site’s updates. @mention suggestions will only
> look into the Blogs single item members.
>
> [[Image(https://farm8.staticflickr.com/7496/15201865703_e622c48310_z.jpg)]]
> https://flic.kr/p/pakx3P
>
> BTW, the plugin is modifying the way BuddyPress is tracking “hidden”
> site’s posts. If a site is “hidden” (discourage search engines)
> activities will be generated using the “hide_sitewide” mode. Members will
> be able to see them from the Site’s single item or from the Sites tab of
> the Activity Directory.
>
> ==== My favorite part : settings (Manage tab of the single item) ====
> A site administrator can define some WordPress properties
> (name/description) as they are in the single item’s header.
> He can :
> - set his preferences about subscriptions and Site Updates.
> - edit the (discourage search engines) setting.
> - And if you are using the WP Debug mode, you’ll see that i’ve explored a
> way to allow these administrators to define what post types to track for
> their blog. This list of post types could be stored as
> bp_blogmetas…(#5669 and #3460)
>
> [[Image(https://farm8.staticflickr.com/7493/15636125477_c980b28004_b.jpg)]]
> https://flic.kr/p/pPHemi
>
> ==== Blavatar (#192) ====
> The second manage tab is to set the Site’s avatar, the same way it’s
> possible for a user or a group.
>
> [[Image(https://farm9.staticflickr.com/8408/15797638686_0b0c7a8716_z.jpg)]]
> https://flic.kr/p/q4Z2AN
>
> PS: I was a bit annoyed by #5999 so i’ve changed the posted var to
> ‘w_crop’... to avoid the notices.
>
> Again, maybe like in the “avatar attachments” ticket, i’m completely
> wrong about this and you will decide to not rely on a single item for the
> new Blogs features you’ve discussed of at WCSF14, but it was fun to build
> this plugin and i have some thoughts to share with you.
>
> 1. {{{bp_nav}}} / {{{bp_options_nav}}} should be restricted to Members
> component navigation. In the plugin, to avoid slugs collisions (#5103),
> i’ve copy pasted these two navs and tried to init some “container”
> component nav (groups,blogs?).. See the navbar.php file of the plugin.
> 2. Groups custom front feature should be improved (not by using widgets),
> but by avoiding disabling the activity tabs if a group has a custom
> front.
> 3. Point 1 of WCSF14  notes : “Blogs you’re a part of”. Actually, so far
> it’s “Blogs you’re an admin of” The plugin is suggesting a way to really
> have “you’re a part of”.
> 4. The {{{bp_get_blog_avatar}}} filter is happening once the admin’s
> avatar was fetched, it could be interesting to have a
> {{{bp_pre_get_blog_avatar}}} before this avatar is fetched to allow
> plugins such as the one i’ve described in this ticket to fetch the
> blavatar and directly returns it.
> 5. Custom updates, the filter could be improved : #6021
> 6. BP_Blogs_Blog class could also be improved, for the plugin’s need i
> was forced to filter {{{bp_current_user_can}}} to achieve my goal. That’s
> the reason why i’m only doing my filters if WP_DEBUG is true. Without
> this filter a member of an hidden blog cannot access to his single item
> :(
>
> This is it, i’d be happy to work on a patch to bring this “Blogs single
> item” into core if you think it’s interesting, else i really like the
> plugin !
>
> If you want to test it : https://github.com/imath/bp-blogs-extended
> (define WP_DEBUG to true to see all features)
>
> PS: BP Theme compat only.

New description:

 That's the question that came to my mind reading DJPaul's notes about your
 discussions at [http://bpdevel.wordpress.com/2014/11/12/at-wcsf-some-
 attendees-of/ WCSF14]. Here’s the points about the Blogs component :

 1. We like the existing integration into user profile (blogs you’re part
 of).
 2. We should add integration into groups (aka the groupblog plugin).
 3. Discoverability of blogs is hard to do because of limited info from WP,
 and of likelihood of integration of external tools for sites that try to
 do this (e.g. elasticsearch).
 4. Rename component away from “site tracking”.
 5. Directory:
  a. add blavatar. (avatars for blogs)
  b. there are some minor improvements/tweaks we can make to the template.
  c. add a “subscribe to blog” button and show it perhaps in a user’s
 activity stream, or on a new profile tab.

 So unlike a previous ticket about "Avatar attachments" where i
 misunderstood the notes, this time i haven't built a patch but an
 experimental plugin :)

 My goal was to explore if it could be interesting to add single items to
 the Blogs component. How would it look like? Behave? What could be the
 features ?

 The "fear" that led me into the plugin direction was the second point of
 the list where DJPaul is talking of the Groupblog plugin integration. Is
 it a way to have Groups to manage the different other blogs features
 listed ? If so, then simply set this ticket as invalid :)

 The [https://github.com/imath/bp-blogs-extended BP Blogs Extended] plugin
 i wrote this last few days is suggesting an (or improving the) answer on
 points : 1., 3., 5.a., 5.c. and building it, it gave birth to questions or
 potential improvements about some BuddyPress areas such as the use of
 {{{bp_nav}}} and {{{bp_options_nav}}}

 ==== Home of the Blogs single item ====

 For this kind of single item, in order to improve the “Discoverability of
 blogs”, i think it’s really interesting to rely on the subsite widgets. So
 the plugin includes by default a front.php template, but it’s not loading
 like it’s the case for the Groups component. It’s loading only if at least
 one widget is added into a specific sidebar widgets (created by the
 plugin) from the subsite widgets Administration.

 [[Image(https://farm6.staticflickr.com/5602/15819415871_c07377ef91_z.jpg)]]
 https://flic.kr/p/q6UDcv

 The widgets approach can be interesting to give the member visiting this
 “Site profile” page a “taste” of what he will find in the Site. Here’s a
 screen shot as an example, where i’ve added 1 text widget and 3 other
 widgets (''latest forum topics*'', latest posts, recent comments)

 [[Image(https://farm9.staticflickr.com/8534/15201865713_77bf67d3c0_z.jpg)]]
 https://flic.kr/p/pakx3Z

 ''*for plugin’s generated widgets it requires the plugin to be network
 activated or activated on the subsite and on the root site''

 ==== Type of Sites ? ====

 BuddyPress is hiding from the sites directory the blogs having a
 “blog_public” option not set to 1 (discourage search engines). So i’ve
 defined a first type “Hidden”. Hidden are only accessible to their members
 and it’s not possible to subscribe to these types of sites.

 Then, i’ve defined a second type “Lock”, where subscriptions are not
 possible, but members of the community can discover the content of the
 blogs single item.

 Then the last type is “Open”, subscriptions are possible.

 ==== What to do in these single items ? ====

 Apart from discovering the home page, eventually have the curiosity to see
 who are members of the site using the Members tab, People can view the
 Site’s activity (Posts, Comments... tracked by the Blogs component) and if
 the Administrator of the blog defined from the Manage tab of his single
 item a specific setting, members can publish “Site Updates” and react to
 them using the activity features. Else, the administrator can be the only
 one to publish Site’s updates. @mention suggestions will only look into
 the Blogs single item members.

 [[Image(https://farm8.staticflickr.com/7496/15201865703_e622c48310_z.jpg)]]
 https://flic.kr/p/pakx3P

 BTW, the plugin is modifying the way BuddyPress is tracking “hidden”
 site’s posts. If a site is “hidden” (discourage search engines) activities
 will be generated using the “hide_sitewide” mode. Members will be able to
 see them from the Site’s single item or from the Sites tab of the Activity
 Directory.

 ==== My favorite part : settings (Manage tab of the single item) ====
 A site administrator can define some WordPress properties
 (name/description) as they are in the single item’s header.
 He can :
 - set his preferences about subscriptions and Site Updates.
 - edit the (discourage search engines) setting.
 - And if you are using the WP Debug mode, you’ll see that i’ve explored a
 way to allow these administrators to define what post types to track for
 their blog. This list of post types could be stored as bp_blogmetas…(#5669
 and #3460)

 [[Image(https://farm8.staticflickr.com/7493/15636125477_c980b28004_b.jpg)]]
 https://flic.kr/p/pPHemi

 ==== Blavatar (#192) ====
 The second manage tab is to set the Site’s avatar, the same way it’s
 possible for a user or a group.

 [[Image(https://farm9.staticflickr.com/8408/15797638686_0b0c7a8716_z.jpg)]]
 https://flic.kr/p/q4Z2AN

 PS: I was a bit annoyed by #5999 so i’ve changed the posted var to
 ‘w_crop’... to avoid the notices.

 Again, maybe like in the “avatar attachments” ticket, i’m completely wrong
 about this and you will decide to not rely on a single item for the new
 Blogs features you’ve discussed of at WCSF14, but it was fun to build this
 plugin and i have some thoughts to share with you.

 1. {{{bp_nav}}} / {{{bp_options_nav}}} should be restricted to Members
 component navigation. In the plugin, to avoid slugs collisions (#5103),
 i’ve copy pasted these two navs and tried to init some “container”
 component nav (groups,blogs?).. See the navbar.php file of the plugin.
 2. Groups custom front feature should be improved (not by using widgets),
 but by avoiding disabling the activity tabs if a group has a custom front.
 3. Point 1 of WCSF14  notes : “Blogs you’re a part of”. Actually, so far
 it’s “Blogs you’re an ~~admin~~ {{{bp_blogs_get_allowed_roles()}}} of” The
 plugin is suggesting a way to really have “you’re a part of”. But i guess
 it's easier to filter {{{bp_blogs_get_allowed_roles()}}} to also include
 subscribers.
 4. The {{{bp_get_blog_avatar}}} filter is happening once the admin’s
 avatar was fetched, it could be interesting to have a
 {{{bp_pre_get_blog_avatar}}} before this avatar is fetched to allow
 plugins such as the one i’ve described in this ticket to fetch the
 blavatar and directly returns it.
 5. Custom updates, the filter could be improved : #6021
 6. BP_Blogs_Blog class could also be improved, for the plugin’s need i was
 forced to filter {{{bp_current_user_can}}} to achieve my goal. That’s the
 reason why i’m only doing my filters if WP_DEBUG is true. Without this
 filter a member of an hidden blog cannot access to his single item :(

 This is it, i’d be happy to work on a patch to bring this “Blogs single
 item” into core if you think it’s interesting, else i really like the
 plugin !

 If you want to test it : https://github.com/imath/bp-blogs-extended
 (define WP_DEBUG to true to see all features)

 PS: BP Theme compat only.

--

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


More information about the buddypress-trac mailing list