Plugin Directory

Changeset 462847


Ignore:
Timestamp:
11/14/2011 08:10:01 PM (14 years ago)
Author:
sjlevy
Message:

Version 1.2 release

Location:
multisite-dashboard-switcher
Files:
2 edited
4 copied

Legend:

Unmodified
Added
Removed
  • multisite-dashboard-switcher/tags/1.2/multisite-dashboard-switcher.php

    r459721 r462847  
    44    Plugin URI: http://samjlevy.com/msds
    55    Description: Adds a menu to the admin bar for easy switching between multisite dashboards.
    6     Version: 1.1
     6    Version: 1.2
    77    Author: Sam J Levy
    88    Author URI: http://samjlevy.com/
     
    7676
    7777    // query sites
    78     $blogs = $wpdb->get_results("SELECT domain, path,".((SUBDOMAIN_INSTALL) ? "domain" : "REPLACE(path,'/','')")." AS bname FROM $wpdb->blogs WHERE blog_id != 1".(($letter) ? " AND UPPER(LEFT(".((SUBDOMAIN_INSTALL) ? "domain" : "REPLACE(path,'/','')").", 1) = '$letter')" : "")." ORDER BY path",ARRAY_A);
     78    $blogs = $wpdb->get_results("SELECT domain, path,IF(path = '/',domain,REPLACE(path,'/','')) AS bname FROM $wpdb->blogs WHERE UPPER(LEFT(IF(path = '/',domain,REPLACE(path,'/','')), 1)) = '$letter' ORDER BY path",ARRAY_A);
    7979   
    8080    // add menu item for each site
     
    9191    if(!is_multisite() || !is_super_admin() || !is_admin_bar_showing()) return;
    9292    global $wp_admin_bar,$wpdb,$current_blog;
    93     $domain = (($_SERVER['HTTPS']=="on") ? "https://" : "http://").DOMAIN_CURRENT_SITE;
     93    $domain = (($_SERVER['HTTPS']=="on") ? "https://" : "http://").$current_blog->domain;
    9494   
    9595    // current site path
    96     if(isset($current_blog->path) && $current_blog->path != "") {
    97         if(is_network_admin()) {
    98             $temp = "Network";
    99         } else {
    100             if($current_blog->blog_id == 1) $temp = "Root Site";
    101             else {
    102                 if(SUBDOMAIN_INSTALL) $temp = $current_blog->domain;
    103                 else $temp = str_replace('/','',$current_blog->path);
    104             }
     96    if(is_network_admin()) {
     97        $temp = "Network";
     98    } else {
     99        if($current_blog->blog_id == 1) $temp = "Root Site";
     100        else {
     101            if($current_blog->path == "/") $temp = $current_blog->domain;
     102            else $temp = $current_blog->path;
    105103        }
    106         $current = "<span style='margin-left:8px;padding:4px;background-color:yellow;color:#000;font-weight:bold;text-shadow:none;'>".$temp."</span>";
    107104    }
     105    $current = "<span style='margin-left:8px;padding:4px;background-color:yellow;color:#000;font-weight:bold;text-shadow:none;'>".$temp."</span>";
    108106
    109107    // add top menu
     
    122120    if(get_site_option('msds_group')=="alpha") {
    123121        // get alphabet
    124         $alpha = $wpdb->get_results("SELECT DISTINCT UPPER(LEFT(".((SUBDOMAIN_INSTALL) ? "domain" : "REPLACE(path,'/','')").", 1)) AS first_letter FROM $wpdb->blogs WHERE blog_id != 1 ORDER BY first_letter",ARRAY_A);
     122        $alpha = $wpdb->get_results("SELECT DISTINCT UPPER(LEFT(IF(path = '/',domain,REPLACE(path,'/','')), 1)) AS first_letter FROM $wpdb->blogs ORDER BY first_letter",ARRAY_A);
    125123       
    126124        // call main loop for each letter
  • multisite-dashboard-switcher/tags/1.2/readme.txt

    r459721 r462847  
    44Requires at least: 3.2.1
    55Tested up to: 3.2.1
    6 Stable tag: 1.1
     6Stable tag: 1.2
    77
    88== Description ==
     
    3030== Changelog ==
    3131
     32= 1.2 =
     33November 14, 2011
     34* Added: Support for MU installations that have a hybrid of both Subdomain and Folder-based URLs
     35
    3236= 1.1 =
    3337November 5, 2011
  • multisite-dashboard-switcher/trunk/multisite-dashboard-switcher.php

    r459721 r462847  
    44    Plugin URI: http://samjlevy.com/msds
    55    Description: Adds a menu to the admin bar for easy switching between multisite dashboards.
    6     Version: 1.1
     6    Version: 1.2
    77    Author: Sam J Levy
    88    Author URI: http://samjlevy.com/
     
    7676
    7777    // query sites
    78     $blogs = $wpdb->get_results("SELECT domain, path,".((SUBDOMAIN_INSTALL) ? "domain" : "REPLACE(path,'/','')")." AS bname FROM $wpdb->blogs WHERE blog_id != 1".(($letter) ? " AND UPPER(LEFT(".((SUBDOMAIN_INSTALL) ? "domain" : "REPLACE(path,'/','')").", 1) = '$letter')" : "")." ORDER BY path",ARRAY_A);
     78    $blogs = $wpdb->get_results("SELECT domain, path,IF(path = '/',domain,REPLACE(path,'/','')) AS bname FROM $wpdb->blogs WHERE UPPER(LEFT(IF(path = '/',domain,REPLACE(path,'/','')), 1)) = '$letter' ORDER BY path",ARRAY_A);
    7979   
    8080    // add menu item for each site
     
    9191    if(!is_multisite() || !is_super_admin() || !is_admin_bar_showing()) return;
    9292    global $wp_admin_bar,$wpdb,$current_blog;
    93     $domain = (($_SERVER['HTTPS']=="on") ? "https://" : "http://").DOMAIN_CURRENT_SITE;
     93    $domain = (($_SERVER['HTTPS']=="on") ? "https://" : "http://").$current_blog->domain;
    9494   
    9595    // current site path
    96     if(isset($current_blog->path) && $current_blog->path != "") {
    97         if(is_network_admin()) {
    98             $temp = "Network";
    99         } else {
    100             if($current_blog->blog_id == 1) $temp = "Root Site";
    101             else {
    102                 if(SUBDOMAIN_INSTALL) $temp = $current_blog->domain;
    103                 else $temp = str_replace('/','',$current_blog->path);
    104             }
     96    if(is_network_admin()) {
     97        $temp = "Network";
     98    } else {
     99        if($current_blog->blog_id == 1) $temp = "Root Site";
     100        else {
     101            if($current_blog->path == "/") $temp = $current_blog->domain;
     102            else $temp = $current_blog->path;
    105103        }
    106         $current = "<span style='margin-left:8px;padding:4px;background-color:yellow;color:#000;font-weight:bold;text-shadow:none;'>".$temp."</span>";
    107104    }
     105    $current = "<span style='margin-left:8px;padding:4px;background-color:yellow;color:#000;font-weight:bold;text-shadow:none;'>".$temp."</span>";
    108106
    109107    // add top menu
     
    122120    if(get_site_option('msds_group')=="alpha") {
    123121        // get alphabet
    124         $alpha = $wpdb->get_results("SELECT DISTINCT UPPER(LEFT(".((SUBDOMAIN_INSTALL) ? "domain" : "REPLACE(path,'/','')").", 1)) AS first_letter FROM $wpdb->blogs WHERE blog_id != 1 ORDER BY first_letter",ARRAY_A);
     122        $alpha = $wpdb->get_results("SELECT DISTINCT UPPER(LEFT(IF(path = '/',domain,REPLACE(path,'/','')), 1)) AS first_letter FROM $wpdb->blogs ORDER BY first_letter",ARRAY_A);
    125123       
    126124        // call main loop for each letter
  • multisite-dashboard-switcher/trunk/readme.txt

    r459721 r462847  
    44Requires at least: 3.2.1
    55Tested up to: 3.2.1
    6 Stable tag: 1.1
     6Stable tag: 1.2
    77
    88== Description ==
     
    3030== Changelog ==
    3131
     32= 1.2 =
     33November 14, 2011
     34* Added: Support for MU installations that have a hybrid of both Subdomain and Folder-based URLs
     35
    3236= 1.1 =
    3337November 5, 2011
Note: See TracChangeset for help on using the changeset viewer.