Author |
Topic  |
|
Mikeg
Starting Member
6 Posts |
Posted - 06 July 2001 : 17:17:50
|
Ok I've been going through the code for 2 days with minimal progress. Any help I can get here is *GREATLY* appreciated. Here I go.
First of all I'm running on SQL/2000. I have a Users table for my board that is unrelated to snitz. I want registered users to be able to get into the snitz forum and automatically be recognized as logged in since they have logged on to the main board. What is the best way of doing this????
I know this is not the best way but the first way I am trying is when the user makes an account on the board, I insert into both the main userdetails table as well as snitz's forum_member table. This is all i've done so far and am having major problems going to the next step, made worse by my Visual Interdev debuggin acting up.
Thanks for reading this!!!
mikeg89@hotmail.com
|
|
big9erfan
Average Member
  
540 Posts |
Posted - 06 July 2001 : 17:55:36
|
*ths method assumes people allow cookies*
First try setting the cookies the forum uses to website, not forum.
Then, when the user going through the logon process set in cookie info.
In inc_top I think it checks the cookie first to see if they are logged in and if so shows that.
Give a check in inc_top though, I VERY well could be mistaken.
http://www.ugfl.net/forums |
 |
|
Mikeg
Starting Member
6 Posts |
Posted - 06 July 2001 : 18:01:36
|
Thanks for the quick reply.
I didn't make myself completely clear the user will be logining in through the main website before they get to the forum. I want to completely get rid of snitz's textbox's for the login.
So basically I want to set the cookie in the main board and have snitz recognize that cookie and auto login.
Thanks again
|
 |
|
big9erfan
Average Member
  
540 Posts |
Posted - 06 July 2001 : 18:29:06
|
Ah okee....I see now.
You'll have to edit inc_top for that to remove that form when they are logged in. I don't know what you want to do with the case where they aren't or they clear their cookies, or something wacky like that....
You'll still have to set the cookie info and then some session varaibles I believe, but that should be asked of someone who has done this, and I know there are a number of examples floating out there where the forum login is actually outside the forum.
http://www.ugfl.net/forums |
 |
|
Mikeg
Starting Member
6 Posts |
Posted - 06 July 2001 : 18:37:45
|
ok thanks alot
anybody with any links that might help me out that would be awesome... I can't seem to find any been lookin for hours ...
mikeg89@hotmail.com
|
 |
|
jlcox
Starting Member
7 Posts |
Posted - 09 July 2001 : 23:28:01
|
I did exactly what you are aiming for. It required a lot of hand-coding, so I hope you're comfortable with ASP 
Basic procedure, as well as I can remember, was to first copy some of the information (primary key, username) from my "other" user table to the forums user table to avoid having to do massive recoding. I then modified my entry forms for the "other" table to do an additional insert/update for the forums user table to keep them in sync. (This might not be the optimum approach as far as database theory goes, but it eliminates the need to do heterogeneous joins. I did not build in a matching delete function to avoid referential integrity problems with existing posts).
I added some additional session variables to my main login and used them in the forum code to determine that the user was logged in and under what name. It took about 8 hours or so to get it all working properly. It really wasn't that difficult a job; the hardest part was learning how the forum code works to make the necessary fixes. The other negative is that the forum now cannot be upgraded to a new release so easily. I'll either have to live with what I have, or go through it all manually to apply the changes.
Edited by - jlcox on 09 July 2001 23:30:05 |
 |
|
Mikeg
Starting Member
6 Posts |
Posted - 10 July 2001 : 22:42:28
|
That's exactly the way I went about it as well. So right now when you logon I set cookies and need to get snitz to check those cookies from the "main" board instead of checking for the "snitz" cookies.
I took a couple day break from it, too many headaches :) ..I'm go work at it right now.
Thanks for the help
|
 |
|
jlcox
Starting Member
7 Posts |
Posted - 11 July 2001 : 08:32:20
|
I didn't mess with the cookies. Instead, I passed the necessary information from my login over to the forum as session variables and let the forum code deal with the cookies. For instance, in inc_top.asp, I changed:
strDBNTUserName = Request.Cookies(strUniqueID & "User")("Name") strDBNTFUserName = Request.Form("Name")
to strDBNTUserName = Session("DisplayName") strDBNTFUserName = Session("DisplayName")
where the latter refer to a session variable set by my login process. The DoCookies function in the inc_functions.asp file will set the cookies based on those values.
|
 |
|
Mikeg
Starting Member
6 Posts |
Posted - 13 July 2001 : 16:16:16
|
looks good to me.. i've changed so many lines of code that I think im gonna have to re-install and start over .. But ya im gonna try that I'll let ya know .. Is this method going to stop the user from having to click LOGON ??? .. I want to just get rid of that whole upper right hand corner ...
Thanks again. Great Help
|
 |
|
jlcox
Starting Member
7 Posts |
Posted - 16 July 2001 : 12:37:53
|
I eliminated the top right-hand corner login area, and removed some of the links (Register, Profile, etc). I'm pretty sure it's in the inc_top.asp file.
|
 |
|
|
Topic  |
|