Author |
Topic |
Lazer
Starting Member
3 Posts |
Posted - 10 May 2002 : 07:47:02
|
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
|
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 |
|
|
Lazer
Starting Member
3 Posts |
Posted - 10 May 2002 : 10:13:58
|
Thanks it works great.
|
|
|
_barbara
Junior Member
Germany
123 Posts |
Posted - 10 May 2002 : 11:43:44
|
welcome
Barbara
|
|
|
Cycas
Starting Member
United Kingdom
14 Posts |
Posted - 15 May 2002 : 10:50:04
|
Barabra
If I want profiles visible to moderators and admins only can I just change
if mlev=0
to
if mlev<2
?
|
|
|
Nathan
Help Moderator
USA
7664 Posts |
|
LC
New Member
Brazil
70 Posts |
Posted - 26 May 2002 : 05:14:03
|
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 |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 26 May 2002 : 05:41:08
|
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 |
|
|
LC
New Member
Brazil
70 Posts |
Posted - 26 May 2002 : 14:23:46
|
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
|
|
|
Roland
Advanced Member
Netherlands
9335 Posts |
|
LC
New Member
Brazil
70 Posts |
Posted - 26 May 2002 : 19:24:07
|
Thank you!
LC
|
|
|
btekcan
Junior Member
Turkey
112 Posts |
Posted - 27 May 2002 : 18:08:59
|
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
|
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 27 May 2002 : 19:35:50
|
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 |
|
|
btekcan
Junior Member
Turkey
112 Posts |
Posted - 28 May 2002 : 05:32:22
|
Thanks
great job,everything is really recure
best regards
Bulent
|
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
dean
Starting Member
7 Posts |
Posted - 14 August 2002 : 09:58:07
|
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? |
|
|
Topic |
|