WordPress.org

Ready to get started?Download WordPress

Forums

Content Aware Sidebars
Will the plugin work with BuddyPress Group and Forum? (10 posts)

  1. pinkdreambox
    Member
    Posted 1 year ago #

    Hi,

    Will Content Aware Sidebars work with BuddyPress's Group and Group Forums?

    So different Group will have different sidebars according to the conditions set in the plugin's setting.

    Thanks,

    http://wordpress.org/extend/plugins/content-aware-sidebars/

  2. Joachim Jensen (Intox Studio)
    Member
    Plugin Author

    Posted 1 year ago #

    I have not yet tested the plugin with BuddyPress, but you are free to try it out yourself and get back to me with your experience.

    If Groups and Group Forums are made of Custom Post Types, then most likely it will work. In any case the plugin won't break your site and can easily be removed.

  3. pinkdreambox
    Member
    Posted 11 months ago #

    Although there is a BuddyPress Groups condition available in the Content Aware Sidebars setting.

    But individual groups did not show up, so we can not set the conditions for the specific group for the sidebar we created.

    Hope the next version of the plugin will provide the functions.

    Thanks.

  4. Muhammad Muhaimin
    Member
    Posted 11 months ago #

    I got the same problem.
    So maybe the groups and forums are not singular or archive, maybe they are something different.
    Do we have to do a manual "add_filter"?
    I hope not.

  5. Joachim Jensen (Intox Studio)
    Member
    Plugin Author

    Posted 11 months ago #

    Right now only BuddyPress Member components are supported, i.e. you can set sidebars for the specific sections in a BuddyPress user profile, including the Groups section.

    While it is possible for you to use the filters in the plugin (though they are not yet documented at all, sorry) it is on the roadmap to add support for BuddyPress Groups.

    The old BuddyPress Group Forum component has been retired in the newest versions of BuddyPress and unfortunately I will not add support for these. Instead you should install bbPress and enable Group Forums this way (which BuddyPress also recommends). As bbPress Forums are already supported, bbPress Group Forums should be as well, though it has not been tested.

    I hope this helps.

  6. pinkdreambox
    Member
    Posted 10 months ago #

    Thanks for the reply.

    I look forward for the new feature for BuddyPress Groups.

    And will try if the sidebar will work with the bbPress Group Forums.

  7. Muhammad Muhaimin
    Member
    Posted 10 months ago #

    I use both BuddyPress and bbPress.
    Simple Facebook Connect plugin can replace WP avatar with FB profile picture if a user has connected his/her WP account with FB account in profile settings page.
    This FB profile picture is displayed in toolbar, Sidebar Login plugin, posts, comments, and bbPress, but not in BuddyPress.

    So I modified functions.php in my child theme.
    We can get FB profile picture URL if we know its FB user ID.
    And we can get FB user ID if we know its WP user ID.
    But there is no single way to get WP user ID for all BuddyPress pages. Every component has its own way, even in one page.
    In activity post and comment post forms, they use bp_loggedin_user_id().
    In other components, usually a global variable is used.
    For example:
    In members directory
    global $members_template;
    $user_id = $members_template->member->id;
    In activity streams
    global $activities_template;
    $act_uid = $activities_template->activity->user_id;
    $com_uid = $activities_template->activity->current_comment->user_id;

    But after I used preg_replace() for user avatar in some components, it also changed avatars in other places, like sidebar.
    I didn't like it, so I needed some limits for every avatar changes.
    Then I found a WP function do_action() is used in some places in BuddyPress.
    With function did_action(), we can retrieve the number of times an action is fired.
    So I used them as my limits. One did_action() before the component, and one did_action() after the component.

  8. Muhammad Muhaimin
    Member
    Posted 10 months ago #

    From the above story, I think did_action() is useful to recognize pages.
    Content Aware Sidebars is not compatible with the BP Group pages. Maybe we can use this one:
    did_action('bp_before_group_header');

    For example:
    $bp_group = did_action('bp_before_group_header');
    if ($bp_group) {
    // do sidebar changing
    }

    Is there any chances to do it?

  9. Joachim Jensen (Intox Studio)
    Member
    Plugin Author

    Posted 10 months ago #

    Thanks for your insight and example. BuddyPress Groups will be supported sometime, but I do currently not have time to develop and push out new versions of the plugin.

  10. strangechild
    Member
    Posted 5 months ago #

    I'm trying to find a work around for this exact issue. And I'm wondering if anyone out there has any other tips. I am new to PHP and don't completely understand Muhammad's example.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic