Location: PHPKode > projects > ProNuke. Postnuke To Oracle > postnuke/html/modules/NS-Multisites/docs/readme.html
<h3><b><font face="Arial, Helvetica, sans-serif">NEW: Rogue and multisites.</font></b></h3>
<p><font face="Arial, Helvetica, sans-serif" size="-1">This multisites system 
  could be 100 % compatible with &quot;Rogue&quot;, but it is not. There is in 
  rogue a new encoding system, used in the config.php:</font></p>
  <p><font face="Arial, Helvetica, sans-serif" size="-1">$pnconfig['dbtype'] = 
    $pnconfig['dbhost'] = 'localhost';<br>
    $pnconfig['dbuname'] = 'cm9vdA==';<br>
    $pnconfig['dbpass'] = '';<br>
    $pnconfig['dbname'] = 'nameOfTheDB';<br>
    $pnconfig['system'] = '0';<br>
    $pnconfig['prefix'] = 'nuke';<br>
    $pnconfig['encoded'] = '1';</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="-1">$pnconfig[&quot;dbuname&quot;] 
  is defined by the install procedure. The install procedure is not &quot;multisite&quot; 
  and wont be. Blah Blah Blah ....</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="-1">If you want to be multi 
  sites with rogue:</font></p>
  <p><font face="Arial, Helvetica, sans-serif" size="-1">$pnconfig['dbtype'] = 
    $pnconfig['dbhost'] = 'localhost';<br>
    $pnconfig['dbuname'] = 'root';<br>
    $pnconfig['dbpass'] = '';<br>
    $pnconfig['dbname'] = 'nameOfTheDB';<br>
    $pnconfig['system'] = '0';<br>
    $pnconfig['prefix'] = 'nuke';<br>
    $pnconfig['encoded'] = '0';</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="-1">That's all.</font></p>
<p><font face="Arial, Helvetica, sans-serif">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).</font></p>
<p><font face="Arial, Helvetica, sans-serif">Our example is going to talk about 
  several domain names, and one server. These are going to be:</font></p>
<p><font face="Arial, Helvetica, sans-serif">www.domain1.com, www.domain1.net, 
  www.domain1.org, essai.domain1.net<br>
  www.domain2.com, www.domain2.net, www.domain2.org, othersubdomain.domain2.net</font></p>
<p><font face="Arial, Helvetica, sans-serif">We would like to have all the domain1 
  having the same content, all the domain2 but &quot;othersubdomain.domain2.net&quot; 
  with the same content, and &quot;othersubdomain.domain2.net&quot; with a different 
<h3><font face="Arial, Helvetica, sans-serif">Create a folder in the main folder. 
  <p><font face="Arial, Helvetica, sans-serif"> Name it "parameters" </font></p>
<h3><font face="Arial, Helvetica, sans-serif">create, in the folder parameters 
  a source: whoisit.inc.php</font></h3>
  <p><font face="Arial, Helvetica, sans-serif"> Sources of parameters/whoisit.inc.php:</font></p>
  <pre><font face="Arial, Helvetica, sans-serif" size="2">&lt;?
</font><font face="Arial, Helvetica, sans-serif">/* 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". */</font></pre>
  <pre><font face="Arial, Helvetica, sans-serif" size="2">$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);<br>?&gt;

</font><font face="Arial, Helvetica, sans-serif">You may find a &quot;whoisit.inc.php&quot; in the folder NS-Multisites/installation. Copy it in the folder &quot;parameters&quot;.
<h3><font face="Arial, Helvetica, sans-serif">In that folder, <b>create a folder</b> 
  with the name domain1, <b>an other one</b> with the name domain2, and <b>a third 
  one</b> with the name &quot;othersubdomain.domain2&quot;. </font></h3>
  <p><font face="Arial, Helvetica, sans-serif">In these folders, copy the original 
    config.php, and modify each of them as you want, especially $dbname, or $prefix.</font></p>
  <p><font face="Arial, Helvetica, sans-serif">It may be a good idea to chmod 
    that config.php to 766.</font></p>
  <p><font face="Arial, Helvetica, sans-serif">For the one using the &quot;wiki/bbcode/postnuke&quot; 
    stuff, you may copy here the file used in &quot;modules/NS-Wiki/configWIKI.inc.php&quot; 
    and tune it as you feel. If that file is not there, the normal one, in &quot;modules/NS-Wiki&quot; 
    will be used instead.</font></p>
