The MU forums have moved to WordPress.org

Main blog with personal satelite blog suggestions... (3 posts)

  1. paulcam
    Member
    Posted 16 years ago #

    I have slightly off-the-beaten-trail requirements for WordPress MU.

    I require one main blog which all users have author-age access to.

    On top of this I want to add a few topic specific blogs and also allow users to add their own personal blogs.

    I'm having a few problems making this setup user friendly.

    The home/home.php page doesn't really help me. I would like the main page open straight into the main blog posts page (which I can't even find a link to) and for all the sub blogs to be listed on the right sidebar.

    The only time I can get to the main blog post page is after posting a new entry. All the other links just take me to individual posts. The other problem is the lack of links back to the main blog from the sub blogs.

    I have considered moving the main blog to somewhere like: /wordpress/main/ and just redirect the home/home.php to there. I believe there is a show all blogs sidebar addition I seen somewhere.

    Finally (for now anyway), is it possible to have all users automatically given subscriber access to all new blogs?

    Basically this set up is for a team of people, rather than a large public blog site.

    Any suggestions would be greatly appreciated.

    Thanks
    Paul

  2. andrea_r
    Moderator
    Posted 16 years ago #

    "I would like the main page open straight into the main blog posts page (which I can't even find a link to) and for all the sub blogs to be listed on the right sidebar."

    You have to code that into the theme itself.

    To get to the main blog posts page, you'll have to change the option to not show the home.php page. (Under the OPTIONS menu)

    "The other problem is the lack of links back to the main blog from the sub blogs."
    Again, you'll have to add that link in the themes.

    "Finally (for now anyway), is it possible to have all users automatically given subscriber access to all new blogs?"

    Possible? Yes, but it's not built in. You'll have to code it.

  3. Megalion
    Member
    Posted 16 years ago #

    "Finally (for now anyway), is it possible to have all users automatically given subscriber access to all new blogs?"

    I had this same issue and solved it by writing a simple plugin that looks to see if the user is "subscribed" to the blog they are viewing. If yes, do nothing, if not, add them as "subscriber".

    I think this is the best way for now because as I understand it, to give a user "subscriber" access to any blog requires an entry in wp_usermeta. If you have 50 blogs, that's 50 entries to make for a new user... and if you already have 100 users, that's 100 entries for blog #51 when created.

    Rather than fill the table with hundreds of associations that may never be used (I have 12,000+ users starting out), I just add them silently in the background when needed.

    Put the following in mu-plugins

    /*
    Plugin Name: Automatic Capability Assignment
    Plugin URI:
    Description: When a logged in user visits a blog for which they have no capabilities (ie not subscriber), they are
    automatically added as a subscriber. Otherwise they'll get a "no permissions" page.
    */
    function meg_defaultuser() {
    global $current_site, $current_blog, $current_user, $user_ID, $wpdb;
    if (!is_blog_user() || !is_site_admin) { // not subscribed to current blog and not site admin
    add_user_to_blog($current_blog->blog_id,$user_ID,'subscriber');
    }
    }
    add_action('admin_menu', 'meg_defaultuser');

About this Topic

  • Started 16 years ago by paulcam
  • Latest reply from Megalion