Skip to:
Content
Pages
Categories
Search
Top
Bottom

using $blogusers = get_users_of_blog(); to filter bp displayed info

  • @anointed

    Participant

    In my non-ending quest to ‘mu’ buddypress so that each of my blogs can have their ‘own’ buddypress, I’ve come to a roadblock.

    Basically my premise is simple.

    1. I have buddypress multiblog set to true, so that each blog on my mu install can have bp enabled in their site itself.

    2. I use the wpdev plugin so that members can register on a subdomain blog in mu without ever leaving the subdomain. That way they show up as a user of the blog as well as my blog id#1 default one.

    3. The key is I only want bp information such as activity/members lists/groups/forums/etc. that were created by users of the blog in question to be displayed. (think ning)

    So after days of reading through the wp codex, I think I found the function that will work:

    $blogusers = get_users_of_blog();

    It seems that is the function used by mu to display the users of a blog in the admin panel when viewing the blogs on my mu network.

    Where I am stuck:

    I’m guessing that the best approach is to filter all the bp functions for grabbing information via the get_users_of_blog so that only posts/members/groups/forums/etc that were generated by the users of the blog is displayed.

    I’m curious if it’s possible to have a general ‘overall’ function that would filter everything in bp through the users of blog function. (what a dream that would be)

    Or if I need to manually create a filter for all the bp functions independently, that would suck lol.

    Does this look like a good approach to use to ‘mu’ buddypress, or is there an easier way to do this?

    If I do indeed have to filter all the functions independently, I’m guessing that there are only a few that I actually need to deal with in order to filter the ouput. Is there a list of those functions that would need to be filtered, or am I on my own to read through all the bp code and figure out which to filter and which not to…

Viewing 5 replies - 1 through 5 (of 5 total)
  • @anointed

    Participant

    Just so it’s clear why I am trying to do this.

    I host a small amt of client sites on my server. In the past I used to use wordpress non-mu for each site. Frankly I got really tired of having to update 30-40 separate wordpress installs everytime there was a new vs of wp or plugins that were used. That is where wpmu really saved me time, one install one update for all clients.

    I know that I can simply create multiple wpmu/bp installs and give each client their own install, but then I’m in the same boat as before I started using mu.

    Having buddypress the way it is now, there is no way I can see to give each blog that wants their ‘own’ buddypress an install without having to install multiple copies of mu again.

    Having grown accustomed to only having to maintain one codebase has really spoiled me, and I’m willing to do just about anything not to have to go back to the old way of sep installs.

    @headmine

    Participant

    I am looking to do the same exact thing. I’ve searched this forum up and down to try and figure this out but I don’t know if it can be done. If it can it would be really helpful. Hopefully someone knows how to do it!

    @anointed

    Participant

    @Headmine — JJJ had responded to some of my prior posts about this same thing, and he believed it is possible. So instead of just flooding him with a bunch of questions I spent the past few weeks reading through the codex and the bp code to see if I could figure it out on my own.

    At this point I am unsure which direction to go, but I’m confident it can be done. Honestly, once people realize what I am asking for I’m pretty certain it will become a highly requested feature.

    In a nutshell it would give us the ability to run our own social networks independent of each other.

    @headmine

    Participant

    Yep, basically since buddypress is a plugin it should work as a plugin and other blogs should have the choice to use it or not, or as the webmaster, you should be able to choose which blogs have it and which blogs don’t. Seems like a simple idea. I’ve spent weeks on this as well.

    But your approach seems to be in the right direction. $blogusers = get_users_of_blog(); Are you using one template or multiple templates for each site?

    @anointed

    Participant

    Right now the only way to really have it on some sites and not others is to simply give the sites that don’t want bp a theme that is not bp capable. Then for the sites you want to use bp, simply assign them a theme with the bp functionality in it.

    The problem comes into play in that if site ‘abc’ has bp enabled and so does site ‘xyz’ then site ‘abc’ will see not only their activity/groups/etc but the activity from ‘xyz’ as well. Kind of ruins it. That is why I am trying to figure out how to filter the data output to only data relevant to the site being displayed.

    Not sure what you mean by one template per site. Running bp requires a ton of templates just like the base bp theme has.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘using $blogusers = get_users_of_blog(); to filter bp displayed info’ is closed to new replies.
Skip to toolbar