WordPress.org

Plugin Directory

Changeset 553862


Ignore:
Timestamp:
06/06/12 14:15:52 (23 months ago)
Author:
joostdekeijzer
Message:

releasing 0.9

Location:
network-shared-media
Files:
6 added
10 edited
7 copied

Legend:

Unmodified
Added
Removed
  • network-shared-media/tags/0.9/languages/networksharedmedia-default.pot

    r547017 r553862  
    1 # Copyright (C) 2012  
    2 # This file is distributed under the same license as the package. 
     1# Copyright (C) 2012 Network Shared Media 
     2# This file is distributed under the same license as the Network Shared Media package. 
    33msgid "" 
    44msgstr "" 
    55"Project-Id-Version: Network Shared Media\n" 
    6 "POT-Creation-Date: \n" 
    7 "PO-Revision-Date: \n" 
    8 "Language-Team:  <joost@dekeijzer.org>\n" 
     6"Report-Msgid-Bugs-To: http://wordpress.org/tag/network_shared_media\n" 
     7"POT-Creation-Date: 2012-06-06 13:42:31+00:00\n" 
    98"MIME-Version: 1.0\n" 
    109"Content-Type: text/plain; charset=UTF-8\n" 
    1110"Content-Transfer-Encoding: 8bit\n" 
     11"PO-Revision-Date: 2012-MO-DA HO:MI+ZONE\n" 
     12"Last-Translator: Joost de Keijzer <joost@dekeijzer.org>\n" 
     13"Language-Team: LANGUAGE <LL@li.org>\n" 
    1214 
     15#: media-upload.php:27 
     16msgid "You do not have permission to upload files to site: " 
     17msgstr "" 
     18 
     19#. #-#-#-#-#  network_shared_media.pot (Network Shared Media 0.8)  #-#-#-#-# 
     20#. Plugin Name of the plugin/theme 
     21#: network_shared_media.php:18 
    1322msgid "Network Shared Media" 
    1423msgstr "" 
     24 
     25#: network_shared_media.php:144 
     26msgid "You don't have access to any other sites media..." 
     27msgstr "" 
     28 
     29#: network_shared_media.php:202 
     30msgid "Selected site:" 
     31msgstr "" 
     32 
     33#: network_shared_media.php:208 network_shared_media.php:218 
     34#: network_shared_media.php:230 
     35msgid "Select site:" 
     36msgstr "" 
     37 
     38#: network_shared_media.php:230 
     39msgid "Select &#187;" 
     40msgstr "" 
     41 
     42#. Plugin URI of the plugin/theme 
     43msgid "http://wordpress.org/extend/plugins/network-shared-media/" 
     44msgstr "" 
     45 
     46#. Description of the plugin/theme 
     47msgid "" 
     48"This plugin adds a new tab to the \"Add Media\" window, allowing you to " 
     49"access media in other blogs. Based on an idea of Aaron Eaton" 
     50msgstr "" 
     51 
     52#. Author of the plugin/theme 
     53msgid "Joost de Keijzer" 
     54msgstr "" 
     55 
     56#. Author URI of the plugin/theme 
     57msgid "http://dekeijzer.org/" 
     58msgstr "" 
  • network-shared-media/tags/0.9/languages/networksharedmedia-nl_NL.po

    r547017 r553862  
    44msgstr "" 
    55"Project-Id-Version: Network Shared Media\n" 
    6 "POT-Creation-Date: \n" 
     6"Report-Msgid-Bugs-To: http://wordpress.org/tag/network_shared_media\n" 
     7"POT-Creation-Date: 2012-06-06 13:42:31+00:00\n" 
    78"PO-Revision-Date: \n" 
     9"Last-Translator: joost de keijzer <joost@dekeijzer.org>\n" 
    810"Language-Team:  <joost@dekeijzer.org>\n" 
    911"MIME-Version: 1.0\n" 
     
    1315"X-Poedit-Country: NETHERLANDS\n" 
    1416"X-Poedit-SourceCharset: utf-8\n" 
    15 "Last-Translator: joost de keijzer <joost@dekeijzer.org>\n" 
    1617"Plural-Forms: nplurals=2; plural=n != 1;\n" 
    1718 
    1819# networksharedmedia 
     20#: media-upload.php:27 
     21msgid "You do not have permission to upload files to site: " 
     22msgstr "Je hebt geen rechten om bestanden te uploaden naar site: " 
     23 
     24# networksharedmedia 
     25#. #-#-#-#-#  network_shared_media.pot (Network Shared Media 0.8)  #-#-#-#-# 
     26#. Plugin Name of the plugin/theme 
     27#: network_shared_media.php:18 
    1928msgid "Network Shared Media" 
    2029msgstr "Netwerk Gedeelde Media" 
    2130 
     31# networksharedmedia 
     32#: network_shared_media.php:144 
     33msgid "You don't have access to any other sites media..." 
     34msgstr "Je hebt geen toegang tot media van andere sites..." 
     35 
     36# networksharedmedia 
     37#: network_shared_media.php:202 
     38msgid "Selected site:" 
     39msgstr "Selecteer site:" 
     40 
     41# networksharedmedia 
     42#: network_shared_media.php:208 
     43#: network_shared_media.php:218 
     44#: network_shared_media.php:230 
     45msgid "Select site:" 
     46msgstr "Selecteer site:" 
     47 
     48# networksharedmedia 
     49#: network_shared_media.php:230 
     50msgid "Select &#187;" 
     51msgstr "Selecteer &#187;" 
     52 
     53#. Plugin URI of the plugin/theme 
     54msgid "http://wordpress.org/extend/plugins/network-shared-media/" 
     55msgstr "" 
     56 
     57#. Description of the plugin/theme 
     58msgid "This plugin adds a new tab to the \"Add Media\" window, allowing you to access media in other blogs. Based on an idea of Aaron Eaton" 
     59msgstr "" 
     60 
     61#. Author of the plugin/theme 
     62msgid "Joost de Keijzer" 
     63msgstr "" 
     64 
     65#. Author URI of the plugin/theme 
     66msgid "http://dekeijzer.org/" 
     67msgstr "" 
     68 
  • network-shared-media/tags/0.9/media-upload.php

    r550896 r553862  
    22/** 
    33 * @package Netword_Shared_Media 
    4  * @version 0.8 
     4 * @version 0.9 
    55 */ 
    66define('WP_ADMIN', FALSE); 
     
    2525        $current_blog_name = get_bloginfo('name'); 
    2626        restore_current_blog(); 
    27         wp_die(__('You do not have permission to upload files in blog: ')  . $current_blog_name ); 
     27        wp_die(__('You do not have permission to upload files to site: ')  . $current_blog_name ); 
    2828    } 
    2929 
  • network-shared-media/tags/0.9/network_shared_media.php

    r550896 r553862  
    22/** 
    33 * @package Netword_Shared_Media 
    4  * @version 0.8 
     4 * @version 0.9 
    55 */ 
    66/* 
    77Plugin Name: Network Shared Media 
    88Plugin URI: http://wordpress.org/extend/plugins/network-shared-media/ 
    9 Description: This plugin adds a new tab to the "Add Media" window, allowing you to access media in other blogs. Based on an idea of Aaron Eaton 
     9Description: This plugin adds a new tab to the "Add Media" window, allowing you to access media in other sites. Based on an idea of Aaron Eaton 
    1010Author: Joost de Keijzer 
    1111Author URI: http://dekeijzer.org/ 
    12 Version: 0.8 
     12Version: 0.9 
    1313Licence: GPLv2 or later 
    1414*/ 
     
    4646        /* copied from depricated get_blog_list */ 
    4747        global $wpdb; 
    48         $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 mature = '0' AND spam = '0' AND deleted = '0' ORDER BY registered DESC", $wpdb->siteid), ARRAY_A ); 
     48        $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 ); 
    4949 
    5050        $this->blogs = array(); 
     
    141141        media_upload_header(); 
    142142 
     143        if( count( $this->blogs ) == 0 ) { 
     144            echo '<form><h3 class="media-title">' . __("You don't have access to any other sites media...", 'networksharedmedia' ) . '</h3></form>'; 
     145            return; 
     146        } 
     147 
    143148        $nsm_blog_id = null; 
    144149        if( !array_key_exists( 'blog_id', $_GET ) ) $_GET['blog_id'] = null; 
     
    156161        switch_to_blog( $nsm_blog_id ); 
    157162?> 
    158  
    159     <div style="float:none;height: 3em;margin: 0 1em;"> 
    160     <ul class="subsubsub"> 
    161     <?php 
    162     $blog_links = array(); 
    163     if ( empty($_GET['blog_id']) ) 
    164         $class = ' class="current"'; 
    165     else 
    166         $class = ''; 
    167     foreach ( $this->blogs as $blog ) { 
    168         $class = ''; 
    169          
    170         if ( $blog['blog_id'] == $blog_id ) 
    171             $class = ' class="current"'; 
    172      
    173         $blog_links[] = "<li><a href='" . esc_url(add_query_arg(array('blog_id'=>$blog['blog_id'], 'paged'=>false))) . "'$class>" . $blog['name'] . '</a>'; 
    174     } 
    175     echo "<li>" . __("Select blog:") . "</li>" . implode(' | </li>', $blog_links ) . '</li>'; 
    176     unset($blog_links); 
    177     ?> 
    178     </ul> 
    179     </div> 
    180163 
    181164<?php 
     
    207190    <input type="hidden" name="blog_id" value="<?php echo (int) $blog_id; ?>" /> 
    208191    <input type="hidden" name="post_mime_type" value="<?php echo isset( $_GET['post_mime_type'] ) ? esc_attr( $_GET['post_mime_type'] ) : ''; ?>" /> 
    209      
     192 
     193    <style type="text/css"> 
     194        #media-upload #filter .nsm-site-select { float: none; width: 100%; margin: 0 1em 2em 1em; white-space: normal; } 
     195    </style> 
     196 
     197    <ul class="subsubsub nsm-site-select"> 
     198    <?php 
     199 
     200    if( count( $this->blogs ) == 1 ) { 
     201        $blog = reset( $this->blogs ); 
     202        echo "<li>" . __('Selected site:', 'networksharedmedia' ) . "</li>" . "<li><a href='" . esc_url(add_query_arg(array('blog_id'=>$blog['blog_id'], 'paged'=>false))) . "' class='current'>" . $blog['name'] . '</a>' . '</li>'; 
     203    } else { 
     204        $all_blog_names = array(); 
     205        foreach ( $this->blogs as $blog ) { 
     206            $all_blog_names[] = $blog['name']; 
     207        } 
     208        if( strlen( __('Select site:', 'networksharedmedia' ) . ' ' . implode( ' | ', $all_blog_names ) ) < 71 ) { 
     209            $blog_links = array(); 
     210            foreach ( $this->blogs as $blog ) { 
     211                $class = ''; 
     212                 
     213                if ( $blog['blog_id'] == $blog_id ) 
     214                    $class = ' class="current"'; 
     215             
     216                $blog_links[] = "<li><a href='" . esc_url(add_query_arg(array('blog_id'=>$blog['blog_id'], 'paged'=>false))) . "'$class>" . $blog['name'] . '</a>'; 
     217            } 
     218            echo "<li>" . __('Select site:', 'networksharedmedia' ) . " </li>" . implode(' | </li>', $blog_links ) . '</li>'; 
     219            unset($blog_links); 
     220        } else { 
     221            $blog_options = array(); 
     222            foreach ( $this->blogs as $blog ) { 
     223                $selected = ''; 
     224                 
     225                if ( $blog['blog_id'] == $blog_id ) 
     226                    $selected = ' selected="selected"'; 
     227             
     228                $blog_options[] = "<option value='{$blog['blog_id']}'{$selected}>" . $blog['name'] . '</option>'; 
     229            } 
     230            echo "<li>" . __('Select site:', 'networksharedmedia' ) . "</li><li> <select name='blog_id'>" . implode('', $blog_options ) . '</select></li><li> ' . get_submit_button( __( 'Select &#187;', 'networksharedmedia' ), 'secondary', 'nsm-post-query-submit', false ) . '</li>'; 
     231            unset($blog_options); 
     232        } 
     233        unset($all_blog_names); 
     234    } 
     235    ?> 
     236    </ul> 
     237 
    210238    <p id="media-search" class="search-box"> 
    211239        <label class="screen-reader-text" for="media-search-input"><?php _e('Search Media');?>:</label> 
  • network-shared-media/tags/0.9/readme.txt

    r550896 r553862  
    44Tags: multisite, network, wpmu, media, image, photo, picture, mp3, video, integration 
    55Requires at least: 3.3 
    6 Tested up to:  3.3 
    7 Stable tag: 0.8 
     6Tested up to:  3.4 
     7Stable tag: 0.9 
    88License: GPLv2 or later 
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    4040If a user doesn't have the 'upload_files' permission on the current (active) blog, the tab isn't shown at all since that user can't access the Add Media pop-up window. 
    4141 
     42= I still can't see the site listed! = 
     43 
     44A site can have several attributes which can be set through /wp-admin/network/sites.php . 
     45 
     46This plugin only shows sites which attributes are set as follows: 
     47* Public: true 
     48* Archived: false 
     49* Spam: false 
     50* Delete: false 
     51* Mature: ignored 
     52 
    4253== Screenshots == 
    43541. New tab added to the Add Media popup window 
     552. The Network Shared Media tab lists the media per site 
     563. Show a selected image and "Insert into Post" 
    4457 
    4558== Upgrade Notice == 
     
    4760== Changelog == 
    4861 
     62= 0.9 = 
     63* When many sites are available, the site-selection becomes a drop-down list (as suggested by SooBahkDo) 
     64* Ignore "mature" site attribute 
     65* tested with WP3.4RC 
     66 
    4967= 0.8 = 
    5068* fixed some embarrassing typos 
    5169 
    5270= 0.7 = 
    53 * i18n (feel free to contact me for translations of the string "Netword Shared Media") 
     71* i18n (feel free to contact me for translations) 
    5472* Updated read-me 
    5573* Added screenshot 
  • network-shared-media/trunk/languages/networksharedmedia-default.pot

    r547017 r553862  
    1 # Copyright (C) 2012  
    2 # This file is distributed under the same license as the package. 
     1# Copyright (C) 2012 Network Shared Media 
     2# This file is distributed under the same license as the Network Shared Media package. 
    33msgid "" 
    44msgstr "" 
    55"Project-Id-Version: Network Shared Media\n" 
    6 "POT-Creation-Date: \n" 
    7 "PO-Revision-Date: \n" 
    8 "Language-Team:  <joost@dekeijzer.org>\n" 
     6"Report-Msgid-Bugs-To: http://wordpress.org/tag/network_shared_media\n" 
     7"POT-Creation-Date: 2012-06-06 13:42:31+00:00\n" 
    98"MIME-Version: 1.0\n" 
    109"Content-Type: text/plain; charset=UTF-8\n" 
    1110"Content-Transfer-Encoding: 8bit\n" 
     11"PO-Revision-Date: 2012-MO-DA HO:MI+ZONE\n" 
     12"Last-Translator: Joost de Keijzer <joost@dekeijzer.org>\n" 
     13"Language-Team: LANGUAGE <LL@li.org>\n" 
    1214 
     15#: media-upload.php:27 
     16msgid "You do not have permission to upload files to site: " 
     17msgstr "" 
     18 
     19#. #-#-#-#-#  network_shared_media.pot (Network Shared Media 0.8)  #-#-#-#-# 
     20#. Plugin Name of the plugin/theme 
     21#: network_shared_media.php:18 
    1322msgid "Network Shared Media" 
    1423msgstr "" 
     24 
     25#: network_shared_media.php:144 
     26msgid "You don't have access to any other sites media..." 
     27msgstr "" 
     28 
     29#: network_shared_media.php:202 
     30msgid "Selected site:" 
     31msgstr "" 
     32 
     33#: network_shared_media.php:208 network_shared_media.php:218 
     34#: network_shared_media.php:230 
     35msgid "Select site:" 
     36msgstr "" 
     37 
     38#: network_shared_media.php:230 
     39msgid "Select &#187;" 
     40msgstr "" 
     41 
     42#. Plugin URI of the plugin/theme 
     43msgid "http://wordpress.org/extend/plugins/network-shared-media/" 
     44msgstr "" 
     45 
     46#. Description of the plugin/theme 
     47msgid "" 
     48"This plugin adds a new tab to the \"Add Media\" window, allowing you to " 
     49"access media in other blogs. Based on an idea of Aaron Eaton" 
     50msgstr "" 
     51 
     52#. Author of the plugin/theme 
     53msgid "Joost de Keijzer" 
     54msgstr "" 
     55 
     56#. Author URI of the plugin/theme 
     57msgid "http://dekeijzer.org/" 
     58msgstr "" 
  • network-shared-media/trunk/languages/networksharedmedia-nl_NL.po

    r547017 r553862  
    44msgstr "" 
    55"Project-Id-Version: Network Shared Media\n" 
    6 "POT-Creation-Date: \n" 
     6"Report-Msgid-Bugs-To: http://wordpress.org/tag/network_shared_media\n" 
     7"POT-Creation-Date: 2012-06-06 13:42:31+00:00\n" 
    78"PO-Revision-Date: \n" 
     9"Last-Translator: joost de keijzer <joost@dekeijzer.org>\n" 
    810"Language-Team:  <joost@dekeijzer.org>\n" 
    911"MIME-Version: 1.0\n" 
     
    1315"X-Poedit-Country: NETHERLANDS\n" 
    1416"X-Poedit-SourceCharset: utf-8\n" 
    15 "Last-Translator: joost de keijzer <joost@dekeijzer.org>\n" 
    1617"Plural-Forms: nplurals=2; plural=n != 1;\n" 
    1718 
    1819# networksharedmedia 
     20#: media-upload.php:27 
     21msgid "You do not have permission to upload files to site: " 
     22msgstr "Je hebt geen rechten om bestanden te uploaden naar site: " 
     23 
     24# networksharedmedia 
     25#. #-#-#-#-#  network_shared_media.pot (Network Shared Media 0.8)  #-#-#-#-# 
     26#. Plugin Name of the plugin/theme 
     27#: network_shared_media.php:18 
    1928msgid "Network Shared Media" 
    2029msgstr "Netwerk Gedeelde Media" 
    2130 
     31# networksharedmedia 
     32#: network_shared_media.php:144 
     33msgid "You don't have access to any other sites media..." 
     34msgstr "Je hebt geen toegang tot media van andere sites..." 
     35 
     36# networksharedmedia 
     37#: network_shared_media.php:202 
     38msgid "Selected site:" 
     39msgstr "Selecteer site:" 
     40 
     41# networksharedmedia 
     42#: network_shared_media.php:208 
     43#: network_shared_media.php:218 
     44#: network_shared_media.php:230 
     45msgid "Select site:" 
     46msgstr "Selecteer site:" 
     47 
     48# networksharedmedia 
     49#: network_shared_media.php:230 
     50msgid "Select &#187;" 
     51msgstr "Selecteer &#187;" 
     52 
     53#. Plugin URI of the plugin/theme 
     54msgid "http://wordpress.org/extend/plugins/network-shared-media/" 
     55msgstr "" 
     56 
     57#. Description of the plugin/theme 
     58msgid "This plugin adds a new tab to the \"Add Media\" window, allowing you to access media in other blogs. Based on an idea of Aaron Eaton" 
     59msgstr "" 
     60 
     61#. Author of the plugin/theme 
     62msgid "Joost de Keijzer" 
     63msgstr "" 
     64 
     65#. Author URI of the plugin/theme 
     66msgid "http://dekeijzer.org/" 
     67msgstr "" 
     68 
  • network-shared-media/trunk/media-upload.php

    r550896 r553862  
    22/** 
    33 * @package Netword_Shared_Media 
    4  * @version 0.8 
     4 * @version 0.9 
    55 */ 
    66define('WP_ADMIN', FALSE); 
     
    2525        $current_blog_name = get_bloginfo('name'); 
    2626        restore_current_blog(); 
    27         wp_die(__('You do not have permission to upload files in blog: ')  . $current_blog_name ); 
     27        wp_die(__('You do not have permission to upload files to site: ')  . $current_blog_name ); 
    2828    } 
    2929 
  • network-shared-media/trunk/network_shared_media.php

    r550896 r553862  
    22/** 
    33 * @package Netword_Shared_Media 
    4  * @version 0.8 
     4 * @version 0.9 
    55 */ 
    66/* 
    77Plugin Name: Network Shared Media 
    88Plugin URI: http://wordpress.org/extend/plugins/network-shared-media/ 
    9 Description: This plugin adds a new tab to the "Add Media" window, allowing you to access media in other blogs. Based on an idea of Aaron Eaton 
     9Description: This plugin adds a new tab to the "Add Media" window, allowing you to access media in other sites. Based on an idea of Aaron Eaton 
    1010Author: Joost de Keijzer 
    1111Author URI: http://dekeijzer.org/ 
    12 Version: 0.8 
     12Version: 0.9 
    1313Licence: GPLv2 or later 
    1414*/ 
     
    4646        /* copied from depricated get_blog_list */ 
    4747        global $wpdb; 
    48         $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 mature = '0' AND spam = '0' AND deleted = '0' ORDER BY registered DESC", $wpdb->siteid), ARRAY_A ); 
     48        $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 ); 
    4949 
    5050        $this->blogs = array(); 
     
    141141        media_upload_header(); 
    142142 
     143        if( count( $this->blogs ) == 0 ) { 
     144            echo '<form><h3 class="media-title">' . __("You don't have access to any other sites media...", 'networksharedmedia' ) . '</h3></form>'; 
     145            return; 
     146        } 
     147 
    143148        $nsm_blog_id = null; 
    144149        if( !array_key_exists( 'blog_id', $_GET ) ) $_GET['blog_id'] = null; 
     
    156161        switch_to_blog( $nsm_blog_id ); 
    157162?> 
    158  
    159     <div style="float:none;height: 3em;margin: 0 1em;"> 
    160     <ul class="subsubsub"> 
    161     <?php 
    162     $blog_links = array(); 
    163     if ( empty($_GET['blog_id']) ) 
    164         $class = ' class="current"'; 
    165     else 
    166         $class = ''; 
    167     foreach ( $this->blogs as $blog ) { 
    168         $class = ''; 
    169          
    170         if ( $blog['blog_id'] == $blog_id ) 
    171             $class = ' class="current"'; 
    172      
    173         $blog_links[] = "<li><a href='" . esc_url(add_query_arg(array('blog_id'=>$blog['blog_id'], 'paged'=>false))) . "'$class>" . $blog['name'] . '</a>'; 
    174     } 
    175     echo "<li>" . __("Select blog:") . "</li>" . implode(' | </li>', $blog_links ) . '</li>'; 
    176     unset($blog_links); 
    177     ?> 
    178     </ul> 
    179     </div> 
    180163 
    181164<?php 
     
    207190    <input type="hidden" name="blog_id" value="<?php echo (int) $blog_id; ?>" /> 
    208191    <input type="hidden" name="post_mime_type" value="<?php echo isset( $_GET['post_mime_type'] ) ? esc_attr( $_GET['post_mime_type'] ) : ''; ?>" /> 
    209      
     192 
     193    <style type="text/css"> 
     194        #media-upload #filter .nsm-site-select { float: none; width: 100%; margin: 0 1em 2em 1em; white-space: normal; } 
     195    </style> 
     196 
     197    <ul class="subsubsub nsm-site-select"> 
     198    <?php 
     199 
     200    if( count( $this->blogs ) == 1 ) { 
     201        $blog = reset( $this->blogs ); 
     202        echo "<li>" . __('Selected site:', 'networksharedmedia' ) . "</li>" . "<li><a href='" . esc_url(add_query_arg(array('blog_id'=>$blog['blog_id'], 'paged'=>false))) . "' class='current'>" . $blog['name'] . '</a>' . '</li>'; 
     203    } else { 
     204        $all_blog_names = array(); 
     205        foreach ( $this->blogs as $blog ) { 
     206            $all_blog_names[] = $blog['name']; 
     207        } 
     208        if( strlen( __('Select site:', 'networksharedmedia' ) . ' ' . implode( ' | ', $all_blog_names ) ) < 71 ) { 
     209            $blog_links = array(); 
     210            foreach ( $this->blogs as $blog ) { 
     211                $class = ''; 
     212                 
     213                if ( $blog['blog_id'] == $blog_id ) 
     214                    $class = ' class="current"'; 
     215             
     216                $blog_links[] = "<li><a href='" . esc_url(add_query_arg(array('blog_id'=>$blog['blog_id'], 'paged'=>false))) . "'$class>" . $blog['name'] . '</a>'; 
     217            } 
     218            echo "<li>" . __('Select site:', 'networksharedmedia' ) . " </li>" . implode(' | </li>', $blog_links ) . '</li>'; 
     219            unset($blog_links); 
     220        } else { 
     221            $blog_options = array(); 
     222            foreach ( $this->blogs as $blog ) { 
     223                $selected = ''; 
     224                 
     225                if ( $blog['blog_id'] == $blog_id ) 
     226                    $selected = ' selected="selected"'; 
     227             
     228                $blog_options[] = "<option value='{$blog['blog_id']}'{$selected}>" . $blog['name'] . '</option>'; 
     229            } 
     230            echo "<li>" . __('Select site:', 'networksharedmedia' ) . "</li><li> <select name='blog_id'>" . implode('', $blog_options ) . '</select></li><li> ' . get_submit_button( __( 'Select &#187;', 'networksharedmedia' ), 'secondary', 'nsm-post-query-submit', false ) . '</li>'; 
     231            unset($blog_options); 
     232        } 
     233        unset($all_blog_names); 
     234    } 
     235    ?> 
     236    </ul> 
     237 
    210238    <p id="media-search" class="search-box"> 
    211239        <label class="screen-reader-text" for="media-search-input"><?php _e('Search Media');?>:</label> 
  • network-shared-media/trunk/readme.txt

    r550896 r553862  
    44Tags: multisite, network, wpmu, media, image, photo, picture, mp3, video, integration 
    55Requires at least: 3.3 
    6 Tested up to:  3.3 
    7 Stable tag: 0.8 
     6Tested up to:  3.4 
     7Stable tag: 0.9 
    88License: GPLv2 or later 
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    4040If a user doesn't have the 'upload_files' permission on the current (active) blog, the tab isn't shown at all since that user can't access the Add Media pop-up window. 
    4141 
     42= I still can't see the site listed! = 
     43 
     44A site can have several attributes which can be set through /wp-admin/network/sites.php . 
     45 
     46This plugin only shows sites which attributes are set as follows: 
     47* Public: true 
     48* Archived: false 
     49* Spam: false 
     50* Delete: false 
     51* Mature: ignored 
     52 
    4253== Screenshots == 
    43541. New tab added to the Add Media popup window 
     552. The Network Shared Media tab lists the media per site 
     563. Show a selected image and "Insert into Post" 
    4457 
    4558== Upgrade Notice == 
     
    4760== Changelog == 
    4861 
     62= 0.9 = 
     63* When many sites are available, the site-selection becomes a drop-down list (as suggested by SooBahkDo) 
     64* Ignore "mature" site attribute 
     65* tested with WP3.4RC 
     66 
    4967= 0.8 = 
    5068* fixed some embarrassing typos 
    5169 
    5270= 0.7 = 
    53 * i18n (feel free to contact me for translations of the string "Netword Shared Media") 
     71* i18n (feel free to contact me for translations) 
    5472* Updated read-me 
    5573* Added screenshot 
Note: See TracChangeset for help on using the changeset viewer.