Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
jaded
Theme Guru


Joined: Nov 01, 2003
Posts: 1006

PostPosted: Tue Mar 15, 2005 4:02 pm Reply with quote

I was asked a question today by a site visitor that I do not know the answer to. I have decided to ask here and hopefully cover all bases for him.

He currently has a 7.5 nuke site.

He would like to create a subdomain site.

He would like for both sites to run off the same nuke_users table.

He does not want to just have the users transfered.

He wants to have it where when the subdomain is created. It is populated with the same nuke_users table. Therefore, when someone should sign up on one site they will actually be signed up on both.

He wants the sites to be totally independent of content , blocks, modules, etc.

I do not believe this can be done and if it can then how???


As always any help would be greatly appreciated.

Thank you, Jaded

_________________
Themes BB Skins Only registered users can see links on this board! Get registered or login!
Graphic Tees Only registered users can see links on this board! Get registered or login!
Paranormal Tees Only registered users can see links on this board! Get registered or login!
Ghost Stories & More Only registered users can see links on this board! Get registered or login!

Last edited by jaded on Tue Mar 15, 2005 10:10 pm; edited 1 time in total 
View user's profile Send private message Visit poster's website
TheosEleos
Life Cycles Becoming CPU Cycles


Joined: Sep 18, 2003
Posts: 960
Location: Missouri

PostPosted: Tue Mar 15, 2005 4:14 pm Reply with quote

I don't see how that is possible at all.

You would have to have a total control server, I would think.

You would have to use a script that would have one site update the other sites user list any time someone new signs up.

Like I said, they would probably need root access on the box.

I may be all wet on this but I don't think so.

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website AIM Address ICQ Number
chatserv
Member Emeritus


Joined: May 02, 2003
Posts: 1389
Location: Puerto Rico

PostPosted: Wed Mar 16, 2005 1:24 am Reply with quote

They can create a second set of db tables on the same database, for the second site he should create all tables except for users and temp_users, these new tables of course need a different prefix so that they can both exist on the same database, the only difference when setting it up is that $prefix on the new site's config.php file should be that of the newly created tables, $user_prefix should be that of the other site's $prefix.
 
View user's profile Send private message Visit poster's website
jaded
PostPosted: Wed Mar 16, 2005 6:33 am Reply with quote

thank you Chat, you always know!
 
TheosEleos
PostPosted: Wed Mar 16, 2005 8:21 am Reply with quote

Embarassed

worship Chat
 
chatserv
PostPosted: Wed Mar 16, 2005 9:49 am Reply with quote

To further explain:

The existing site remains untouched, no changes required, let's assume these are the settings on the existing site's config.php:

$dbhost = "localhost";
$dbuname = "db uname";
$dbpass = "db pass";
$dbname = "db name";
$prefix = "nuke";
$user_prefix = "nuke";
$dbtype = "MySQL";
$sitekey = "SdFk*fa28367-dm56w69.3a2fDS+e9";
$gfx_chk = 0;
$subscription_url = "";

It uses nuke as its $prefix, assuming the new site will use sub as its $prefix, you would edit its config/php as follows:

$dbhost = "localhost";
$dbuname = "db uname";
$dbpass = "db pass";
$dbname = "db name";
$prefix = "sub";
$user_prefix = "nuke";
$dbtype = "MySQL";
$sitekey = "SdFk*fa28367-dm56w69.3a2fDS+e9";
$gfx_chk = 0;
$subscription_url = "";
 
klipywitz
New Member
New Member


Joined: Jun 08, 2005
Posts: 6

PostPosted: Wed Jun 08, 2005 6:01 pm Reply with quote

So,

Could you technically revert this option? Do the opposite?

I mean, could you have two identical sites content-wise, with two different user bases by swapping prefix and user prefix?


ie:

Quote:

The existing site remains untouched, no changes required, let's assume these are the settings on the existing site's config.php:

$dbhost = "localhost";
$dbuname = "db uname";
$dbpass = "db pass";
$dbname = "db name";
$prefix = "nuke";
$user_prefix = "nuke";
$dbtype = "MySQL";
$sitekey = "SdFk*fa28367-dm56w69.3a2fDS+e9";
$gfx_chk = 0;
$subscription_url = "";

It uses nuke as its $prefix, assuming the new site will use differentusers as its $user_prefix, you would edit its config/php as follows:

$dbhost = "localhost";
$dbuname = "db uname";
$dbpass = "db pass";
$dbname = "db name";
$prefix = "nuke";
$user_prefix = "differentusers";
$dbtype = "MySQL";
$sitekey = "SdFk*fa28367-dm56w69.3a2fDS+e9";
$gfx_chk = 0;
$subscription_url = "";


Would that work?
 
View user's profile Send private message
chatserv
PostPosted: Wed Jun 08, 2005 7:44 pm Reply with quote

You could try and find out if no problems arise.
 
klipywitz
PostPosted: Fri Jun 10, 2005 3:24 pm Reply with quote

I just might... Smile


Thanks!
 
blith
Client


Joined: Jul 18, 2003
Posts: 977

PostPosted: Wed Nov 23, 2005 6:23 pm Reply with quote

Very cool. i wanted to do this a while ago and I think I even asked about a year ago... this is awesome... and no one has had any problems with it?
 
View user's profile Send private message Visit poster's website
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

PostPosted: Wed Nov 23, 2005 8:24 pm Reply with quote

Well there are some problems with sharing the users table, mostly with the forums.

Users will only have one user profile, one signature, one avatar, one post count. Also, they may have problems when visiting the forums since the latest visit date is stored in that table. It won't properly show the latest unread posts on one forum, when you've visited the other forum.

It's quite cool to do though, I do this on my sites.

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©