I hope you are not referring to my message "Mediawiki as a CMS." (I mean, what
I did there was a hack, and though it worked for my (en|es).wikipedia mirror,
I wouldn't exactly recommend it).
Still, if you are referring to my hack, here it is:
I installed a mediawiki in, for instance,
/var/www/sites/wiki
and pointed the en.wikipedia and the es.wikipedia virtualhosts to that folder.
On my localsettings.php,
==============
if ($_SERVER["HTTP_HOST"]=="es.wikipedia.uh.cu")
{
$db_lang="es";
}
if ($_SERVER["HTTP_HOST"]=="en.wikipedia.uh.cu")
{
$db_lang="en";
}
$wgDBserver = "10.6.121.29";
$wgDBname = "wiki";
$wgDBuser = "wikipedia";
$wgDBpassword = "wikipedia";
$wgDBprefix = $db_lang;
$wgDBtype = "mysql";
$wgDBport = "5432";
(...)
$wgLanguageCode = $db_lang;
================
And that seems to work. (the ifs and the $db_lang variable were added by me).
There are some problems with the maintenance scripts in this setup (they
obviously don't define the _SERVER variable so they don't load the
configuration properly so I have to work around that)
But given my 0 expertise with mediawiki, I'm sure there is a better way to do
it :D
Cheers,
Zarrabeitia.
On Friday 27 October 2006 05:48, Robert Leverington wrote:
Someone on here was talking about how to run multiple
wikis using the
same wiki directory, I have a vague idea of how this could be done
(using a index.php file with exactly the same contents but with a
different name). But I don't know how I could set up the local
settings file. When the person said about it I think he used an if
statement but I don't know how to form one of those which has more
than two possibilities.
Thanks,
--
Luis Zarrabeitia
Fac. de Matemática y Computación, UH.
http://profesores.matcom.uh.cu/~kyrie