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)
 Login Help
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

fendi
Starting Member

8 Posts

Posted - 26 October 2001 :  05:39:07  Show Profile
Hi all,
I've just started to use Snitz and I'm wondering if it's possible to get users to login on another(custom)page. If so how to do it? I'm not very good with ASP and have taken a look at the login part (inc_top.asp, if I remember correctly) but still at a lost on getting Snitz to accept variables/cookies from a custom login page.
Any help?

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 26 October 2001 :  06:16:34  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
I've written a script for this on my site, I'll clean my code out of it and post it up here...

---------------
Da_Stimulator has spoken
Ongoing Project that uses Snitz forums as a backbone for entire website
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 26 October 2001 :  06:24:16  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
Please back up files before changing them...

Remove this completely from inc_top.asp...
<table align="center" border="0" cellPadding="0" cellSpacing="0" width="100%">
<tr>
<td valign="top" width="50%"><a href="default.asp"><img alt="<% =strForumTitle %>" border="0" src="<%=strTitleImage%>"></a></td>
<td align="center" valign="top" width="50%">
<table border="0" cellPadding="2" cellSpacing="0">
<tr>
<td align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b><% =strForumTitle %></b></font></td>
</tr>
<tr>
<td align="center"><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
<% call sForumNavigation() %>
</font></td>
</tr>
<%
select case Request.Form("Method_Type")

case "login"
%>
</table>
</td>
</tr>
</table>
<% if strLoginStatus = 0 then %>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Your username and/or password were incorrect.</font></p>

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Please either try again or register for an account.</font></p>
<% else %>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">You logged on successfully!</font></p>

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Thank you for your participation.</font></p>
<% end if %>
<meta http-equiv="Refresh" content="2; URL=<% =Request.ServerVariables("HTTP_REFERER") %>">

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="<% =Request.ServerVariables("HTTP_REFERER") %>">Back To Forum</font></a></p>

<% WriteFooter
Response.End
case "logout"
%>
</table>
</td>
</tr>
</table>

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">You logged out successfully!</font></p>

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Thank you for your participation.</font></p>

<meta http-equiv="Refresh" content="2; URL=<% =Request.ServerVariables("HTTP_REFERER") %>">

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="<% =Request.ServerVariables("HTTP_REFERER") %>">Back To Forum</font></a></p>

<% WriteFooter
Response.End
end select

if (chkUser((strDBNTUserName), (Request.Cookies(strUniqueID & "User")("Pword"))) = 0) then
%>
<form action="<% =Request.ServerVariables("URL") %>" method="post" id=form1 name=form1>
<INPUT type="hidden" name="Method_Type" value="login">
<tr>
<td align="center">
<table>
<tr>
<% if (strAuthType = "db") then %>
<td><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><b>Username:</b></font><br>
<INPUT type="text" name="Name" size="10" value=""></td>
<td><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><b>Password:</b></font><br>
<INPUT type="password" name="Password" size="10" value=""></td>
<td valign="bottom">
<% if strGfxButtons <> "0" then %>
<INPUT src=button_login.gif type="image" value="Login" id=submit1 name=submit1 border=0 hspace=4>
<%
else
if strGfxButtons = "0" then
%>
<INPUT type="submit" value="Login" id=submit1 name=submit1>
<%
end if
end if
%>
</td>
</tr>
<tr>
<td colspan="3" align="left"><font face="<% =strDefaultFontFace %>" size="<%=strFooterFontSize %>">
<INPUT type="checkbox" name="SavePassWord" value="true" CHECKED><b> Save Password</b></font>
</td>
<%
else
if (strAuthType = "nt") then
%>
<td><font face="<% =strDefaultFontFace %>" size="1" color="red">Please <a href="policy.asp">register</a> to post in these Forums</font></td>
<%
end if
end if
%>
</tr>
<% if (lcase(strEmail) = "1") then %>
<tr>
<td colspan="3" align="left"><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
<a href="JavaScript:openWindow('pop_pword.asp')">Forgot your <% if strAuthType = "nt" then %>admin <% end if %>Password?</a>
<% if (lcase(strNoCookies) = "1") then %>
|
<a href="admin_home.asp">Admin Options</a>
<% end if %>
</font></td>
</tr>
<% end if %>
</table>
</td>
</tr>
</form>
<% else %>
<form action="<% =Request.ServerVariables("URL") %>" method="post" id=form2 name=form2>
<INPUT type="hidden" name="Method_Type" value="logout">
<tr>
<td align="center">
<table>
<tr>
<td align="center">
<font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
You are logged on as<br>
<% if strAuthType="nt" then %>
<b><% =Session(strCookieURL & "username")%> (<% =Session(strCookieURL & "userid") %>)</b>
</font>
</td>
<td> 
<%
else
if strAuthType = "db" then
%>
<b><% = ChkString(strDBNTUserName, "display") %></b>
</font>
</td>
<td>
<% if strGfxButtons <> "0" then %>
<INPUT src=button_logout.gif type="image" value="Logout" id=submit1 name=submit1 border=0 hspace=4>
<%
else
if strGfxButtons = "0" then
%>
<INPUT type="submit" value="Logout" id=submit1 name=submit1>
<%
end if
end if
end if
end if
%>
</td>
</tr>
</table>
</td>
</tr>
<% if (mlev = 4) or (lcase(strNoCookies) = "1") then %>
<tr>
<td align="center">
<font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
<a href="admin_home.asp">Admin Options</a>
</font>
</td>
</tr>
<% end if %>
</form>
<% end if %>
</table>
</td>
</tr>
</table>

