|
Though not as standard as the previous steps, the multiple site combination is definitely a method to consider. The time requirements needed to complete all the steps for the branching method can sometimes take hours. Installing multiple sites and sharing some table data, even with cleanup of unneeded files and tales, should rarely take longer than an hour. Combining a couple simple sites might require no more than a few minutes to get up and running fully. You can begin with the following virtual server configuration. Web Server ConfigurationThere are multiple installs of PostNuke in this method, so you need to configure your web server a little differently. Each of your domains need to look to the different installs. Here's an example of how this is done in the Apache httpd.conf file: <VirtualHost *> DocumentRoot /var/www/pets ServerName www.familypets.com </VirtualHost> <VirtualHost *> DocumentRoot /var/www/dogs ServerName dogs.familypets.com </VirtualHost> <VirtualHost *> DocumentRoot /var/www/forums ServerName forums.familypets.com </VirtualHost> IIS users will need to use Windows Server 2003 in order to host the multiple sites. If you need to run a Multisites installation under Windows XP, using Apache's httpd web server is recommended. PostNuke InstallInstall PostNuke normally into each of the prepared root directories defined previously. Use the same database name for each. Documenting Table ChangesNow, you need to confirm which tables will be sharing their information with which installs. An easy way of documenting this is by expanding the draft in Table 25.2. Add the table name and mark what is shared or private. You can ignore areas that will universally not be shared. The familypets example is shown in Table 25.4.
Editing pntables.phpComplete sets of pntables.php files are in each install. Based on the tables you want to share, edit the appropriate tables files to reference the mutual tables. Open the pntables.php files in your editor and look for the table definitions that begin like this: $faqcategories = $prefix . '_users'; The shared table prefix should replace the variable call so the separate install is forced to use a different table for that module. Following the familypets example, the dogs install's references should look to the nuke main site for users. The prefix "nuke" would be hard-coded into the table reference like so: $faqcategories = 'nuke_users'; Make similar changes to each table you want shared. You do not have to base the changes on one primary site. Site1 might share tables with Site2, while Site3 shares tables with Site2 and Site4. Any combination is possible. Removing Unneeded TablesUse the chart you made with the shared table names similar to Table 25.4 to determine which database entries can now be deleted. Use your database management tool to clean up your shared database. Now, your sites are linked. Yes, it's that simple. |
|