Print Page | Close Window

Multiple Sites - One Member DBase

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=8379
Printed Date: 07 April 2026 at 1:07pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Multiple Sites - One Member DBase
Posted By: KerryG
Subject: Multiple Sites - One Member DBase
Date Posted: 28 December 2003 at 1:35pm

I currently have 4 websites running Snitz. They each have their own message forums but share a common member database. Although I have searched high and low through here, I don't see a way to migrate my users and messages between the current versions of both packages. However, I am still seriously considering a move to WWF.

One thing I need to know is if there is an easy way to recreate what I have with a common member database and multiple sites running off of it or if there is another way to accomplish the same thing. Thanks.

KerryG
http://www.wildhobbies.com - http://www.wildhobbies.com

 




Replies:
Posted By: india
Date Posted: 28 December 2003 at 1:36pm
Search the Forums


Posted By: KerryG
Date Posted: 28 December 2003 at 1:46pm

I did. I didn't find anything that was the same as what I was asking. The Snitz-to-WWF seems to be covered well (not gonna happen) but I couldn't find a good solution to my multiple sites question. In Snitz, it is very easy as the config file has a seperate line for the members table name, so you simply set them all to the same table.

KerryG
http://www.wildhobbies.com



Posted By: michael
Date Posted: 29 December 2003 at 9:11am
You would have to do some code changes, basically you could take the table prefix out of the _author table, then have a prefix for all other sites. This will mean you would have to go into pretty much every page to get that accomplished. An easier way, if you use SQL is to replicate that one table into the other created member tables, writing a trigger could do the trick.

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: KerryG
Date Posted: 29 December 2003 at 12:10pm

Replication is certainly one way but is not effecient from a data point of view and creates needless redundant data. If all I have to worry about is the author table, I am thinking a global search and replace would be the easiest. Wouldn't this accomplish what I am looking for relativly easy:

Search: strDbTable & "Author.
Replace: strMemberTable & "Author.

Add to common.asp: Const strMemberTable = "Site1" ' eaxh site prefix

Assuming that is all I need to do, wouldn't ve easier than replication? Since I haven't been working with the code, I would appreciated anybody that knows it to tell me if this is a workable solution. Thanks.

KerryG



Posted By: WebWiz-Bruce
Date Posted: 29 December 2003 at 12:31pm
If you are running from one SQL server database, there is already a table pre-fix varaiable in the common.asp file.

The way to get them all then to use the same author table is to do as you suggest and do a global search and replace on each of the forums you instal to use the same Author table.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: KerryG
Date Posted: 29 December 2003 at 12:39pm

Great, thanks. I just wanted to verify that it was only the authors table.  Too bad I can't convert from Snitz well, but I looked at phpBB too and there is no converter that works with the latest versions of either package eaither.

Now I just need to make a final decision between WWF and phpBB. Any feedback would be appreciated.



Posted By: boomer
Date Posted: 14 January 2004 at 3:58pm

I have a similar issue but don't know if the solution above applies. Basically, I have several sites each using WWF and would like them all to use one member table so that registered users of any of the sites will be able to log in to all of the sites. Can someone describe what code changes I would need to make to have this happen?

BTW, I am using the Access version of WWF...



Posted By: KerryG
Date Posted: 14 January 2004 at 4:03pm

Basically, as mentioned above, there is a variable for table prefix in the common.asp file. The problem is it will append that prefix to the users table as well. So in the code, you can do one of the following:

1. remove the table prefix variable from every reference to the users table

2. Hard code a new prefix for every reference to the users table

3. Create a new variable to store a prefix to the users table and then modify every reference of the original table prefix to the users table to use the new variable.

I would REALLY like to see the code base changed to use option 3.



Posted By: boomer
Date Posted: 14 January 2004 at 4:22pm

One of the forums is live, the others are in development. As an easier way to get past this problem, could I just configure the other (new) forums to use the existing Access database for everything by setting the path to my existing Access db in the common.asp file?



Posted By: KerryG
Date Posted: 14 January 2004 at 4:30pm

If they all use the same table prefix they will all have the same forums and message database as well. Each site should have its own prefix for messages and a common one for the users if that is what you are trying to accomplish.



