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 / Classic ASP versions(v3.4.XX)
 Snitz Cookie
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

novicewebdeveloper
Starting Member

14 Posts

Posted - 25 October 2004 :  06:32:28  Show Profile  Visit novicewebdeveloper's Homepage
Hi,

I downloaded this forum a few months back and have had some problems integrating it with the web site I am developing.

Basically I want to be able to login from my web site using the username and password in the forum database. I want to restrict access to not only the forum but also some selected pages on my site to members only. I have managed to login from a page on my site fine - thanks to some help from forum members here in the past.

The problem I am now having is making sure that the whole site including the forum "remembers" that the user has already logged in/logged out. At the moment it logs the user in, but when I choose to go to the forum from my site it asks me to log in again. I believe this has somthing to do with cookies?

I've been working on this site for a couple of months... it is my first major/dynamic site and is to be launched at the end of November by the British Minister of Small Business and Enterprise. I am a student in my Industrial Placement year (in the 3rd year of my degree course) and lack experience/skill and have been chucked into the deep end! This is a nice way to start my career in Web Development however it could be my downfall (before I even get started) if I don't meet the deadline! I would really appreciate help that is offered by fellow members/moderators.

I have been raising the problems I am having with integrating the forum with my boss and he suggests that I scrap using Snitz forums and find another forum that is easier/simpler to work with. However I thought I'd give it one last shot here and hope I can find a solution to my problem.

My specific questions are:

1) Do I need to use the cookies that are scripted in the Forum code and use them somehow in my site?
2) If so, how?
3) If so, where is this code located precisely (in which file(s))? I have tried to find my way around the code but find it a nightmare since the code is distributed amongst so many include files and is very difficult trying make sense of all the different jigsaw pieces!
4) Do I need to be aware of any other issues when integrating the forum with my site?
5) I know that the forum encrypts the password that is stored in the database, what happens if a user forgets there password? How does the administrator/user replace the member's password without the user having to set up a new account?

Appreciate your help in advance!

NoviceWebDeveloper

Edited by - novicewebdeveloper on 25 October 2004 06:33:07

Jezmeister
Senior Member

United Kingdom
1141 Posts

Posted - 25 October 2004 :  21:17:02  Show Profile  Visit Jezmeister's Homepage
1) Make sure your cookies are set to site not forum
2) The code you need to redirect visitors is at the top of inc_header.asp (use the following):
<!--#INCLUDE VIRTUAL="../forum/config.asp" -->
<!--#INCLUDE VIRTUAL="../forum/inc_func_common.asp" -->
if strRequireReg = "1" and strDBNTUserName = "" then
	if not Instr(strScriptName,"policy.asp") > 0 and _
	not Instr(strScriptName,"register.asp") > 0 and _
	not Instr(strScriptName,"password.asp") > 0 and _
	not Instr(strScriptName,"faq.asp") > 0 and _
	not Instr(strScriptName,"login.asp") > 0 then
		scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
		if Request.QueryString <> "" then 
			Response.Redirect("../forum/login.asp")
		else
			Response.Redirect("../forum/login.asp")
		end if
	end if
end if
You can remove the parts in red if you're using it outside the forum.
Also make sure your page extension is .asp not .html/.htm
If you want to allow people to be redirected to the page they've come from in login outside your forum directory give me an email and i'll send you some edited files you can use, but I won't be on for about a week from now.
3) (ur question 4) not really, there's a mod available called the "Site Integration Mod" that could be useful to get your site design onto the forum - do a search for it.
4)The superadmin can access the users account and change the password.
and a final tip: if you want some content on a page to be only viewable to members and you haven't added the code to redirect visitors simply put around it:
if (mLev <> 0) then
Response.Write Content
end if

Edited by - Jezmeister on 25 October 2004 21:18:04
Go to Top of Page

novicewebdeveloper
Starting Member

14 Posts

Posted - 27 October 2004 :  11:19:49  Show Profile  Visit novicewebdeveloper's Homepage
Hi Jezmeister (nice name),

Thanks alot for your detailed response. Really appreciate it. I will try out your suggestions and if I have any problems I'll give you a shout.

Thanks mate, you've been a great help.

Regards,

novicewebdeveloper
Go to Top of Page

novicewebdeveloper
Starting Member

14 Posts

Posted - 27 October 2004 :  12:18:36  Show Profile  Visit novicewebdeveloper's Homepage
Hi Jezmeister,

I have just sent you an email, hope to hear from you soon.

Regards,

novicewebdeveloper
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 27 October 2004 :  18:29:37  Show Profile  Visit Gremlin's Homepage
If you post your question here in the forum rather than emailing members directly you'll proably get more responses to your question.

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

novicewebdeveloper
Starting Member

14 Posts

Posted - 28 October 2004 :  04:26:40  Show Profile  Visit novicewebdeveloper's Homepage
Hi Gremlin,

Thanks for your advice... here is the content of the email I sent to Jezmeister:
quote:


Hi Jezmeister,

Thanks for replying to my query about the Snitz Cookie.

1) I changed the settings for the cookies to the site rather than the forum. Thanks.

2)I didn't understand what you meant by redirect visitors? Wasn't to sure from where to where you meant?

