Extension:SplitPrivateWiki

The SplitPrivateWiki extension allows you to make two wikis look like one. Certain namespaces will redirect to the other wiki (and vice versa). Additionally, any edits to the redirected namespace on the public wiki will automatically be transferred to the private wiki. This allows extensions like SemanticMediaWiki to use all the data from the public wiki in the private wiki, but when in the public wiki you can only use the public data. The idea being that one wiki is private and the other is public. This thus allows fine grained read access controls without some of the pitfalls common in other schemes. This extension is experimental. As always use at your own risk.

Installation
We assume you want two wikis run by same copy of mediawiki code, but using different virtual hosts or script paths (using things like alias/rewrite rules)
 * Run the installer twice, once for the public wiki and once for the private wiki. For best security, have the installer create separate db users for each wiki
 * Do not use the "LocalSettings.php" the installer generates, instead use a "LocalSettings.php" like:
 * Changing the above of course to your specifics. It is important that either wgServer or wgScriptPath is different between the two wikis or else it won't be able to detect when you are in the secret wiki
 * $wgExclusiveNamespaces should have the namespaces for each wiki that are exclusively handled by that wiki (and auto copied over to the other wiki). Do not include any namespaces here that are in $wgBuiltinNamespacesToRename. If you add custom namespaces you also have to add to wgExtraNamespaces.
 * $wgBuiltinNamespacesToRename - contains a list of builtin namespaces that we want on both wikis, so that get renamed. e.g. MediaWiki becomes.
 * You would probably want to change the various rights here so that only certain groups have read rights on the private wiki.
 * Run  and

Things should now just work.

Configuration parameters
Listed here are default values for config vars.

Namespaces handled exclusively on one wiki Namespaces to be in both and be renamed:

Should sync edits show up in recentchanges (true = yes, false = no, 'bot' = show up but marked as bot). Note, currently this doesn't work with page deletions properly

Todo

 * Make page deletions be bot edits
 * Should also setup foreignFileRepoViaLB since this only copies page contents not files
 * How user pages should work is kind of iffy, maybe it should be something like Extension:GlobalUserPage Allowing people to override, but copying a fake copy by default(?)
 * Should set up single sign on automatically.
 * page moves are kind of handled hackily