Viewing 4 replies - 16 through 19 (of 19 total)
  • Plugin Author Andrea Landonio

    (@lando1982)

    Hi Alex, seems to be okay!!! I don’t know how the “gdbbx_is_topic_private” function works be I think it’s good…
    For the forum (ps: remember I’m not expert with bbPress ?? ) should exists simalr hooks, like:

    bbp_new_forum
    bbp_edit_forum

    You can do quite the same operation checking if forum is private….

    Thread Starter Alex Stine

    (@alexstine)

    Hello,

    I wrote this snippet to get the job done.

    function exclude_private_forums_search() {
    	$forum_id = bbp_get_forum_id();
    	if (get_post_status($forum_id) == 'private') {
    		add_post_meta($forum_id, 'acs_exclude', 1, true );
    	} else {
    		delete_post_meta($forum_id, 'acs_exclude');
    	}
    }
    add_action('bbp_new_forum', 'exclude_private_forums_search' );
    add_action('bbp_edit_forum', 'exclude_private_forums_search' );

    Now the only thing I can’t seem to figure out is exclude the topics that are inside a private forum. Is there anyway to get topic IDs based off of forum id?

    Might be a better question for bbpress.org, I always start in plugin sub forum though.

    @lando1982 I am by no means a bbPress expert either. I’m learning as we go here. Your support has been great, a nice learning experience for me.

    I hope others also will benefit from the code I wrote out here along with the action hooks provided.

    Thanks.

    Plugin Author Andrea Landonio

    (@lando1982)

    Hi Alex, bbPress is very complex, I think should exists a way to get topic IDs based off of forum id.. but as you say ?? it’s a question for bbPress support.. or you can look bbPress docs..

    Thanks to you ??

    Thread Starter Alex Stine

    (@alexstine)

    Okay, I’ll ask question over there.

    Great plugin!

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Compatible with BBPress’ is closed to new replies.