I might need to clarify what I meant. Basically there is a large site most of which is publicly viewable. There is also a private members only area which includes the forum. There is an opening/login page on my site from where the user needs to log in. Once the user logs in successfully it takes the user to another page on my site (members.asp). From this page the user can now access links to the forum and other private pages. Because the user has already logged in from my site (based on the password and username contained in the Snitz forum database) I don't want my users to have to log in again when they come to the default.asp page of the forum. When they get to the forum home page it should show that they have already signed in. If the user logs out of the forum it should log him/her out of the whole members area on my site.

Perhaps you have already provided the answer to this question in your previous post? If so, I did not understand what I was supposed to do with that code you provided? Do I copy and paste it in my site's login page and all members only pages (that are not in the forum but members-only anyway)?

My pages are .asp not .html.

Probably best if we dealt with this first, then I'll seek clarification from you on your other points if necessary. Cheers mate, appreciate you helping me out.

Hope to hear from you soon!

novicewebdeveloper


Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 28 October 2004 :  04:58:44  Show Profile  Visit Gremlin's Homepage
This MOD might help you out a little

http://www.snitzbitz.com/mods/details.asp?Version=All&mid=71

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

novicewebdeveloper
Starting Member

14 Posts

Posted - 28 October 2004 :  12:03:00  Show Profile  Visit novicewebdeveloper's Homepage
Hi Gremlin,

Thanks for your response. I downloaded the code as suggested, set up a test page and followed the instructions.

However I get the following error when trying to view the page:

Error Type:
Active Server Pages, ASP 0126 (0x80004005)
The include file 'forum/inc_login.asp' was not found.
/bishopauckland2/logintest.asp, line 13

I have tried changing virtual to file in the include file code and still had no luck.

Any ideas how I can resolve this problem?

Cheers,

novicewebdeveloper
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 28 October 2004 :  18:10:43  Show Profile  Visit Gremlin's Homepage
That (inc_login.asp) should be one of the files contained in the mod I believe, make sure you've uploaded it to the correct directory in your test site.

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

novicewebdeveloper
Starting Member

14 Posts

Posted - 29 October 2004 :  05:55:30  Show Profile  Visit novicewebdeveloper's Homepage
Hi Gremlin,

Yep it came as part of the mod and the file is already in the correct directory - i have double checked but still get the same error. The test page is in the correct directory and so is inc_login.asp. Have you come across this problem before?

Here is the code for the test page. Perhaps I have done something wrong?

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />


</head>

<body>
<!-- #INCLUDE VIRTUAL="forum/inc_login.asp" -->
<!--#INCLUDE VIRTUAL="forum/config.asp"-->
<!--#INCLUDE VIRTUAL="forum/inc_sha256.asp"-->
<!--#INCLUDE VIRTUAL="forum/inc_func_common.asp"-->
<!--#INCLUDE VIRTUAL="forum/inc_header.asp"-->

Hello
</body>
</html>


Regards,

novicewebdeveloper
Go to Top of Page

Ric
Starting Member

United Kingdom
47 Posts

Posted - 29 October 2004 :  06:58:35  Show Profile
I copied your code into a test asp file and the only way I could get the same error as you was to not have a file called inc_login.asp in the forum directory.

New Photo Album Mod demo
Go to Top of Page

novicewebdeveloper
Starting Member

14 Posts

Posted - 29 October 2004 :  08:48:30  Show Profile  Visit novicewebdeveloper's Homepage
Hi Ric,

Thanks for your response. The inc_login.asp file is definately in the forum directory. If it helps it is inbetween inc_jump_to.asp and inc_mail.asp when the files are arranged alphbetically.

Regards,

novicewebdeveloper
Go to Top of Page

novicewebdeveloper
Starting Member

14 Posts

Posted - 29 October 2004 :  08:55:23  Show Profile  Visit novicewebdeveloper's Homepage
Hi,

I rearranged the place I put the include files like this:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#INCLUDE VIRTUAL="forum/config.asp"-->
<!--#INCLUDE VIRTUAL="forum/inc_sha256.asp"-->
<!--#INCLUDE VIRTUAL="forum/inc_func_common.asp"-->
<!--#INCLUDE VIRTUAL="forum/inc_header.asp"-->
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />


</head>

<body>
<!-- #INCLUDE VIRTUAL="forum/inc_login.asp" -->


Hello
</body>
</html>


But still got the same error.



novicewebdeveloper
Go to Top of Page

Ric
Starting Member

United Kingdom
47 Posts

Posted - 29 October 2004 :  09:52:37  Show Profile
Where is your test page located?

Have you tried <!--#INCLUDE VIRTUAL="/forum/inc_login.asp"--> ?

New Photo Album Mod demo
Go to Top of Page

novicewebdeveloper
Starting Member

14 Posts

Posted - 29 October 2004 :  10:08:59  Show Profile  Visit novicewebdeveloper's Homepage
Hi just tried that - still no luck. My testpage is located in the same folder as the forum folder.

Go to Top of Page

Ric
Starting Member

United Kingdom
47 Posts

Posted - 29 October 2004 :  10:56:43  Show Profile
Got me stumped then!!

When you changed the order of the includes was it still inc_login.asp that it couldn't find? If that was the case it would suggest something to do with that file in particular, rather than the code on the test page. Otherwise the error would change so it couldn't find config.asp.

New Photo Album Mod demo
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 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.73 seconds. Powered By: Snitz Forums 2000 Version 3.4.07