Posted By: boomer
Date Posted: 14 January 2004 at 4:56pm

Good point. Not sure what syntax would be involved in changing the table prefix. If my DBname is default, ie wwF.mdb and all table names are unchanged, how do I get forum2 to use forum1's user table?

Thanks so much for your help...



Posted By: wistex
Date Posted: 15 January 2004 at 7:17am

I am doing this, and it works well.  You need to do some modding to get this to work though.

This mod is NOT for non-programmers.  Since each project is unique, I can't just give you code.  But here is the steps you need to take.  If you don't know what I am talking about, then this mod is not for you. 

Note: This is not the only way to do it, but this method does work.

You do the following:

  1. Install and set-up WWF like normal.
  2. Set-up your DNS so that multiple domains point to the same copy of WWF.
  3. At the end of common.asp, use server variables to detect what domain name is being used and set a variable you will key on later.
  4. If you want to change certain variables based on the domain name, do so here using if then statements.  The variables you set wll override the variables in the database if you do this at the end of common.asp.  This is useful if you want one domain to have one forum name, and another domain name to have a different forum name, for example.
  5. If you want certain forums to display on certain domain names, you will need to create a field in the database that specifies this.  How you stucture it will depend on what you are trying to accomplish.  Alternately, you could hard code it in the default.asp page instead of using a database field.
  6. Change default.asp so that it displays the correct forums for the correct domains by using if then statements based on the domain (using the variable you set at the end of common.asp) and the field you put in the database.  If you don't use a field in the database, then you will need to hard code your preferences.
  7. All the other pages should work fine without modifications if you used my method of overriding the database variables in step 4.

I hope that helps and good luck.



-------------
http://www.wistex.com" rel="nofollow - WisTex Solutions
http://www.caribbeanchoice.com/forums" rel="nofollow - CaribbeanChoice Forums


Posted By: boomer
Date Posted: 16 January 2004 at 2:48pm

what are the potential issues with running two or more forums from one database where I would use a different table prefix for each forum, but hardcode the single user table into the asp for the fourms so that they could all share a user table?

also, is there a way I could just tell the forums to go to database(forumname) for the forum data, and then tell them all go to the same database for the user table instead? i.e., could I hardcode the path to the db with the user table I want to use into the asp somewhere?



Posted By: ivnj
Date Posted: 16 January 2004 at 6:01pm

I did the same thing migrating from Snitz.  I baught a copy of MS Access 2003 Upgrade.  And then I imported

Forum_Members, Forum_Reply, Forum_Topics

from my Snitz Database into my WWF database.  I reregistered all ny users with the same info and 12345 password at my WWF site.  I had 13 posts and 52 replys.  So I made 13 posts and 523 replys.  Not all cuz it would take to long to retype.  Just aaaa subject and bbbb message.

Cuz the database table are all related.  It is easier to copy stuff in with the appropriate # of fields rather than make new ones.

Then in Access under tbl_Author added E-Mail address and what ever else except passwords cuz they are encrypted.  I looked at the Author_ID in there copyed it to a notepad file.  The ID and corresponding name. 

In tbl_Topic I copied the Topic_ID Forum_ID and Subject to a note pad file.

Or Paint works to.  Print Screen and paste in Paint.

I wrote down the Forum_ID from the Snitz site with 13 topics and the corresponding subjects somewhere. 

I filled the Subject colum in the tbl_topic with the new ones from Forum_Topics in T_Subject colum which I had imported from the Snitz database. 

I also copied the T_Message colum to the right of T_Subject colum as they'll now be considered replys. 

Then I opened tbl_Thread and in the Message colum I pasted the stuff I just copied from T_Message in the Forum_Topics into the Message colum.

Then I opened Forum_Reply which I imported from the Snitz Database.  And I copied the whole R_Message coloum and pasted it right under the ones I just added in tbl_Thread in the Message colum.

Save the whole database.  Make a backup if U have to now. 

Then in tbl_Thread just match the Topic_ID and Author_ID with the Notepad files U saved.

 

Seems like a lot but I did it in 1 day.  And I'm no expert.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net