Support » Plugin: Network Shared Media (deprecated/unsupported) » Set just one shared website

  • Hi, I would like a way to set just one website to share all the images, and wouldn`t like to use upload_files role for that, because it is not dynamic, since I would need to do that for all new users on wpms. Is there a way to set just one shared website on the code? Thank you very much!!! You did an wonderful job!!!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Like, how can I set just a specif blog id to be shared on this code? Or should I change another peace of it? Tks!

    function __construct() {
    global $blog_id;
    $this->current_blog_id = $blog_id;

    /* copied from depricated get_blog_list */
    global $wpdb;
    $blogs = $wpdb->get_results( $wpdb->prepare(“SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = %d AND public = ‘1’ AND archived = ‘0’ AND spam = ‘0’ AND deleted = ‘0’ ORDER BY registered DESC”, $wpdb->siteid), ARRAY_A );

    $this->blogs = array();
    $sort_array = array();

    foreach ( (array) $blogs as $details ) {
    if ( !current_user_can_for_blog( $details[‘blog_id’], ‘upload_files’) || $details[‘blog_id’] == $this->current_blog_id ) continue;

    $details[‘name’] = get_blog_option( $details[‘blog_id’], ‘blogname’ );
    $this->blogs[] = $details;
    $sort_array[] = strtolower ( $details[‘name’] );
    array_multisort( $sort_array, SORT_ASC, $this->blogs );

    This is a great suggestion. I too would like to be able to specify one install to share media from. In my case, it would be the parent install.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Set just one shared website’ is closed to new replies.