1
RicoCali
ONO's Codebase example
  • 2003/11/19 19:08

  • RicoCali

  • Not too shy to talk

  • Posts: 120

  • Since: 2002/7/29


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.

2
RicoCali
Re: ONO's Codebase example
  • 2003/11/19 23:52

  • RicoCali

  • Not too shy to talk

  • Posts: 120

  • Since: 2002/7/29


...anyone?

3
Herko
Re: ONO's Codebase example
  • 2003/11/20 10:05

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


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

Login

Who's Online

242 user(s) are online (137 user(s) are browsing Support Forums)


Members: 0


Guests: 242


more...

Donat-O-Meter

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

Latest GitHub Commits