Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Current Version (Old)
 Customizing Snitz - Logging In Outside of Forum
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

thewebgeeks
Starting Member

18 Posts

Posted - 20 June 2001 :  00:25:06  Show Profile
Hello,

I am an intermedite ASP Developer. I have a site that has an online store, voting, and of course, a Snitz Forum.

The voting and store run off the same database, using a log-in system for customers and visitors. I am looking to customize Snitz to use my current database of Customers for the forums. So that thier passwords and the cookies are the same. It would not be very efficent to make my vistors remember two passwords, and have two different cookies on their system. I have not yet wrote the code for my log-in system or cookies, so the options are not completely limited. I am very willing to code around Snitz's code to integrate mine with it.

I have srolled through the snitz forum files, and it seems that the cookies and log-in system are pretty integrated into the coding, and I am not even sure where to start. ANY tips, input, advise, or jumping off points ANYONE can give me are VERY much appreciated.

Thanks in advance for anyone who throws some ideas my way...



Edited by - thewebgeeks on 22 June 2001 06:03:06

thewebgeeks
Starting Member

18 Posts

Posted - 20 June 2001 :  15:16:12  Show Profile
up!

Go to Top of Page

work mule
Senior Member

USA
1358 Posts

Posted - 20 June 2001 :  16:14:44  Show Profile
up?

sooo...did you figure it out or do you still need some answers?

The Writer Community

"Do not go where the path may lead, go instead where there is no path and leave a trail."

-Ralph Waldo Emerson
Go to Top of Page

thewebgeeks
Starting Member

18 Posts

Posted - 21 June 2001 :  15:52:48  Show Profile
Hello,

The reason I posted "up" was to bump the topic up to the top again as I am still looking for help. I have started creating the log-in form from the main page, utilizing and customizing an add-on app I found on this forum. However, I cannot get it to work right, perhaps you can be of assitance.

My Application consists of these Files:

- loginpage.asp
- vfy.asp

The Loginpage.asp is called by an include into my website default page, not the forum default page. What I am attempting to do with it is see if the user is already logged in (cookies) - If so, then display that they are logged in as "name" and display logout/register links. If they are not logged in, then it should display the log in form. I have switched the Admin Cookie option to be set to the "website" instead of the forum.

I am having these two troubles:


1.) It is not reconzing that I am logged in, and nto displaying that I am logged in as "name", just displaying the log in form. I knwo this is because I am doing the request cookies thing wrong, but the world of Cookies is something I am not all that familiar with.

2.) If I am not logged in, and attmpt to do so via the "loginpage.asp" I get an error. It will not write a cookie.
-------------------------------------------------------------------
Microsoft VBScript runtime error '800a01c2'
Wrong number of arguments or invalid property assignment: 'DoCookies'
/login/vfy.asp, line 14
-----------------------------------------------------------------------



Here is the complete code for each of the pages: (line 14 of vfy.asp is bold)





Go to Top of Page

thewebgeeks
Starting Member

18 Posts

Posted - 21 June 2001 :  15:54:20  Show Profile
################ Loginpage.asp #################################
<%
if Request.Cookies(strUniqueID & "User")("Name") = "" Then
%>
<!-- Log In Form -->
<form action="/login/vfy.asp" method="post" id=form1 name=form1>
<INPUT type="hidden" name="Method_Type" value="login">
<A CLASS="regblack">Name:   </A>
<INPUT TYPE=TEXT NAME="Name" SIZE=10 value="Username" onFocus="if (value == 'Username') {value =''}" onBlur="if (value == '') {value = 'Username'}"><BR>
<A CLASS="regblack">Pass:    </A>
<INPUT type="password" NAME="Password" SIZE=10 value="PASS" onFocus="if (value == 'PASS') {value =''}" onBlur="if (value == '') {value = 'PASS'}">
<br><div align="center"><INPUT type="submit" value="Login" id=submit1 name=submit1>
<INPUT type="hidden" name="SavePassWord" value="true" CHECKED>
<br><a href="" CLASS="smallblack" onclick="open('/forums/pop_pword.asp','','width=300,height=250,top=0,left=0')">
Forgot Your Password?</a>
<a href="" CLASS="smallblack" onclick="open('/forums/pop_pword.asp','','width=300,height=250,top=0,left=0')">
Need To Register?</a></div>
</form>
<!-- /Log In Form -->
<%
Else
%>
You are logged on as<br>
<b><% =Session(strCookieURL & "username")%> (<% =Session(strCookieURL & "userid") %>)</b>
</font>
<!-- Logged In Form -->
<br><div align="center">
<br><a href="" CLASS="smallblack" onclick="open('/forums/pop_pword.asp','','width=300,height=250,top=0,left=0')">
Log-Out</a>
<a href="" CLASS="smallblack" onclick="open('/forums/pop_pword.asp','','width=300,height=250,top=0,left=0')">
Need To Register?</a></div>
<!-- /Logged In Form -->
<%
End If
%>
########################## End Loginpage.asp #########################

######################### vfy.asp ###################################

<!--#INCLUDE virtual="/forums/config.asp" -->
<!--#INCLUDE virtual="/forums/inc_functions.asp" -->
<%<%
dim mLev, strLoginStatus
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
strDBNTUserName = Request.Cookies(strUniqueID & "User")("Name")
strDBNTFUserName = Request.Form("Name")

select case Request.Form("Method_Type")
case "login"
select case ChkUser2(strDBNTFUserName, Request.Form("Password"))
case 1, 2, 3, 4
Call DoCookies(Request.Form("SavePassword"))
strLoginStatus = 1
case else
strLoginStatus = 0
end select
end select

mLev = cint(ChkUser2(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword")))

if request.serverVariables("PATH_INFO") <> (strCookieURL & "admin_login.asp") then
if (Application("down") AND mLev <> 4) then
response.redirect "mods/down.asp"
end if
end if
select case Request.Form("Method_Type")
case "login"
if strLoginStatus = 0 then
response.redirect "/default.asp"
else
response.redirect "/default.asp"
end if
Response.End
end select
%>
##################### End vfy.asp ##############################



Edited by - thewebgeeks on 21 June 2001 16:02:50
Go to Top of Page

thewebgeeks
Starting Member

18 Posts

Posted - 22 June 2001 :  15:41:57  Show Profile
up!

Please, anyone who understand SNitz's cookies functions please help me!!!

Go to Top of Page

Wixxerd
Starting Member

25 Posts

Posted - 23 June 2001 :  18:25:42  Show Profile
I integrated snitz to my site, but I use Microsoft Site Server, and an LDAP Membership Directory, so access is controlled from there.

All I did was write the snitz cookies when my site writes it's cookies as well. I also had to make sure the snitz forum was set to use "Website" cookies instead of "Forum".

The cookie only contains a string lewks sorta like this "Snitz00User=Cookies=&UName=Blah&Pass=SomeBlah"...

It's been a few days since i've been in that particular section of the code, but I think the function you are looking for is in "inc_functions.asp". The name of it is "DoCookies", (Also DeleteCookies and some others are in there.).

I had problems getting the forum to recognize a login as well, so I played with DoCookies function until I had it checking things at the right time.

Let me know if there's a specific section of code I might be able to help with... The Snitz Admins prolly know a lot more ...

Go to Top of Page

bjlt
Senior Member

1144 Posts

Posted - 23 June 2001 :  21:59:35  Show Profile
quote:

up!

Please, anyone who understand SNitz's cookies functions please help me!!!





did you include inc_functions and inc_top (take out the part you need for cookies and cases) config.asp? in your login page?

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.41 seconds. Powered By: Snitz Forums 2000 Version 3.4.07