Skip to:

Re: How to get all Group nav items?

Sven Lehnert


Hi Boone Gorges, thanks a lot for your replay.

This is exactly the situation.

If you are in the group loop, it gives you back the group nav items depends on the settings and user rights.

But this does not help me.

For the SEO plugin I’m writing I need to know where the components could be.

It doesn’t matter, if there is a forum in a specific group or not.

There can be a forum so I have to SEO it.

For example:

If you have the group_document plugin installed, this plugin ads a menu item to groups, “Documents”.

So I have to SEO Group/Documents/.

If the group admin turns of group_documents, its just for this specific group. But in other groups there will be group_documents, and need SEO.

So for my case I am just interested in the components and where they are used.

I have nearly the logic. Just the groups are missing.

Lets have a look at the group_document component as example:

It’s not in $bp->root_components, so its not a root component

links, members, register, activate, search, blog, blogs, forums, groups, events, activity,

It’s in $bp->active_components, so it must be somewhere…

settings, activity, blogs, friends, groups, messages, wire, profile, status, events, group_documents, links, forums,

It’s not in $bp->bp_options_nav, so its not a profile component.

settings, friends, links, activity, blogs, groups, messages, wire, profile, events,

Also I can check if this component for example has a wire:

echo "<br>has a wire?<br>";
foreach ( (array)$bp->active_components as $key => $value ) {
if ($bp->$value->table_name_wire){
print_r( $value );
echo ', ';

In this case (groups, profile, events, links) have a wire.

But how can I find out if this component will below to groups?

My idea was to look at the unfiltered group nav items….

Sorry for my terrible English.

It’s always my problem. I hope you understand what I tried to say, and one of you have an idea.

Skip to toolbar