Skip to:
Content
Pages
Categories
Search
Top
Bottom

activity loop filtering – bbpress topics and replies not shown

  • @quan_flo

    Participant

    Hi,

    because the search function could not answer my question I’ll try to post it here.

    I want to use some filters for the activity page. For example friendships should not be shown.

    To hide some stuff bp needs to know what to show.

    part of my activity-loop.php:

    if (bp_has_activities(bp_ajax_querystring('activity').'&object=groups,profile,status,blogs')) :

    Doinig this also hides forum postings and replies..

    What kind of comma separated object types have to be added to show all new topics and replies, too?

    I tried forum, forums, topic, topics, replies, reply (…) but I could not get topics and replies shown in the activity page…

    Thanks for your help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • @quan_flo

    Participant

    I found the solution myself. A look into the database for the activity items opened my eyes..

    The opject type for bbpress topics and replies is bbpress. Maybe this will help someone else in future…

    @biswadip

    Participant

    OK I have got as far as you, identifying the bbpress object as the one for forum topics and replies.

    Now say that I have a list of forum and/or topic id’s. How do I get the topics for the forum id’s or the replies for the topic id’s?

    Best

    Bis

    @biswadip

    Participant

    We can then use a BBpress topic loop to loop with the forum id’s and save the data into arrays for further use like this:

       
    $forum_ids = bbp_get_user_subscribed_forum_ids( bp_loggedin_user_id() ) ;
    $topic_ids = bbp_get_user_subscribed_topic_ids( bp_loggedin_user_id() ) ;
    
    for ($n=0;$n < count($forum_ids); $n++) { 
    	if ( bbp_has_topics( array( 'author' => 0, 'show_stickies' => false, 'order' => 'DESC',        'post_parent' => $forum_ids[$n], 'posts_per_page' => 10 ) ) ) :
    
                while ( bbp_topics() ) : bbp_the_topic();
                    array_push ($forums2array['title'], bbp_get_topic_title());
                endwhile; 
    
            endif;  
        }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘activity loop filtering – bbpress topics and replies not shown’ is closed to new replies.
Skip to toolbar