This multisites system could be 100 % compatible with "Rogue", but it is not. There is in rogue a new encoding system, used in the config.php:
$pnconfig['dbtype'] = 'mysql';
$pnconfig['dbhost'] = 'localhost';
$pnconfig['dbuname'] = 'cm9vdA==';
$pnconfig['dbpass'] = '';
$pnconfig['dbname'] = 'nameOfTheDB';
$pnconfig['system'] = '0';
$pnconfig['prefix'] = 'nuke';
$pnconfig['encoded'] = '1';
$pnconfig["dbuname"] is defined by the install procedure. The install procedure is not "multisite" and wont be. Blah Blah Blah ....
If you want to be multi sites with rogue:
$pnconfig['dbtype'] = 'mysql';
$pnconfig['dbhost'] = 'localhost';
$pnconfig['dbuname'] = 'root';
$pnconfig['dbpass'] = '';
$pnconfig['dbname'] = 'nameOfTheDB';
$pnconfig['system'] = '0';
$pnconfig['prefix'] = 'nuke';
$pnconfig['encoded'] = '0';
That's all.
This documentation is there to explain how to transform a classic postNuke into a multi sites one. There is almost nothing in the folder NS-Multisites, it is normal, almost everything is already in the core of postNuke, and some manipulations has to be done by someone qualified (not too much).
Our example is going to talk about several domain names, and one server. These are going to be:
www.domain1.com, www.domain1.net,
www.domain1.org, essai.domain1.net
www.domain2.com, www.domain2.net, www.domain2.org, othersubdomain.domain2.net
We would like to have all the domain1
having the same content, all the domain2 but "othersubdomain.domain2.net"
with the same content, and "othersubdomain.domain2.net" with a different
content.
Name it "parameters"
Sources of parameters/whoisit.inc.php:
<? /* things could be changed here, SERVER_NAME may be useless in certain configurations. For instance, instead of using SERVER_NAME, you may have to use HTTP_HOST. Also, with subdomains, you may want to suppress the first level of the domain name, and, to continue with my example of "linux.mouzaia", you may rather use "mouzaia". */$serverName = $SERVER_NAME; $serverName = str_replace("www","",$serverName); $serverName = str_replace("essai","",$serverName); $serverName = str_replace(".org","",$serverName); $serverName = str_replace(".net","",$serverName); $serverName = str_replace(".com","",$serverName);
?> You may find a "whoisit.inc.php" in the folder NS-Multisites/installation. Copy it in the folder "parameters".
In these folders, copy the original config.php, and modify each of them as you want, especially $dbname, or $prefix.
It may be a good idea to chmod that config.php to 766.
For the one using the "wiki/bbcode/postnuke" stuff, you may copy here the file used in "modules/NS-Wiki/configWIKI.inc.php" and tune it as you feel. If that file is not there, the normal one, in "modules/NS-Wiki" will be used instead.
If you use a multi sites configuration, it is normal the logos are in these personal folder. The logo is a minimum. In that folder, put the image you want to use as a logo for that site. IT IS MANDATORY.
I did modified the scrip print.php to go and get it there. The themes has to be modified accordingly, ie I did correct the theme "extralite", and that is all.
The modification is:
img src=\"".WHERE_IS_PERSO."images/logo.gif\" alt=\""._WELCOMETO." $sit
I dont really understand why this "logo.gif" appears here, it should obviously be "$site_logo" ...
<?
include("parameters/whoisit.inc.php");
if (!(empty($serverName)))
{ include("parameters/".$serverName."/config.php"); }/* this next defined is coming before the one I put in mainfile2.php. So there are 2 possibilities, to destroy the one I put in mainfile2.php, or to let it, as it is coming after the one below, it wont affect WHERE_IS_PERSO. */
define("WHERE_IS_PERSO","parameters/".$serverName."/");
?>
You may find a config.php in "NS-Multisites/installation". Copy it in your root of postNuke, but please, dont forget to copy the original config.php as explained above, before you copy that one !
Explication: your site is "multi site". You can modifiy anything in each config.php, it will affect only the corresponding site. But: the themes are still the themes available in your top themes folder. The images topics are still the one in your top images/topics ... We are going to personalyze these also.
Create a folder themes in each of them.
In that folder, you have to create an empty "index.html", for security reasons. Then you may copy a complete theme, like the one you may find in the principal themes folder (with its sub folders, css ...). The themes you put there HAS TO HAVE A DIFFERENT NAME. For Instance, I did my tests with a copy of PostNuke theme, renaming it in PostNuke2. That is all, since now on, you should see that PostNuke2 theme in your change folder list, beside the themes present in the main folder.
Easy ! just copy pntables.php into your "parametes/linux.mouzaia" folder. Then you can modify it. If the system does not find a pntables.php in that folder, it uses the master one.
If you want to use a personal images/topics, a personal images/menu or a personal images/admin, you may create a file in your parameters/linux.mouzaia, name it "config_images.php".
<?
/* attention, if a folder is uncommented below, its main equivalent will not be used at all. This means, all the topics images for instance will have to be in a personnal topics folder. */
// $tipath = WHERE_IS_PERSO.$tipath;
// $userimg = WHERE_IS_PERSO.$userimg;
// $adminimg = WHERE_IS_PERSO.$adminimg;
?>
You may find one "config_images.php" in the folder "NS-Multisites/installation". Copy it as explained above.
Then, create a folder "themes" in the parameters/linux.mouzaia/images, eventually a folder "menu", and a folder "admin". And put all the images wanted in these folders. Attention, once you declare to use a personal images/topics, the main images/topics will not be used AT ALL. All the images used will have to be in that personal images/topics.
Also, you may want to deplace these personale images folder somewhere else, for exemple if you want to give ftp rights to some user, somewhere else in your apache tree. Then, you could, in that config_images.php, declare anything else, such as /public_html/whatever with a $tipath=/public_html/whatever; and in that folder, create a folder "themes" ....
A problem could be with the way your server is configured. In particular, in whoisit.inc.php, I use SERVER_NAME. It is maybe not the good system variable to use. You can check this with a phpinfo(). And change what you need in whoisit.inc.php.
Also, in whatisit.inc.php, I just treat .com, .net, .org, but of course, you may have to treat .fr or .co.uk, or dont treat them at all, then use a folder named linux.mouzaia.org for instance, or whatever you want ....