Author |
Topic |
|
JohnBooty
Starting Member
USA
2 Posts |
Posted - 30 December 2004 : 12:35:10
|
I noted several postings related to password protection, but I can't quite figure it out. I would like to have all forum members able to access certain protected pages. I looked at the html of pages that redirect you to log in if you have not done so. I wanted to copy and paste into my pages the code that checks the password and redirects to login if the user is not logged in. I tried various pieces of code. I was able to get to the point where if the user was logged in it worked and if they weren't it just couldn't find the webpage. Close, but I want to have it redirect to the login screen.
Thanks! JB |
|
Podge
Support Moderator
Ireland
3775 Posts |
Posted - 30 December 2004 : 13:01:49
|
You want only registered members to be able to see the protected forum right?
All you have to do is edit the protected forum and set the "Auth Type" to "Members only".
Edit: This is from the help included with the forum itself;
quote:
The Authorization Type allows you to place restrictions on who is allowed to access the forum. A description of each type is outlined below:
All Visitors: This allows all members (including unregistered members) to access the forum. This is selected by default.
Members Only: This allows only registered members to access the forum. Unregistered members are not allowed access.
Members Only (Hidden): This allows only registered members to access the forum. The forum will be hidden to unregistered members and they are not allowed access.
Password Protected: This allows you to set a password on the forum. All members (including unregistered members) will be asked for a password before giving them access. Once they supply the correct password, they won't be asked for the password again.
Members Only & Password Protected: This allows all registered members to access the forum OR if they are not a registered member, they will be asked for the password. Once they enter the correct password, they won't be asked for the password again.
Allowed Member List & Password Protected: This allows the members that you select from the Available Members List, to access the forum OR if they are not in the Selected Members List, they will be asked for the password that you set. Once they enter the correct password, they won't be asked for the password again.
Allowed Member List: This allows only the members that you select from the Available Members List, to access the forum. All other members (including unregistered members) are not granted access.
Allowed Member List (Hidden): This allows only the members that you select from the Available Members List, to access the forum. The forum is hidden from all other members (including unregistered members) who are not on the Selected Members List.
Note: Administrators have access to all forums, despite what Authorization is set.
|
Podge.
The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)
My Mods: CAPTCHA Mod | GateKeeper Mod Tutorial: Enable subscriptions on your board
Warning: The post above or below may contain nuts. |
Edited by - Podge on 30 December 2004 13:03:49 |
|
|
laser
Advanced Member
Australia
3859 Posts |
Posted - 30 December 2004 : 16:31:58
|
John, my take is that you want to protect non-forum pages, right ?
You probably just have the URL to the login page wrong ... can you show us an example ?, or even the URL of the page that can't be found ? |
|
|
JohnBooty
Starting Member
USA
2 Posts |
Posted - 30 December 2004 : 19:20:16
|
Is this what you want? This is my test page. I would like it to just say test if the user is logged in. However, it says everything from Dim Unapproved to end if.
Copied stuff from snitz's default.asp <!--#INCLUDE FILE="config.asp"--> <!--#INCLUDE FILE="inc_func_secure.asp" --> <!--#INCLUDE FILE="inc_sha256.asp"--> <!--#INCLUDE FILE="inc_header.asp" --> <!--#INCLUDE FILE="inc_func_member.asp" --> <!--#INCLUDE FILE="inc_moderation.asp" --> <!--#INCLUDE FILE="inc_subscription.asp" --> <% Dim UnapprovedFound, UnModeratedPosts
if Request.QueryString("CAT_ID") <> "" and IsNumeric(Request.QueryString("CAT_ID")) = True then Cat_ID = cLng(Request.QueryString("CAT_ID")) end if
scriptname = request.servervariables("script_name")
if strAutoLogon = 1 then if (ChkAccountReg() <> "1") then Response.Redirect("register.asp?mode=DoIt") end if end if FrontPage stuff <head> <meta http-equiv="Content-Language" content="en-us"> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>test</title> </head>
<body>
<p>test</p>
</body>
The page is at http://WWW.checkersac.org/forum/newsletter/test.asp.
Thanks! JB |
|
|
|
Topic |
|