Support » Plugin: Bowe Codes » Display private/hide group forum topics

  • Resolved sielwolf

    (@sielwolf)


    Hi imath,
    first tnanx a lot for your brillant and usefull plugin(s). Very clean and strong work.

    I m searching to display a list of group forum topics where a user is a member it works well. But it show me only public forum topics.
    I m building a private dashboard where users can see all their bp actions in one sight.

    Thanx a lot for your kind attention and keep your very good work !

    http://wordpress.org/extend/plugins/bowe-codes/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello thanks for your interest. Well i guess, you can try to simply make an activity custom loop in your dashboard, then you’ll have all the bp_actions at once.

    the args of the loop would be something like

    if( bp_has_activities( array( 'user_id' => bp_loggedin_user_id() ) ) :
    
    while ( bp_activities() ) : bp_the_activity();
    
    // your code
    
     endwhile;endif;

    If i open the current shortcode the way you want, it may expose private content if the admin misses a step, and i don’t want to take this risk.

    I’m sorry i’m quite busy right now, and this plugin needs to be upgraded as since BuddyPress 1.7, more users will be using bbPress 2.3 and they will be right 😉

    Thread Starter sielwolf

    (@sielwolf)

    Thanx a lot Imath I will check that asap.
    I will just use this code in a private dashboard. I understand the risk, but a lot of my groups are private and I want to use title of post only for “teasing”

    Thanx again for your attention !

    Hello @sielwolf

    FYI, i just upgraded Bowe Codes, and if/when you (will) have BuddyPress 1.7+ installed you should update the plugin. It’s now easier to filter the shortcode attributes in order to customize the plugin to fit your needs.

    This is what i’ve tested in the function.php file of my theme to display the forum topics of an hidden group :

    /*
    In the Shortcode Editor, make sure to add the class "sielwolf_class" in the bc_activity Css class field
    */
    function sielwolf_wants_show_private_group_forums( $activity_args, $shortcode_args ) {
    
    	if( $shortcode_args['class'] == 'sielwolf_class' ) {
    		$activity_args['show_hidden'] = true;
    
    		/* if you want to display topics from a particular group */
    		$activity_args['object'] = 'groups';
    		$activity_args['primary_id'] = 2;
    
    		var_dump( $activity_args );
    	}
    
    	return $activity_args;
    }
    
    add_filter( 'bowe_codes_activity_tag_arg', 'sielwolf_wants_show_private_group_forums', 10, 2 );

    Hope it’ll help you achieve your dashboard 😉

    Hi!

    I was looking for doing a similar action.

    I need to show private groups activity but only vissible by their members. Maybe at homepage.

    Is it possible? I tried that function.php code but have an error message: array(6) { ["action"]=> string(15) "activity_update" ["max"]=> int(5) ["per_page"]=> int(5) ["show_hidden"]=> bool(true) ["object"]=> string(6) "groups" ["primary_id"]=> int(2) }

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display private/hide group forum topics’ is closed to new replies.