<h3><font face="Arial, Helvetica, sans-serif">Create a folder in each of these 
  folders, name it &quot;images&quot;</font></h3>
  <p><font face="Arial, Helvetica, sans-serif">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. </font></p>
  <p><font face="Arial, Helvetica, sans-serif">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 &quot;extralite&quot;, and that is all.</font></p>
  <p><font face="Arial, Helvetica, sans-serif">The modification is:</font></p>
    <p><font face="Arial, Helvetica, sans-serif" size="2">img src=\"".WHERE_IS_PERSO."images/logo.gif\" 
      alt=\""._WELCOMETO." $sit</font> </p>
  <p><font face="Arial, Helvetica, sans-serif">I dont really understand why this 
    &quot;logo.gif&quot; appears here, it should obviously be &quot;$site_logo&quot; 
<h3><font face="Arial, Helvetica, sans-serif">Replace original config.php in the 
  root with: </font></h3>
  <p><font face="Arial, Helvetica, sans-serif" size="2">&lt;?</font></p>
  <p><font face="Arial, Helvetica, sans-serif" size="2"> include("parameters/whoisit.inc.php"); 
    if (!(empty($serverName)))<br>
    { include("parameters/".$serverName."/config.php"); }</font></p>
  <p><font face="Arial, Helvetica, sans-serif" size="2"> /* 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. */</font></p>
  <p><font face="Arial, Helvetica, sans-serif" size="2"> define("WHERE_IS_PERSO","parameters/".$serverName."/"); 
  <p><font face="Arial, Helvetica, sans-serif" size="2">?&gt;</font></p>
  <p><font face="Arial, Helvetica, sans-serif">You may find a config.php in &quot;NS-Multisites/installation&quot;. 
    Copy it in your root of postNuke, but <b>please, dont forget to copy the original 
    config.php as explained above, before you copy that one ! </b></font></p>
<h3><font face="Arial, Helvetica, sans-serif">With this, your site is multi site. 
  Now, you may want give the possibility to your sub sites to have personnal (exclusive) 
  <p><font face="Arial, Helvetica, sans-serif">Explication: your site is &quot;multi 
    site&quot;. 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.</font></p>
<h3><font face="Arial, Helvetica, sans-serif">In the folders &quot;domain1&quot;, 
  &quot;domain2&quot;, &quot;othersubdomain.domain2&quot;: </font></h3>
  <p><font face="Arial, Helvetica, sans-serif">Create a folder <b>themes</b> in 
    each of them.</font></p>
  <p><font face="Arial, Helvetica, sans-serif">In that folder, you have to create 
    an empty &quot;index.html&quot;, 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 <b>HAS TO HAVE A DIFFERENT 
    NAME</b>. 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.</font></p>
<h3><font face="Arial, Helvetica, sans-serif">That is all for the personal themes.</font></h3>
<h3><font face="Arial, Helvetica, sans-serif">A personal pntables.php ? </font></h3>
  <p><font face="Arial, Helvetica, sans-serif">Easy ! just copy pntables.php into 
    your &quot;parametes/linux.mouzaia&quot; folder. Then you can modify it. If 
    the system does not find a pntables.php in that folder, it uses the master 
<h3><font face="Arial, Helvetica, sans-serif">Personal Images.</font></h3>
<p><font face="Arial, Helvetica, sans-serif">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 &quot;config_images.php&quot;. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">&lt;?</font></p>
  <p><font face="Arial, Helvetica, sans-serif" size="2">/* 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. 
    */ <br>
    // $tipath = WHERE_IS_PERSO.$tipath; <br>
    // $userimg = WHERE_IS_PERSO.$userimg; <br>
    // $adminimg = WHERE_IS_PERSO.$adminimg; </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">?&gt;</font></p>
<p><font face="Arial, Helvetica, sans-serif">You may find one &quot;config_images.php&quot; 
  in the folder &quot;NS-Multisites/installation&quot;. Copy it as explained above.</font></p>
<p><font face="Arial, Helvetica, sans-serif">Then, create a folder &quot;themes&quot; 
  in the parameters/linux.mouzaia/images, eventually a folder &quot;menu&quot;, 
  and a folder &quot;admin&quot;. 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. </font></p>
<p><font face="Arial, Helvetica, sans-serif">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 &quot;themes&quot; 
<h3><font face="Arial, Helvetica, sans-serif">It does not work ! </font></h3>
<p><font face="Arial, Helvetica, sans-serif">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.</font></p>
<p><font face="Arial, Helvetica, sans-serif">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 ....</font></p>
Return current item: ProNuke. Postnuke To Oracle