Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Feb 2002
Posts: 295
Member
Member
Offline
Joined: Feb 2002
Posts: 295
Hi,

Some questions if I may...

(Not certain if this is the right forum, btw. If it isn't my apologies)

Our site consists of 2 distinct areas, a memberarea and a message board, both of these unfortunately use their own database. People need to pay for memberarea access and we would like to know on the message board which members have and which have not paid. This info will allow us to give more features to paying members.

In order to realize this we need to combine the registration processes.

JoshPet was already nice enough to point us in the right direction a bit in that we need a seperate group on the board to identify paying members. I assume I then need to have the registration process add a user to this group if he has paid.

And this is where I begin to run into problems

To be honest I am a bit stuck at how to best handle this. Preferably I think I would like to use the UBBT registration and add additional fields for our account options (free, 1-month trial, 1-year, etc.).
Alternatively we could use the info on our registration page to create a useraccount on the board.

My partner has had a look at this a bit and has the following questions:
* How can we see if a user exists?
I assume this could be done by a query on Username and / or email address, right?

* How can we create a new user in UBBT?
I think this is done in adduser.php, but could we do this with an SQL query as well? Or do we need to use this script?

An added complication, I think, is that the databases run on different machines, so a solution using only SQL queries would be great since the account creation could then be done remotely from the billing server.

Anyway, I hope this is clear and that someone could provide us with some pointers.

Sanuk!

Sponsored Links
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Well if the two database tables where combined to one database there would be a way to mesh things together and do it. While they are on separate machines and separate databases it makes it extremely hard. Basically what needs to happen is you would need to set up the threads group function that you would want. You would need to add the tables from the one database into the threads database. From there it is a process of meshing the two registration scripts and placing the new variables for selection into the UBBT template for the user to select.

Now of course combining these two scripts could be as easy as adding an if and else statement. You need to specify and let the user select yes or no to be paying member. If no they get normal registration screen. If yes then they get the combined template.

So in summary

if yes (runscript)

grab newuser2.tmpl

else

if no

grab newuser1.tmpl

One of the Guru's around here may be able to put another spin on this idea and understand what I am saying. I am a bit pressed for time but I will look further into the exact syntax of my idea when I return from work if no one else has thrown in any ideas.

Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
[]Our site consists of 2 distinct areas, a memberarea and a message board, both of these unfortunately use their own database. People need to pay for memberarea access and we would like to know on the message board which members have and which have not paid. This info will allow us to give more features to paying members.

In order to realize this we need to combine the registration processes. [/]

You don't need to combine the registration process if you only want to know if the forum user has also access to your member area. That should be doable with some sql queries within the forum code that queries the user-db of the members-area.

Combining the registration process is also possible, but is far more complicated. You'll have to synchronize the two databases in both ways.

Scenario 1: A user wants to change is email address. Without synchronizing, he'll have to change it in the forum and in your member-area.

Scenario 2: A user should be deleted, banned in the forum. Shouldn't this be done in the forum also?

Scenario 3: The access to the member area expired, this info needs to be transfered to the forum db, so that the group can be changed...

So'll have to decide if you only want to display some additional info on your board or if you want to acchieve an intregration/synchronisation of the board and members area.






Joined: Feb 2002
Posts: 295
Member
Member
Offline
Joined: Feb 2002
Posts: 295
Hi,

"You don't need to combine the registration process if you only want to know if the forum user has also access to your member area."
This would in principle be enough, but since we are getting quite a few people who are getting confused with two seperate logins combining it into one registration process would be preferable.

Having said that, just knowing would already solve a lot of our problems.

Sanuk!

Joined: Feb 2002
Posts: 295
Member
Member
Offline
Joined: Feb 2002
Posts: 295
Hi,

"While they are on separate machines and separate databases it makes it extremely hard."
As we have noticed
My partner has been looking into this for quite a while already. So far, no luck.

Thanks for the breakdown, had not thought of using two different templates. I was thinking about having it on one template.

Sanuk!

Sponsored Links
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
[]This would in principle be enough, but since we are getting quite a few people who are getting confused with two seperate logins combining it into one registration process would be preferable.
[/]

As i said before, it won't be done with one registration process. Making a registration page that writes the data in the ubb.threads database and in your members area database isn't difficult. The difficult part is the interacting of the two databases. You need to update your members database also, when someone changes his email address within threads and vice versa.

So you'll have to enhance several threads scripts aswell as your scripts of your member area. I don't recommend doing that. Maintaing the same data in two databases always produces inconstiences and errors.
Using the same usertable for threads and your members area would be the better way, in my opinion.
Depending the scripts that you use in your member area, it would be less work and a cleaner solution.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Astaran brings up another great idea here. You could in essence us the script base code and change it to use the Threads database tables then your golden. At any rate you are looking at quite a job either semi time consuming to a vast project. Either way you decide to go like stated you would either need to code the other program to use Threads tables or combine the two.

Joined: Feb 2002
Posts: 295
Member
Member
Offline
Joined: Feb 2002
Posts: 295
Hi,

"You need to update your members database also, when someone changes his email address within threads and vice versa."
Yes, but this should not be that difficult since we do not store much info in the members database, and with the exception of the password none of this can be changed by a user.

So, we could use all the UBBT scripts only, and make them update both databases. While this is obviously risky and not good practice, it would work and should be fairly transparent to the users.

"Using the same usertable for threads and your members area would be the better way, in my opinion.
Depending the scripts that you use in your member area, it would be less work and a cleaner solution."
You do have a very good point here. I have no idea about these scripts, but will ask my partner for a copy.

The suggestion one of my friends had was to do this:
- let the memberarea registration page update the UBBT database (U_groups)
- run a script daily that checks the memberarea database and updates the U_groups table in the UBBT database (removing expired accounts)

I think this may be a decent temporary solution while we work on combining everything. The thing is that we believe we could make a substantial increase in revenue by combining these and offering more features to paying members. The board has ~5 times as many active users as the memberarea.
So, obviously we would like to do this quickly.

Sanuk!

Joined: Feb 2002
Posts: 295
Member
Member
Offline
Joined: Feb 2002
Posts: 295
Hi,

"You could in essence us the script base code and change it to use the Threads database tables then your golden."
Yes, this does seem like a good option and I will have a closer look at it as well.

Sanuk!


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Zarzal
Zarzal
Berlin, Germany
Posts: 808
Joined: July 2001
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 2658
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 24
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)