4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: Jacob on April 12, 2007, 05:32:16 AM

Title: 2 (two) 4images galleries using same user database?!
Post by: Jacob on April 12, 2007, 05:32:16 AM
Hello friends,

I want to run two 4images galleries like one on main domain and second on a subdomain.

So, i want that these galleries should use same user database (only user database) like if someone register at gallery one on main domain or gallery two on subdomain... he can use same login details to login in both galleries.

Is it possible?? Can someone guide me to right direction ?  :roll:

Thanks all for your help   :)
Title: Re: 2 (two) 4images galleries using same user database?!
Post by: KurtW on April 12, 2007, 06:02:10 AM
Hi,

test this...  :wink:

install two 4images with seperate db
in one db rename the userstable in... 4images_users_2

in one includes/constants.php

find:
Code: [Select]
define('USERS_TABLE', $table_prefix.'users');replace with:
Code: [Select]
define('USERS_TABLE', $table_prefix.'users_2');


cu
KUrt
Title: Re: 2 (two) 4images galleries using same user database?!
Post by: Jacob on April 12, 2007, 07:59:33 AM
Thanks Kurt bud, i will try it out :)
Title: Re: 2 (two) 4images galleries using same user database?!
Post by: KurtW on April 13, 2007, 06:11:56 AM
Hi,

sorry, is not working...

This works:

in one includes/constants.php

search:
Code: [Select]
if (!defined('ROOT_PATH')) {
  die("Security violation");
}
after add:
Code: [Select]
$table_prefix_2 = "4images_2_";
search:
Code: [Select]
define('USERS_TABLE', $table_prefix_2.'users');
You must install the 2 galeries in one db with different prefix:
- 4images
- 4images_2

Now 4images with prefix "4images" use the usertable from prefix "4images_2"


cu
KUrt