Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3441 closed defect (bug) (no action required)

Testing defines in bp-custom on 1.5

Reported by: modemlooper's profile modemlooper Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Core Keywords: reporter-feedback
Cc:

Description

These Work:

define ( 'BP_ENABLE_ROOT_PROFILES', true );
define( 'BP_DEFAULT_COMPONENT', 'profile' );
define ( 'BP_DISABLE_ADMIN_BAR', true );
define( 'BP_DTHEME_DISABLE_CUSTOM_HEADER', true );
define( 'BP_SILENCE_THEME_NOTICE', true );
define ( 'BP_FRIENDS_SLUG', 'peeps' );
define ( 'BP_AVATAR_THUMB_WIDTH', 50 );
define ( 'BP_AVATAR_THUMB_HEIGHT', 50 );
define ( 'BP_AVATAR_FULL_WIDTH', 150 );
define ( 'BP_AVATAR_FULL_HEIGHT', 150 );
define ( 'BP_AVATAR_DEFAULT_THUMB', $img_url );
define ( 'BP_AVATAR_DEFAULT', $img_url );

These do not:

define ( 'BP_XPROFILE_SLUG', 'info' );
define( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE', true );
define ( 'BP_ACTIVITY_SLUG', 'streams' );

Root component slugs can be changed via page permalink but for backcompat should the old method be available? Root sub slugs such as /user/friends/ can be changed with a define.

These still need testing:

define ( 'BP_ROOT_BLOG', $blog_id );
define ( 'BP_FORUMS_PARENT_FORUM_ID', $forum_id );
define ( 'CUSTOM_USER_TABLE', $tablename );
define ( 'CUSTOM_USER_META_TABLE', $tablename );

Change History (14)

#1 @DJPaul
13 years ago

CUSTOM_USER_TABLE / CUSTOM_USER_META_TABLE are WordPress core defines. We shouldn't have ever used them, and we don't in BP 1.5.

#2 @boonebgorges
13 years ago

define ( 'BP_ACTIVITY_SLUG', 'streams' );

should still work for the middle of URLs, eg
http://example.com/members/modemlooper/streams/just-me

If it doesn't, it's a bug.

URLs like http://example.com/streams (where 'streams' is what we are calling a 'root_slug') are handled by page slug, as you correctly note. Because we are using $wp_query to catch those page requests, there is no non-hackish way to provide backpat in those cases.

If define ( 'BP_XPROFILE_SLUG', 'info' ); doesn't work, that's also a bug. Will have to investigate.

#3 @DJPaul
13 years ago

I've just tested Boone's BP_ACTIVITY_SLUG example and it does work in the middle of URLs.

#4 @boonebgorges
13 years ago

I just tested
define('BP_XPROFILE_SLUG', 'info');
and it works as expected: profile links become
http://example.com/members/boonebgorges/info

DJPaul, isn't BP_ENABLE_USERNAME_COMPATIBILITY_MODE your best friend? :)

#5 @DJPaul
13 years ago

modemlooper, what user name, or user login, or user nice name or whatever you tried, do you expect to work when compat mode is set, that doesn't? I assume it manifests itself as a non-functional link somewhere?

#6 @modemlooper
13 years ago

Lemme test again, I just upgraded from trunk. Are you using bp-custom or functions? It would be better to use bp-custom as that file doesn't get overwritten on upgrades.

#7 @boonebgorges
13 years ago

I was using wp-config.php, but bp-custom.php should have the same effect.

#8 @modemlooper
13 years ago

It's not working for me for any root slugs

placed: define ( 'BP_ACTIVITY_SLUG', 'streams' );

in wp-config functions and bp-custom and it did not change the slug.

EDIT:

If i change the slug of 3rd party component then it doesn't show you the directory it shows you the wordpress page.

Example: change Achievemtents slug to badges and it shows you a wordpress page called achievements and the url is still /achievements

Last edited 13 years ago by modemlooper (previous) (diff)

#10 @boonebgorges
13 years ago

Again, by design, this method of setting root slugs has been deprecated with bp-pages. Just to make sure we're on the same page terminologicially:

http://example.com/groups                /my-group-name/members
                  [$bp->groups>root_slug]               [$bp->members->slug]

Slugs can be overridden in the old manner. Root slugs cannot; they must be changed by altering the WP page permalink.

Example: change Achievemtents slug to badges and it shows you a wordpress page called achievements and the url is still /achievements

That's probably because Achievements hasn't been updated to do things the right way, ie http://bpdevel.wordpress.com/2011/01/18/component-slug-vs-root_slug-in-bp-1-3/

#11 @modemlooper
13 years ago

Oh wait, see that now we need to change roots with permalink.

Ok, it's working ok was confused by the tab names not changing on profiles when slug changes.

Last edited 13 years ago by modemlooper (previous) (diff)

#12 @johnjamesjacoby
13 years ago

  • Keywords reporter-feedback added

Okay to close this?

#13 @boonebgorges
13 years ago

  • Resolution set to invalid
  • Status changed from new to closed

#14 @johnjamesjacoby
13 years ago

  • Milestone Awaiting Review deleted

Moving closed ticket out of Awaiting Review.

Note: See TracTickets for help on using tickets.