xoops forums

kakos

Friend of XOOPS
Posted on: 4/27 11:16
kakos
kakos (Show more)
Friend of XOOPS
Posts: 76
Since: 2002/6/6 2
#1

xoops preferences "site close" override

Hi from Greece, hope you are all well and healthy

I need to have 2 xoops installations in my server www.myserver.com/xoops1 and www.myserver.com/xoops2 with one common db for both but the 1st need to be open so users can see the public stuff and the 2nd need to be closed so users need first to login.

Is it possible to override "site close" from Preferences --> general option --> general settings in a way?
Due to the common database any change applies to both.

The 2 sites have exactly the same content, theme, users, groups etc.

Mamba

Moderator
Posted on: 4/27 20:16
Mamba
Mamba (Show more)
Moderator
Posts: 10966
Since: 2004/4/23
#2

Re: xoops preferences "site close" override

Hmm, interesting question.

You probably would need to hack it, i.e. with each new XOOPS upgrade, you would have to do it again.

One would would be:

1) add to the Config table a new entry:
closesite2 with the value of 1

2) in your website2 change in the files that check for closesite:

if ($xoopsConfig['closesite'] == 1) {


to

if ($xoopsConfig['closesite2'] == 1) {


It seems that there are three files that do that:

login.php
include/checklogin.php
include/common.php

This is not tested, so I don't know if it will cause any other problems as side effects, therefore you can do it on your own risk.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

kakos

Friend of XOOPS
Posted on: 4/29 6:10
kakos
kakos (Show more)
Friend of XOOPS
Posts: 76
Since: 2002/6/6 2
#3

Re: xoops preferences "site close" override

Thank you very much!!!

It seems to work perfectly...

The version that I applied the changes is 2.5.5, I'm stuck on it due to lack of some modules (Gijoe, formulize etc)

Perhaps a config file that override some of the system settings in future versions of xoops would help especially in multi-site cases.