Skip to:
Content
Pages
Categories
Search
Top
Bottom

BP widgets in subblogs


  • daleks
    Participant

    @daleks

    I want my BP homepage to be on a sub-blog – this is fine except that the BP widgets are not showing up – only the ‘online users’ widget is available.

    Is this because BP is designed to be based from the top level blog or should all of the widgets be available? Everything else seems to be working as it should.

    I have searched the forums to answer this question with no success – but I hope I am not repeating a topic.

Viewing 9 replies - 1 through 9 (of 9 total)

  • Deadpan110
    Member

    @deadpan110

    Yes BP is designed to work on $blog_id = 1 but there is no reason you can’t copy the widgets and create your own.

    Perhaps in future versions of BuddyPress, you will be able to set where you want BuddyPress to be hosted along with the ability to set widgets as global or single blog.

    (we also would like to let our future users use some of the widgets – but are working on a few other bits and pieces atm – I might create a patch when I free up some time)

    I have searched the forums to answer this question with no success – but I hope I am not repeating a topic.

    I really like everything about BuddyPress and its users – social networking for social people, I think I speak for everybody when I say ‘ask your question anyway and someone will try and answer’ :)


    Burt Adsit
    Participant

    @burtadsit

    EDIT: post deleted ’cause somebody said the same thing just a few minutes before me.


    daleks
    Participant

    @daleks

    Sweet – thanks for that; exactly what I wanted to know! I’ll just work around this for now, maybe will look into it again later. Really impressed by how extensive and well done BP is by the way – good times!


    daleks
    Participant

    @daleks

    So just as a reference for anyone else – I ended up having a quick look at the widget files… if you feel led to base your BP home page on a sub-blog all you need to do is open the widgets php file (i.e. ‘bp-blogs-wigets.php’) and find the condition that limits it to blog id = 1. change the 1 to the ID for the desired blog and your sorted. (There were two instances of this within the file to be changed).

    I’m sure you could just take the limiting factor out too – but I took the easy path.

    GOOD TIMES!!


    gogoplata
    Participant

    @gogoplata

    I did the same as daleks and can confirm it works like a charm.


    raddad
    Member

    @raddad

    This has been driving me up the wall for a couple of days…Appreciate it DeadPan!

    Works great.


    Michael Berra
    Participant

    @miguael

    Perfect – except one thing: it doesn’t show me the newest Blog-Entries or Activities anymore in the widget. What could be the reason?


    Burt Adsit
    Participant

    @burtadsit

    The Recent Blog Posts and the Site Wide Activity widgets both have code that restricts them to blog id 1.

    The Recent Blog Posts widget lives in the mu-plugins/bp-blogs/bp-blogs-widgets.php file. There are two of those nasty blog id 1 checks at line #8 and line #30. Same thing exists in the mu-plugins/bp-activity/bp-activity-widgets.php file.

    If you want ‘News’ to work in the home theme then modify themes/buddypress-home/functions.php on lines #49-#50. I just commented them out.

    I’m guessing that the thinking behind this restriction is “Get it to work first, then get it to work everywhere”. Kinda like narrowing the possibilities for problems that are gonna exist anyway, down to something trackable. If you browse the forums here and on wpmu you quickly see that wpmu can be installed in about 97 different ways on 205,478 hosts. Slap on a major component like buddyPress, then let noobs like me loose upon the face of the world who want to play with my toys ‘my way’ and I understand the thinking. :)


    gogoplata
    Participant

    @gogoplata

    miguael – You probably just need to modify blog and activity widget files to reflect the new blog ID. Those files have two ID checks, not just one. Even if it had to be done manually, I wish we could allow them to appear on multiple blogs, not just one. I was able to accomplish this on several widgets but I haven’t been able to remove the second ID check from the blogs or activity widgets.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘BP widgets in subblogs’ is closed to new replies.
Skip to toolbar