Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Displaying members favorite activities

@colabsadmin

Participant

Sorry I thought I was clear. I dont need an example of how to create the tab and the submenus.

What I did was write a class that creates a top level member area tab called Favorites that consolidates all types of favorites within a single tab. https://github.com/colabsadmin/bp-favorites/blob/master/bp-favorites.php

The submenus that have been created so far are Activity, Topics, Posts and a few more for some CPTs that I’ve written. This will make it easier for my users to find their favorites when they cant remember if it came from a topic, posts, activity, etc. Instead of jumping around from tab to tab, its all in one tab. The only submenu that doesnt work is Activity. The code, which I provided in my first question, was copied directly from Buddypress core code with one change to use ‘bp_core_new_subnav_item’. I used similar code to display content in all the other submenus. For example, the following shows the favorite topics

// Favorite topics
bp_core_new_subnav_item( array(
		'name'            => __( 'Topics', 'kleo' ),
		'slug'            => "topics",
		'parent_url'      => $bp->displayed_user->domain . $bp->bp_nav['favorites']['slug'] . '/',
		'parent_slug'     => $bp->bp_nav['favorites']['slug'],
		'screen_function' => 'bbp_member_forums_screen_favorites',
		'position'        => 10,
		'item_css_id'     => 'favorites'
));

So, my question, does bp_activity_screen_favorites() only work within the context of /members/membername/activity action? Or can it be used elsewhere as in /members/membersname/favorites?

Skip to toolbar