Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Memberlist.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Memberlist.

 Post Reply Post Reply
Author
Smac-daddy View Drop Down
Newbie
Newbie
Avatar

Joined: 05 January 2004
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Smac-daddy Quote  Post ReplyReply Direct Link To This Post Topic: Memberlist.
    Posted: 26 January 2004 at 4:27pm

I am wondering if there is a way to prevent members from accessing the memberlist. I would like to have the list private to admin.

Any suggestions would be greatly appreciated.

Smac-Daddy

Back to Top
MadDog View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 01 January 2002
Status: Offline
Points: 3008
Post Options Post Options   Thanks (0) Thanks(0)   Quote MadDog Quote  Post ReplyReply Direct Link To This Post Posted: 26 January 2004 at 4:30pm

after the include of the common.asp file add this:

<%
If blnAdmin = False Then
      adoCon.Close
      Set adoCon = Nothing
      Set rsCommon = Nothing

      Response.Redirect("default.asp")
End If
%>

Now you can change default.asp to anything you want.

Back to Top
Smac-daddy View Drop Down
Newbie
Newbie
Avatar

Joined: 05 January 2004
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Smac-daddy Quote  Post ReplyReply Direct Link To This Post Posted: 26 January 2004 at 5:24pm

I am fairly new to this and am having a little difficulty figuring out where exactly to put this code?

 

 

Back to Top
MadDog View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 01 January 2002
Status: Offline
Points: 3008
Post Options Post Options   Thanks (0) Thanks(0)   Quote MadDog Quote  Post ReplyReply Direct Link To This Post Posted: 26 January 2004 at 6:28pm
Like said, after the include common.asp part towards the top.
Back to Top
Eftie View Drop Down
Groupie
Groupie


Joined: 17 March 2003
Location: Netherlands
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote Eftie Quote  Post ReplyReply Direct Link To This Post Posted: 27 January 2004 at 2:28am
And of course you have to put this code on top in the members.asp file.
Eftie
Back to Top
DotPing View Drop Down
Newbie
Newbie


Joined: 09 January 2004
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote DotPing Quote  Post ReplyReply Direct Link To This Post Posted: 27 January 2004 at 1:27pm

I did it my way... maybe not the best but obviousl working:

 

If you want just to show the buttons to moderators and admins, then do as follows.

(Change the respective intGroupID with whatever group(s) you want to show the list)

1. Hide the buttons

includes/navigation_buttons_inc.asp

Arround line 70:


'show the memberlist button only if user is mod/admin
IF intGroupID = 1 or IntGroupID = 3 THEN

 Response.Write ("&nbsp;&nbsp;<a href=""members.asp"" target=""_self"" class=""nav""><img src=""" & strImagePath & "members_list.gif"" border=""0"" align=""absmiddle"" alt=""" & strTxtMembersList & """>" & strTxtMemberlist & "</a>")
END IF


Put the response.write line with the link to the members.asp in the above IF / ENDIF statement.


2. Avoid clever users to access the members.asp without proper rights:

Change the Elseif Statement around line 247 as follows:

'If the user is neither mod nor admin display an error message

ElseIf intGroupID = 2 OR intGroupID =4 OR intGroupID = 5 OR intGroupID = 6 Then

 Response.Write (vbCrLf & "<span class=""bold"">This function is not public.</span><br /><br />")

Keep the response.write statement on one line.


Hope this helps.

DotPing

Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post Posted: 27 January 2004 at 1:38pm

why not do it as MadDog said?

much cleaner and easier..

just place the code on line 4 in members.asp..

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.