[buddypress-dev] Re: Primary Blog ID

Andy Peatling andypeatling at automattic.com
Wed May 21 00:51:12 GMT 2008


On 19-May-08, at 5:55 PM, Andy Peatling wrote:

> @ Anday
>
>> "*It should render the details for the blog owner. Basically, the  
>> ID for the
>> user that has defined that blog as their primary blog. Your primary  
>> blog has
>> a user icon next to the tab in the admin area. That is where your  
>> profile
>> details will show. I believe I'm right in thinking a blog can only  
>> have one
>> primary user assigned to it?"*
>>
>> But unfortunately, I found it is possible to assign a blog as the  
>> primary
>> blog to many users, I  just tried it on my wpmu v1.5.1 site, in  
>> this case, "
>> *blog owner -* *the ID for the user that has defined that blog as  
>> their
>> primary blog"* mechanism will get problem.
>
> Hmm, I'm sure this was not the case on my installation. We will need  
> to find a way to work around / address this if the above is correct.

We have found a workaround to this (actually Matt did) that will fix  
the issues with blog owners and profiles. Instead of invoking the  
$authordata variable and using that to render the profile, we are  
matching the blog domain/path to the user.

So, if you visit "andy.buddypress.org" it will take the "andy" part  
and display the profile for the user "andy". That way, only the  
profile for the user that signed up with this blog will be shown. You  
can still assign new administrators/contributors/authors etc etc, but  
the owners profile will only ever show.

I've made this change and it seems to be working well for both  
subdomains and subfolders. It should also in theory fix the problems  
people have been having with links, pages and categories.

I will be checking this in shortly, and hoping to tag a v0.2 of the  
extended profile component ASAP. We still have a bunch of bugs to fix  
with some new feature additions.

---------
Andy Peatling | Social Engineer | Automattic
http://andyinlife.com





More information about the buddypress-dev mailing list