In this
thread you can read the following, written by Onokazu:
Re: Multiple sites off single codebase
This should be now a lot easier in 2.0.4.
Let's say that you have uploaded all XOOPS files to /var/html/www, and want all other users to share these files.
First, for each of the virtual domains, create mainfile.php in which following constants are defined:
XOOPS_CACHE_PATH, XOOPS_UPLOAD_PATH, XOOPS_THEME_PATH", XOOPS_COMPILE_PATH, XOOPS_THEME_URL, XOOPS_UPLOAD_URL
For example, mainfile.php of 'hogehoge' user will be something like below:
define("XOOPS_CACHE_PATH", "/home/hogehoge/xoops/cache");
define("XOOPS_UPLOAD_PATH", "/home/hogehoge/public_html/uploads");
define("XOOPS_THEME_PATH", "/home/hogehoge/public_html/themes");
define("XOOPS_COMPILE_PATH", "/home/hogehoge/xoops/templates_c");
define("XOOPS_URL", "http://www.hogehoge.com/xoops");
define("XOOPS_THEME_URL", "http://www.hogehoge.com/themes");
define("XOOPS_UPLOAD_URL", "http://www.hogehoge.com/uploads");
define('XOOPS_DB_PREFIX', 'xoops');
define('XOOPS_DB_USER', 'hogehoge_xoops');
define('XOOPS_DB_PASS', 'hogehoge');
define('XOOPS_DB_NAME', 'hogehoge_xoops');
and the directory structure of the user will be like below:
/home/hogehoge/xoops/mainfile.php
/home/hogehoge/xoops/cache/ (chmod 777)
/home/hogehoge/xoops/templates_c/ (chmod 777)
/home/hogehoge/public_html/uploads/ (chmod 777)
/home/hogehoge/public_html/themes/
Next, create symlink between the user directory and the directory where XOOPS core files are uploaded
ln -s /var/html/www /home/homehome/public_html/xoops
The final step is to modify the /var/html/www/mainfile.php file so that it will read mainfile.php placed under the user directory. If you are running Apache you can use $_SERVER['DOCUMENT_ROOT'] to get the directory of the user.
I would like to hear from you if you succeed!
Success!