Hi,
Thanks for the great plugin! I wanted to be able to use this for sub-directories as well. I made the following tiny change and it seems to work great.
First make sure to turn off automatic domain mapping when you enter your new sites. If the site you are cloning is “abc.myblog.com”, your new Site URL should be entered “new.myblog.com”. Here is the simple change…
File: “wp-content/plugins/add-cloned-sites-for-wpmu-batch/magic-add-cloned-sites.php”
Line 91:
Change-
$domain = $dashedsiteurl . "." . get_blog_details(1)->domain;
To-
$domain = $siteurl;
There is a different small change you can make so the new Site URL you enter is just the new sub-directory name. Entering “new” for example would result in “new.myblog.com”.
Same file, same line:
Change To-
$domain = $siteurl . "." . get_blog_details(1)->domain;
Comment out Lines 95-99.
//if (!valid_url($siteurl)){
// _e("<span class=\"error\">The url '$siteurl' is not a valid url.</span>", 'acswpmu_trdom' );
// $error = TRUE;
//}
You cannot do both of these so choose one… I haven’t really tested this much either so you might want to test it a bit…
Good Luck !