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

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Mod Req: Member List Security Control
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Schwanke
New Member

77 Posts

Posted - 25 August 2002 :  23:00:49  Show Profile  Visit Schwanke's Homepage
I am looking for a mod that would give some security control to who can see the member list. I was thinking the easiest solution would be to tie it to a forum such as using Member List (Hidden) and then only members can read the member list.

Primarily I want to be able to use the member list to actually store sensative private information for my group's members while still leaving our forums open to the general public to read the public forums.

As it is we cant do things such as put in our icq/aim/etc stuff unless we want the whole world to be able to see it by having an account.

At one point in time I did some simple modifiactions to the page to just remove access completely, at another time i removed emails (before emails could be hidden) but they have all been kludges.

Anybody think this is a useful enough mod to do? Or should I try to kludge it myself?

<><

Schwanke
New Member

77 Posts

Posted - 26 August 2002 :  00:14:37  Show Profile  Visit Schwanke's Homepage
Never mind. I did some quick changes and just did a version myself.

I wrote the following function (its a mod of an old function I wrote for something else):
---

Function checkSubjectSecureLink(linkSubject)

strSql = "SELECT " & strTablePrefix & "FORUM.FORUM_ID, " & strTablePrefix & "FORUM.F_SUBJECT FROM " & strTablePrefix & "FORUM WHERE " & strTablePrefix & "FORUM.F_SUBJECT = '" & linkSubject & "'"
set rs = my_Conn.Execute(strSql)
if rs.EOF or rs.BOF then
%> Page Not In System. Access Denied.<%
Response.end

else
Dim linkID
linkID = rs("FORUM_ID") & ""
checkSubjectSecureLink = rs("F_SUBJECT")
if strPrivateForums = "1" then
if Request("Method_Type") = "" and (mLev <> 4) then
whatever = ChkForumAccess(linkID,MemberID, true)
end if
end if
end if
end Function

--

All you have to do is put a call to this function at the top of the members page with the name of the forum you want to use as your security measure. (Such as a members only forum) and include inc_secure or whwatever it is and poof. Done.

I have this function located in a a inc file that I put all of my little bitty hack functions in but you could put it in inc_func_secure probably and have it be somewhat on topic of the file.

Its not elegent cuz if you ever rename the measure forum you have to edit the file, but it works in a pinch. Now only members can access the members page. Everyone else gets an access denied. The not in not in system error is to let you know you picked a forum that doesnt exist.

Can someone move this to to the w/code forum now? Thanks.

<><

Edited by - Schwanke on 26 August 2002 00:17:10
Go to Top of Page

CodeName
Junior Member

296 Posts

Posted - 26 August 2002 :  03:04:37  Show Profile
Schwanke,

Do you have To link at you forum ?

And can you Tell again with More details and like "README"

Which Files We Have to add ?

To Which File We have to Add That Code ?

Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 26 August 2002 :  03:12:17  Show Profile
Schwanke, which version of snitz,you are using. In the current version only those who are members and are logged in can see the members list.

CSS and HTML4.01 Compilant Snitz Forum . ForumSquare . Rakesh Jain

It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.

Prayer Of Forgiveness
"I forgive all living beings. May all living beings forgive me!
I cherish the friendliness towards all and harbour enmity towards none." -- Aavashyaka Sutra(Translated)

Edited by - GauravBhabu on 26 August 2002 03:12:46
Go to Top of Page

CodeName
Junior Member

296 Posts

Posted - 26 August 2002 :  03:18:24  Show Profile
GauravBhabu,

For Example , Ýf I dont again the Members dont see the Members.asp what I have to do ? But Only The Moderators and Admins has to see there..

What I have to do?

Using : 3.4.1

Edited by - CodeName on 26 August 2002 03:19:07
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 26 August 2002 :  06:31:04  Show Profile
File: members.asp


Find the following code in members.asp Lines 45-61

if strDBNTUserName = "" then
Err_Msg = "<li>You must be logged in to view the Members List</li>"

Response.Write " <table width=""100%"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
" " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " Member Information</font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>There Was A Problem!</font></p>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """>You must be logged in to view this page</font></p>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Back to Forum</a></font></p>" & vbNewLine & _
" <br />" & vbNewLine
WriteFooter
Response.End
end if



Replace with this


if mLev < 3 then
Err_Msg = "<li>Only Moderators and Administrators can view this page</li>"

Response.Write " <table width=""100%"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
" " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " Member Information</font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>There Was A Problem!</font></p>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """>" & Err_Msg & "</font></p>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Back to Forum</a></font></p>" & vbNewLine & _
" <br />" & vbNewLine
WriteFooter
Response.End
end if

CSS and HTML4.01 Compilant Snitz Forum . ForumSquare . Rakesh Jain

It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.

Prayer Of Forgiveness
"I forgive all living beings. May all living beings forgive me!
I cherish the friendliness towards all and harbour enmity towards none." -- Aavashyaka Sutra(Translated)
Go to Top of Page

CodeName
Junior Member

296 Posts

Posted - 26 August 2002 :  06:40:43  Show Profile
Thanks Man :-)

But After member is logged can they see the members.asp GauravBhabu ?

Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 26 August 2002 :  06:47:42  Show Profile
Only Moderators or Admins, if you use the modified code.

CSS and HTML4.01 Compilant Snitz Forum . ForumSquare . Rakesh Jain

It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.

Prayer Of Forgiveness
"I forgive all living beings. May all living beings forgive me!
I cherish the friendliness towards all and harbour enmity towards none." -- Aavashyaka Sutra(Translated)
Go to Top of Page

CodeName
Junior Member

296 Posts

Posted - 26 August 2002 :  06:57:38  Show Profile
Ýf I use this ;

if mLev < 3 then Err_Msg = "<li>Only Moderators and Administrators can view this page</li>" Response.Write " <table width=""100%"" border=""0"">" & vbNewLine & _ " <tr>" & vbNewLine & _ " <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _ " " & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _ " " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " Member Information</font></td>" & vbNewLine & _ " </tr>" & vbNewLine & _ " </table>" & vbNewLine & _ " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>There Was A Problem!</font></p>" & vbNewLine & _ " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """>" & Err_Msg & "</font></p>" & vbNewLine & _ " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Back to Forum</a></font></p>" & vbNewLine & _ " <br />" & vbNewLine WriteFooter Response.End end if

Only Moderator and Admins can see the members.asp Right ?

Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 26 August 2002 :  07:06:23  Show Profile
Yes!
Go to Top of Page

CodeName
Junior Member

296 Posts

Posted - 26 August 2002 :  10:59:46  Show Profile
Thanks! I did want to be Sure
Many Thanks GauravBhabu !!
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.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07