WordPress.org

Forums

Blog Copier
WPMU Multi-domain Patch (5 posts)

  1. trex005
    Member
    Posted 1 year ago #

    Developer(s) I didn't want to wait to get multidomain support, so I wrote a patch for you. If you don't know how to apply the patch, let me know.

    @@ -3489,16 +3489,123 @@
    : false;
    +%0A%09%09%09%09$network_domain =(isset($_POST%5B'network_domain'%5D) ? $_POST%5B'network_domain'%5D : $current_site-%3Edomain);
    %0A%0A%09%09%09%09if
    @@ -3991,16 +3991,33 @@
    py_files
    +, $network_domain
    );%0A%09%09%09%09
    @@ -5865,25 +5865,94 @@
    nstall() ) %7B
    -
    +%0A%09%09%09%09%09%09%09%09%09$network_domains = get_site_option( 'md_domains' );%0A%09%09%09%09%09%09%09%09
    ?%3E%0A%09%09%09%09%09%09%09%09%09
    @@ -6066,25 +6066,677 @@
    ext%22/%3E.%3C?php
    -
    +%0A%09%09%09%09%09%09%09%09%09if(count($network_domains) %3E 0)%0A%09%09%09%09%09%09%09%09%09%7B%0A%09%09%09%09%09%09%09%09%09%09$sorted_domains = array();%0A%09%09%09%09%09%09%09%09%09%09foreach ($network_domains as $network_domain) %7B%0A%09%09%09%09%09%09%09%09%09%09%09$sorted_domains%5B%5D = $network_domain%5B'domain_name'%5D;%0A%09%09%09%09%09%09%09%09%09%09%7D%0A%09%09%09%09%09%09%09%09%09%09asort($sorted_domains);%0A%09%09%09%09%09%09%09%09%09%09echo %22%3Cselect name='network_domain' id='network_domain'%3E%22;%0A%09%09%09%09%09%09%09%09%09%09foreach($sorted_domains as $network_domain)%0A%09%09%09%09%09%09%09%09%09%09%7B%0A%09%09%09%09%09%09%09%09%09%09%09$selected = ($network_domain == $current_site-%3Edomain ? %22selected%22 : %22%22);%0A%09%09%09%09%09%09%09%09%09%09%09echo %22%3Coption value='%7B$network_domain%7D' $selected%3E%7B$network_domain%7D%3C/option%3E%22;%0A%09%09%09%09%09%09%09%09%09%09%7D%0A%09%09%09%09%09%09%09%09%09%09echo %22%3C/select%3E%22;%0A%09%09%09%09%09%09%09%09%09%7D%0A%09%09%09%09%09%09%09%09%09else%0A%09%09%09%09%09%09%09%09%09%7B%0A%09%09%09%09%09%09%09%09%09%09
    echo $curren
    @@ -6750,16 +6750,36 @@
    %3Edomain;
    +%0A%09%09%09%09%09%09%09%09%09%7D%0A%09%09%09%09%09%09%09%09
    ?%3E%0A%09%09%09%09%09
    @@ -8401,16 +8401,41 @@
    s = true
    +, $network_domain = false
    ) %7B%0A%09%09%09g
    @@ -8881,32 +8881,57 @@
    %09%09%09$
    -new
    +top_doman = ($network_
    domain
    -=
    +?
    $
    +network_
    domain
    -.%22.%22.
    + :
    $cur
    @@ -8939,32 +8939,74 @@
    ent_site-%3Edomain
    +);%0A%09%09%09%09$newdomain = $domain.%22.%22.$top_doman
    ;%0A%09%09%09%09$path = $b
    @@ -16499,9 +16499,8 @@
    ();%0A%7D%0A?%3E
    -%0A

    https://wordpress.org/plugins/blog-copier/

  2. Jeff
    Member
    Posted 1 year ago #

    Hi Trex - I'd like to know how to apply this patch.

    Thanks,
    Jeff

  3. trex005
    Member
    Posted 1 year ago #

    This is a diff patch, however if you'd prefer, I could just send you the affected section instead.

  4. trex005
    Member
    Posted 1 year ago #

    Here is the full file:
    http://pastebin.com/XLaKHKJe
    Here is a diff you can probably follow manually:
    http://pastebin.com/PK9C6mNw

  5. trex005
    Member
    Posted 1 year ago #

    Sorry to keep posting, but I like sharing knowledge:
    Here is a tool you can apply patches with online:
    http://i-tools.org/diff

    However it'll quickly tell you I messed up my original patch. Not sure how I did that.

    All in all, if you have not made any other changes, the entire file is probably your best option.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Blog Copier
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.