Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of hnla

Support: Creating & Extending

Existing and new plugins/components and themes.

Buddypress not on themainblog ? (21 posts)

Started 1 year, 5 months ago by: John

  • Profile picture of John John said 1 year, 5 months ago:

    Hello,

    I would like to know if it would be possible to setup buddypress on a secondary blog instead of themainblog in a multi-blogging configuration. If someone could help me understand better the “organigram”, it would be greatly appreciated.

    themainblog / my main blog with the bp nav bar
    blogwithbuddypres.themainblog.com / the blog with the buddypress’s function
    blogname.themainblog.com / a blog from the network with the bp nav bar

    How themainblog and blogwithbuddypress will interact between them and blogname.themainblog.com ? When someone create a blog, what will be the path ? Will it be blogname.themainblog.com or something related to blogwithbuddypress.themainblog.com ?

    Thank for your help.

    Best regards,

  • Profile picture of r-a-y r-a-y said 1 year, 5 months ago:

    Check out this codex article:

    http://codex.buddypress.org/how-to-guides/install-buddypress-on-a-secondary-blog/

    Make sure your WP network is setup as a subdomain.

    Blogs would be created at:
    xxx.themainblog.com

    Interacting should be seamless. BP Admin bar will show up on all sites by default.

  • Profile picture of John John said 1 year, 5 months ago:

    Hello,

    Thanks you very much for helping me.

    I’ve followed your link but I’ve got a problem.

    (3) Keep your old BuddyPress user / group avatars
    I don’t find my file bp-custom.php (at the following location : wp-content/plugins/buddypress/), should I create one or is it at an another location ? I’ve looked but I didn’t find anything.

    (4) Redirect previous BuddyPress permalinks
    I’ve edited my .htaccess but when I click on my name from a comment I’ve made on a post on the blog’s network or if I try to view an activity I end up on the same page : the Members Directory. I’m using the default buddypress theme on the blog.

    Did I make a mistake on my .htaccess ?

    Here’s the path of my installation, using Wamp :
    http://127.0.0.1/themainblog/ – the main blog
    http://127.0.0.1/themainblog/network/ – where buddypress is enabled.
    http://127.0.0.1/themainblog/blogname/ – a blog from the network

    Here’s how I edited my htaccess :

    RewriteEngine On
    RewriteBase /themainblog/
    RewriteRule ^index.php$ – [L]

    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

    RedirectMatch 301 ^/members/(.*)$ http://127.0.0.1/themainblog/network/members/$1
    RedirectMatch 301 ^/groups/(.*)$ http://127.0.0.1/themainblog/network/groups/$1
    RedirectMatch 301 ^/blogs/(.*)$ http://127.0.0.1/themainblog/network/blogs/$1
    RedirectMatch 301 ^/forums/(.*)$ http://127.0.0.1/themainblog/network/forums/$1

    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ – [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*.php)$ $2 [L]
    RewriteRule . index.php [L]

    Best regards,

  • Profile picture of r-a-y r-a-y said 1 year, 5 months ago:

    bp-custom.php resides in /wp-content/plugins/, not /wp-content/plugins/buddypress/.

    Also just to confirm, are you using a subdirectory install?

  • Profile picture of John John said 1 year, 5 months ago:

    I have no bp-custom.php in wp-content/plugin/, I’ve got a hello.php and index.php.
    Yes, for now I can only use a subdirectory install. Wamp doesn’t support subdomains.

  • Profile picture of r-a-y r-a-y said 1 year, 5 months ago:

    You need to create a file called “bp-custom.php” in /wp-content/plugins/.

    Make sure you create the file with opening and closing PHP tags:

    [?php

    //the code

    ?]

    Replace square brackets with triangular ones.

  • Profile picture of John John said 1 year, 5 months ago:

    Here’s how I created the file :

    [?php
    define( 'BP_AVATAR_UPLOAD_PATH', 'http://127.0.0.1/themainblog/wp-content/blogs.dir/1/files' );
    define( 'BP_AVATAR_URL', 'http://127.0.0.1/themainblog/' );
    ?]

    Should I reinstall buddypress directly on http://127.0.0.1/themainblog/network/ ?
    Maybe this will fix my problems ?

  • Profile picture of r-a-y r-a-y said 1 year, 5 months ago:

    You’re missing the BP_ROOT_BLOG define.

    Can you quicky go over part (1) in the codex article and add that to your bp-custom.php?

    http://codex.buddypress.org/how-to-guides/install-buddypress-on-a-secondary-blog/

  • Profile picture of John John said 1 year, 5 months ago:

    I’ve added define ( ‘BP_ROOT_BLOG’, 9 ); (9 is themainblog/network)

    But I’ve already defined it in wp-config.php, I’ve add it to bp-custom.php but there is no change.

  • Profile picture of r-a-y r-a-y said 1 year, 5 months ago:

    Ahh okay, wp-config.php is better actually.

    Did you activate BuddyPress network-wide?
    Also, did you enable the BuddyPress Default theme on blog id #9?

  • Profile picture of John John said 1 year, 5 months ago:

    Yes but I didn’t had to activate it, it was already network activated (It was previously “linked” to http://127.0.0.1/themainblog/).
    I’ve enabled the theme on blog #9.

  • Profile picture of r-a-y r-a-y said 1 year, 5 months ago:

    Can you try removing the redirect rules from step (4)?

    So, at the moment, what do you see when you go to /themainblog/network?

  • Profile picture of John John said 1 year, 5 months ago:

    I’ve removed the redirect rules.

    At themainblog/network/ there’s the default buddypress theme but when I click on a member’s activity for example I always end up ion the member directory page, If i click on a name from activity It’s getting me to the same page.

    On the activity page, I’ve got two path of link :
    http://127.0.0.1/themainblog/network/members/admin/ – when I’ve posted an update after the relocation of buddypress
    http://127.0.0.1/themainblog/members/admin/ – the old links from the latest updates I’ve posted on my original buddypress installation

  • Profile picture of r-a-y r-a-y said 1 year, 5 months ago:

    We can worry about redirects later, but does BuddyPress function well besides the old activity links?

  • Profile picture of John John said 1 year, 5 months ago:

    The functions seems to be here, but look likes there’s a rewrite redirect problem.

    I can post update, I’ve created a group, I’ve tried to post into it but I had a “There was an error when creating the topic”.

    The links from the nav bar all redirect to the members directory.