Hacks

XOOPS Multi Sites

ldapguru  21-Jan-2004 22:03 10889 Reads   35 Comment(s) 
1. Backup your existing mainfile.php

2. Copy mainfile.php to .mainfile.php
eg: if your domain is http://www.ldapguru.net then copy mainfile.php to ldapguru.mainfile.php

3. Replace your existing mainfile.php with the following code:
if (!(isset($serverName))) 

$serverName $SERVER_NAME
$serverName str_replace("www.","",$serverName);
$serverName str_replace(".com","",$serverName); 
$serverName str_replace(".net","",$serverName); 
$serverName str_replace(".org","",$serverName); 

if (!(empty(
$serverName))) 

include(
$serverName."mailfile.php"); 
?>


4. Thats it !!!

An example instance is as follows:
If you want to run 1 XOOPS instance against the following 3 domains
http://www.domain1.com
http://www.domain2.net
http://www.domain3.net

You would create 3 files
domain1.mainfile.php
domain2.mainfile.php
domain3.mainfile.php

You could customize each file with it's unique URL. You could either keep the same database parameters (XOOPS_DB_HOST) or have unique ones. You could also have just 1 database with unique prefixes (XOOPS_DB_PREFIX) for each site.

the functionality is similar to what i have running on one of my non-XOOPS servers.

http://www.rohanpinto.com and http://www.chriselda.com are the same server, same hosting account and same content with the above script enabled. Remember these URL's are not running XOOPS, but rather the exact same process.


If you do not want to hack the code but download it, visit my XOOPS site at http://www.ldapguru.net, I shall be posting a Multi-XOOPS-Site download shortly.
Rating 0/5
Rating: 0/5 (0 votes)
Voting is disabled!


Login

Who's Online

357 user(s) are online (107 user(s) are browsing Publisher)


Members: 0


Guests: 357


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits

Categories