A lot of the BP URL processing is done by component — components register their base URL part (in this case ‘groups’), and provide functions to process the URL and screen redirects.
If you look in bp-groups-loader.php you can see where the slug is set up, and a walk through of the code in bp-groups-screen.php will show you how the screens are being called.
I’m fairly sure but can’t remember for certain, that BP is grabbing the URLs and processing them, before passing any ‘non-BP’ urls to the standard WP URL rewrite arrays for processing.
[Edit: You may be able to hook in before this happens, and do your group processing]. We’ve done this on one of our sites, but I can’t remember the details off the top of my head.
However, how are you going to recognise the endpoint as a group, as opposed to a standard WP page or post? Are you planning to have a test that gets the endpoint and checks whether it is a group name?
p.s. uk-chess-group? Are you going to be at the British in next couple of weeks?
Thanks for shedding some light. I’ve been able to re-arrange the permalink structure correctly, now to look at processing the new format.
I will have to do a lookup based on group slug in the wp_bp_groups table unless I can see a cleaner way of checking.
No sorry! Just used chess as an example!
I’ve achieved the same by hooking into “bp_uri” and “bp_get_group_permalink”
i have the same problem, please share your solution!
thanks