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)
 Profile available for members only.
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Lazer
Starting Member

3 Posts

Posted - 10 May 2002 :  07:47:02  Show Profile
I want the profile page to be viewable to members only.
I already have the mermbers page setup so it's only viewable for members but how do i make the profile only viewable for the members?

_barbara
Junior Member

Germany
123 Posts

Posted - 10 May 2002 :  09:08:29  Show Profile
I would suggest the following modifications to your pop_profile.asp (tested locally on my machine):

1) Around line 39, find this
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_functions.asp" -->
<% if not(strUseExtendedProfile) then %>
<!--#INCLUDE FILE="inc_top_short.asp" -->
<% else %>
<!--#INCLUDE FILE="inc_top.asp" -->
<%
end if

Paste this after that:

'********* hide profiles ********
mLev = cint(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword")))
if mlev = 0 then 'is no member or not logged in %>
<br>
<p align=center><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">
<b>No Permissions to view Member Profiles.</b></font><br>

</p>
<% if strUseExtendedProfile then %>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
<a href="JavaScript: onClick= history.go(-1) ">Back to previous page</a></font></p>

<% end if
else ' is member
'********* end hide profiles ****


2) At the end of file, find this:
 if not(strUseExtendedProfile) then
%>
<!--#INCLUDE FILE="inc_footer_short.asp" -->
<% else
WriteFooter
end if %>

Paste this ABOVE that:
'********* hide profiles ********
end if
'********* end hide profiles ****


Good luck.

Barbara



Edited by - _barbara on 10 May 2002 09:11:38
Go to Top of Page

Lazer
Starting Member

3 Posts

Posted - 10 May 2002 :  10:13:58  Show Profile
Thanks it works great.

Go to Top of Page

_barbara
Junior Member

Germany
123 Posts

Posted - 10 May 2002 :  11:43:44  Show Profile
welcome

Barbara

Go to Top of Page

Cycas
Starting Member

United Kingdom
14 Posts

Posted - 15 May 2002 :  10:50:04  Show Profile
Barabra

If I want profiles visible to moderators and admins only can I just change

if mlev=0

to

if mlev<2

?

Go to Top of Page

Nathan
Help Moderator

USA
7664 Posts

Posted - 15 May 2002 :  21:23:24  Show Profile  Visit Nathan's Homepage
if mLev<3

mLev = 2 is members.

Nathan Bales
Snitz Exchange | Do's and Dont's
Go to Top of Page

LC
New Member

Brazil
70 Posts

Posted - 26 May 2002 :  05:14:03  Show Profile
quote:

I already have the mermbers page setup so it's only viewable for members ...




How do I do it?

Thanx

LC



Edited by - LC on 26 May 2002 05:14:54
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 26 May 2002 :  05:41:08  Show Profile  Send ruirib a Yahoo! Message
Well I've got a simple change. Just before this line in pop_profile.asp:


if Instr(1,Request.Form("refer"),"search.asp",1) > 0 then
strRefer = "search.asp"


add


If mlev = 0 then
Response.Redirect "default.asp"
End If


Obviously instead of redirecting you can just print a message like Barbara did.

Barbara, IMO, you don't need to determine the member level again, since that is done in inc_top.asp. You can just use mlev.



-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page

LC
New Member

Brazil
70 Posts

Posted - 26 May 2002 :  14:23:46  Show Profile
quote:

Well I've got a simple change. Just before this line in pop_profile.asp:


if Instr(1,Request.Form("refer"),"search.asp",1) > 0 then
strRefer = "search.asp"


add


If mlev = 0 then
Response.Redirect "default.asp"
End If


Obviously instead of redirecting you can just print a message like Barbara did.





Thanks, but this will only hide the member's profile, right?
I want to hide the members page.

LC

Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 26 May 2002 :  14:36:38  Show Profile
You can add the same code Ruirib showed in members.asp (preferably right above where the HTML starts) and you'll be done.

Roland

http://www.frutzle.com

Snitz Exchange | Do's and Dont's
Go to Top of Page

LC
New Member

Brazil
70 Posts

Posted - 26 May 2002 :  19:24:07  Show Profile
Thank you!

LC

Go to Top of Page

btekcan
Junior Member

Turkey
112 Posts

Posted - 27 May 2002 :  18:08:59  Show Profile  Visit btekcan's Homepage

Yes this is the best solution maybe,but how can registered user change own profile "if mLev<3" set this level.

Or how can I change this code only registered users view only own profile and the other user cannot see anything ?

Thanks
Bulent

Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 27 May 2002 :  19:35:50  Show Profile  Send ruirib a Yahoo! Message
This has worked for me:


If (mlev < 3) and MemberID <> CLng(Request.QueryString("id")) and (Request.QueryString("mode")="display")Then
Response.redirect "default.asp"
Response.End
End If


-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page

btekcan
Junior Member

Turkey
112 Posts

Posted - 28 May 2002 :  05:32:22  Show Profile  Visit btekcan's Homepage


Thanks

great job,everything is really recure

best regards

Bulent

Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 28 May 2002 :  05:52:02  Show Profile  Send ruirib a Yahoo! Message
You're welcome .

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page

dean
Starting Member

7 Posts

Posted - 14 August 2002 :  09:58:07  Show Profile  Visit dean's Homepage
I have a question on the same subject:

How can I make the members page only show members of a members only forum when a member is logged in?
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.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07