Now that we have db_prefix and we have that {tablename} syntax, how about an admin option to "clone your drupal" that will take a few parameters and from that, generate a working drupal instance on the specified db_prefix?
Here's what it would need to do:
-
Show a form requesting
-
the new Drupal site name, message and slogan
-
the db_prefix
-
the base_url for the new site
-
-
load the current RDBMS script inserting $db_prefix for all tables.
-
copy the current admin login account information.
-
also clone the current theme, blocks, roles, caching and other essential config items.
-
create a template include/$db_prefix.php -- you probably can't install this due to permission problems, so just offer it in a textarea for cut and paste
-
offer to login to the new site's admin area, launched in a new window.
For my own use, items 2, 3 and 4 have to be done manually, and #2 is the most trouble -- if all our tables were named in a drupal namespace like drupal_node (which has been suggested elsewhere) then I could use a simple sed script to generate the new database.mysql script, but as it is I have to hand edit the file.
Comments
Comment #1
moshe weitzman commentedI can't think of any reason why a general admin might use this. seems like a highly specialized request.
marking as postponed until the usefulness of this better described.
Comment #2
killes@www.drop.org commentedI think that this would best be done with an external clone-drupal.php script.
Comment #3
beginner commentedThe usefulness of the feature request has not been demonstrated.