[buddypress-trac] [BuddyPress Trac] #6026: Single items for the Blogs component.

buddypress-trac noreply at wordpress.org
Wed Jul 27 16:59:24 UTC 2016


#6026: Single items for the Blogs component.
------------------------------------+-----------------------
 Reporter:  imath                   |       Owner:  imath
     Type:  enhancement             |      Status:  assigned
 Priority:  normal                  |   Milestone:  2.7
Component:  Blogs                   |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |
------------------------------------+-----------------------

Comment (by imath):

 Here comes the step 2 (6026.smaller-steps.02.patch). You'll need to apply
 the "step 1" patch (6026.smaller-steps.01.patch) before this one.

 This patch first fix an issue i've missed in step 1 when a member has no
 site and improves the `bp_blogs_get_site()` also introduced in step 1.

 Then, you'll begin to see the Site single item :) In this patch i mainly
 focused on the Single site's navigation. As you remember it was a blocker
 a few months ago.
 I chose to leave the current `bp_core_*_nav_item` functions the way they
 were because i wasn't sure to understand what was done there and i was too
 afraid to break something in the User or Group's nav.
 Actually, the more i've tried to understand, the more i thought we
 shouldn't manage the screens access inside the functions that are building
 the navs. So this patch is illustrating an alternative way of managing the
 screens access. Moreover as i've chosed to use a Nav and a Subnav for the
 Sites i think it's a good practice if one day we want to use a main nav
 and a sub nav for the Groups (currently it's a subnav only).

 The key function is `bp_blogs_set_site_screens()`. I'm hooking
 `bp_template_redirect` before `bp_redirect_canonical` to be sure to be
 able to edit the canonical url just like we're doing in the two others
 single items. Then i manage the screens according to the URI and also set
 the current active nav and subnav. For this last point, i've introduced
 `bp_core_edit_nav_item()` to have a shortcut to
 `buddypress()->blogs->nav->edit_nav()`.
 I've also edited `bp_core_create_nav_link()` so that the link generated by
 it for the primary nav can be something else than the loggedin_user_domain
 (eg: the current group or site links).

 The rest of the patch is about the single site screens and templates. I
 still need to take care of:
 - subscriptions, Site settings, avatar and cover image,
 - add a new user subnav to list the activities of the sites the user
 subscrived to, add another one inside the Activity directory,
 - add screen and email notifications.

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


More information about the buddypress-trac mailing list