Page 1 of 1

1 Install 2 Databases

Posted: Thu Feb 03, 2011 5:59 am
by Gugsy
Is it possible to use 1 Serendipity install with 2 Databases and call from them based on conditions such as:

-time of day
-geo-location
-ip address
-useragent

If so a brief outline and some pointers for where to start would be appreciated?

Thanks.

Re: 1 Install 2 Databases

Posted: Thu Feb 03, 2011 11:59 am
by garvinhicking
Hi!

Yes, you could edit your serendipity_config_local.inc.php file. Inside there you can add your time of day / whatever checks, and depending on the output you set the $serendipty variables in that file accordingly to the one database or the other.

Regards,
Garvin

Re: 1 Install 2 Databases

Posted: Thu Feb 03, 2011 3:55 pm
by Gugsy
Okay, Thanks. Am I also correct in thinking that I could use just the one database but use a separate database prefix to achieve the same end?

Re: 1 Install 2 Databases

Posted: Thu Feb 03, 2011 3:59 pm
by garvinhicking
Hi!
Gugsy wrote:Okay, Thanks. Am I also correct in thinking that I could use just the one database but use a separate database prefix to achieve the same end?
Sure, that ends up the same!

Regards,
Garvin