Author |
Topic |
|
Schwanke
New Member
77 Posts |
Posted - 25 August 2002 : 23:00:49
|
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
|
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 |
|
|
CodeName
Junior Member
296 Posts |
Posted - 26 August 2002 : 03:04:37
|
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 ?
|
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 26 August 2002 : 03:12:17
|
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 |
|
|
CodeName
Junior Member
296 Posts |
Posted - 26 August 2002 : 03:18:24
|
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 |
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 26 August 2002 : 06:31:04
|
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) |
|
|
CodeName
Junior Member
296 Posts |
Posted - 26 August 2002 : 06:40:43
|
Thanks Man :-)
But After member is logged can they see the members.asp GauravBhabu ?
|
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 26 August 2002 : 06:47:42
|
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) |
|
|
CodeName
Junior Member
296 Posts |
Posted - 26 August 2002 : 06:57:38
|
Ý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 ?
|
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 26 August 2002 : 07:06:23
|
Yes! |
|
|
CodeName
Junior Member
296 Posts |
Posted - 26 August 2002 : 10:59:46
|
Thanks! I did want to be Sure Many Thanks GauravBhabu !! |
|
|
|
Topic |
|