Show Sidebar Log in
Commons In A Box Logo
  • Home
  • About
    • Project Team
    • Logos and Graphics
  • Showcase
    • CBOX Classic Showcase
    • CBOX OpenLab Showcase
  • Demo
  • Get Started
  • Documentation
    • Technical Guide
    • CBOX Classic Guide
    • CBOX OpenLab Guide
  • Support Forums
    • CBOX Classic
    • CBOX OpenLab
    • Developers Forum
  • News

Group Admins

  • Profile picture of Scott Voth

CBOX Classic Support

Public Group active 4 months, 4 weeks ago

This group provides support for Commons In A Box Classic, our original software for community-building. Register for an account or log in to commonsinabox.org, then join the group and post your question here.

Deactivating bbpress in sub-sites

  • This topic has 2 replies, 2 voices, and was last updated 8 years, 6 months ago by Troy Welch.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • November 16, 2016 at 12:36 pm #6133
    Troy Welch
    Participant

    Hi, met with our development team and I’m loaded up on fresh questions.

    We are using the sub-sites in our install for participant portfolios/blogs and are trying to keep things as simple as possible. Because bbpress is network activated through CBox, a set of forum admin items appear on the dashboard menus of sub-sites. It is very unlikely that participants will need forums on the sub-sites, so our aim is to remove the option.

    I can think of four possible ways to approach (actually it can sort of be reduced to two: deactivate plugin or high menu items):

    1. Hide the menu item. I think any version of this solution involves either taking action on each sub-site or writing some code that will do it and leave the main site alone.
    2. Use a plugin, such as Multi-site plugin manager as long as it doesn’t step on CBox. (we may want this anyway as portfolio owners do not have a plugin menu or abilities to turn them on or off for their own sites).
    3. User roles in the sub-site. Site owners are given two roles: Administrator (normal wordpress role) and Keymaster (forum/bbpres role). If the latter is changed to “blocked” it takes the forum off the menu and makes in unavailable.
    4. Using either WP-CLI or some code, change the activation status of bbpress from network to activated only for main site. I’m not sure of the implications of this wrt CBOX, updates, etc.

    My preference is probably approach 2 as it gives use further flexibility. I’m concerned about it stepping on CBox/Buddypress in some way.

    Any thoughts?

    Thanks
    Troy

    November 16, 2016 at 12:47 pm #6134
    Christian Wach
    Participant

    @troy The way it’s been recommended on this forum previously is to create a simple mu-plugin with the following code in it:

    function cbox_remove_forums_from_child_sites( $plugins ) {
    	if ( is_multisite() AND ! is_main_site() ) {
    		unset($plugins['bbpress/bbpress.php']);
    	}
    	return $plugins;
    }
    add_filter( 'site_option_active_sitewide_plugins', 'cbox_remove_forums_from_child_sites' );
    
    November 16, 2016 at 12:54 pm #6135
    Troy Welch
    Participant

    Perfect, thank you very much.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In
Group logo of CBOX Classic Support
  • Home
  • Forum
  • Announcements
  • Docs
  • Members 287
  • Send Invites

Groups

Newest | Active | Popular | Alphabetical
  • Group logo of CBOX Classic Support
    CBOX Classic Support
    287 members
  • Group logo of CBOX Pioneers
    CBOX Pioneers
    71 members
  • Group logo of CBOX Developers
    CBOX Developers
    40 members
  • Group logo of CBOX OpenLab Support
    CBOX OpenLab Support
    22 members
  • Group logo of CBOX-OL Testing Partners
    CBOX-OL Testing Partners
    12 members

CBOX has its roots in the CUNY Academic Commons, which in turn was made possible through funding from The City University of New York itself.

CUNY Logo

CUNY Academic Commons Logo

City Tech logo

The Commons In A Box was made possible through the generous support of the Alfred P. Sloan Foundation.

Alfred P. Sloan Foundation Logo

NEH Logo

The CUNY Graduate Center has directly contributed to the CUNY Academic Commons, housing the project since its inception, and has contributed to CBOX through its GC Digital Initiatives.

CUNY Graduate Center Logo

CUNY Graduate Center Digital Initiatives Logo

Powered by Commons In A Box
css.php
Skip to toolbar
  • About WordPress
    • WordPress.org
    • Documentation
    • Learn WordPress
    • Support
    • Feedback
  • Log In
  • Register