And replace it with this:

<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr>
<td align="left" width="50%">
<a href="default.asp"><img alt="<% =strForumTitle %>" border="0" src="<%=strTitleImage%>"></a>
</td>

<td align="center" width="50%">
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b><% =strForumTitle %></b><br>
<%if (chkUser((strDBNTUserName), (Request.Cookies(strUniqueID & "User")("Pword"))) = 0) then %>
<a href="policy.asp">Register</a> | <a href="login.asp">Login</a>
<%else%>
<a href="logout.asp">Logout</a>
<%end if%>
</td>
</tr>
</table>

Download and instructions for login/logout scripts in next post

---------------
Da_Stimulator has spoken
Ongoing Project that uses Snitz forums as a backbone for entire website

Edited by - da_stimulator on 17 November 2001 05:41:53
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 26 October 2001 :  06:27:38  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
Download and extract to your forum folder
These Files (login.asp, logout.asp)

---------------
Da_Stimulator has spoken
Ongoing Project that uses Snitz forums as a backbone for entire website
Go to Top of Page

fendi
Starting Member

8 Posts

Posted - 28 October 2001 :  12:39:28  Show Profile
Thank You, Da_Stimulator.

Go to Top of Page

twum
New Member

Netherlands
50 Posts

Posted - 07 November 2001 :  07:33:26  Show Profile  Visit twum's Homepage
quote:

Download and extract to your forum folder
These Files (login.asp, logout.asp)

---------------
Da_Stimulator has spoken
Ongoing Project that uses Snitz forums as a backbone for entire website



Hi DA,
I tried this and got an error. I replaced the code you mention above and extracted the two login files to the forum directory and the error is:
Error Type:
Microsoft VBScript compilation (0x800A03F6)
Expected 'End'
/forumtest/Default.asp, line 881

I'm not good with ASP or VBScript, but I had a look at the file in Notepad, at line 881, and I saw "end sub" on line 881 and "%>" on line 882 (without the quotes).

What could have gone wrong?
thanks
teddy

You can take a man out of Ghana, but you can't take Ghana out of the man.
Go to Top of Page

ingnova
Starting Member

13 Posts

Posted - 17 November 2001 :  04:56:48  Show Profile
I have the same error.

Da-Stimulator, as it we can solve ??







Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 17 November 2001 :  05:40:32  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
inc_top.asp find this:

<td align="center" width="50%">
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b><% =strForumTitle %></b><br>
<%if (chkUser((strDBNTUserName), (Request.Cookies(strUniqueID & "User")("Pword"))) = 0) then %>
<a href="policy.asp">Register</a> | <a href="login.asp">Login</a>
<%else%>
<a href="logout.asp">Logout</a>
</td>
</tr>
</table>

and replace with this:

<td align="center" width="50%">
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b><% =strForumTitle %></b><br>
<%if (chkUser((strDBNTUserName), (Request.Cookies(strUniqueID & "User")("Pword"))) = 0) then %>
<a href="policy.asp">Register</a> | <a href="login.asp">Login</a>
<%else%>
<a href="logout.asp">Logout</a>
<%end if%>
</td>
</tr>
</table>

----
-Eric (da_stimulator)
Stims Snitz Test area
Snitz Mod Resource
PHP Script Center -Quality PHP Scripts
Go to Top of Page

ingnova
Starting Member

13 Posts

Posted - 18 November 2001 :  11:07:47  Show Profile
Ok. now work fine.

Thank You, Da_Stimulator

Go to Top of Page

tmz
Starting Member

USA
24 Posts

Posted - 08 December 2001 :  20:46:43  Show Profile
This script works great except I am trying to figure out how to pass the username to my chat system if allready logged in. If I first login and go to the chat room it works. I can then go to the forum and it shows that I am still logged in. But if I go to the forum first and then try to log into the chat the username does not pass.

I am using the code =strDBNTFUserName%> in my chat link. I have tried looking at the login page and the different cases to see how the username is pulled for case 0 but I cannot pull the username if I leave the login page and then try to go to the chat. Any suggestions on how I can check to see that someone is logged in and then if they are instead of the error message coming up the same links back to the forum come up with other member areas of my site.

Thanks

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.37 seconds. Powered By: Snitz Forums 2000 Version 3.4.07