| Re: ONO's Codebase example |
| by Herko on 2003/11/20 10:05:49 I guess Ono should answer this himself, but he's in the process of moving to a new place (physically) at the moment. In this new place he'll have a 100 mbit fiber optic line at his disposal, so I guess (and hope -hint hint) he'll be online more often after the move ![]() Herko |
| Re: ONO's Codebase example |
| by RicoCali on 2003/11/19 23:52:59 ...anyone? |
| ONO's Codebase example |
| by RicoCali on 2003/11/19 19:08:18 I would like to thank ONO for providing this codebase example for us...as it is great value to me. Unfortuneately, there are some typo errors in his follow example and need someone to verify. I'm a bit confused with the directory paths that he has used. I think they are typos. Also the softlink looks wrong also. "homehome"?: 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. |