#3441 closed defect (bug) (no action required)
Testing defines in bp-custom on 1.5
Reported by: | 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)
#2
@
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
@
13 years ago
I've just tested Boone's BP_ACTIVITY_SLUG example and it does work in the middle of URLs.
#4
@
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
@
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
@
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.
#8
@
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
#10
@
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/
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.