inherit
126477
0
Apr 21, 2023 15:18:52 GMT -8
Shrike
Re-appeared briefly after 6 years only to no doubt disappear again.
1,569
June 2008
shrike
|
Post by Shrike on Dec 4, 2012 14:09:36 GMT -8
This is a much more effective way of preventing guests from viewing profiles thanks to the template system because it affects what the server sends rather than hiding it with Javascript (which can be easily bypassed). I've used the default error messages but you can change the wording if you like. You should only need to do this for the default theme as this is the only one guests will use. This method could also be applied to other pages, make a post in this thread if you have one in mind. Go to Themes > Layout Templates > User Profile. Find this code around lines 2-5: <div class="title-bar"> <h1>View Profile - $[user.name] ($[user.username])</h1> </div> And add this above it: {if !$[current_user.is_member]}<div class="title-bar"> <h2>Oops, there was an error!</h2> </div> <div class="content pad-all cap-bottom auto-overflow"> You do not have permission to access this area. </div> {else} Finally, add the closing {/if} at the bottom where shown (line 49 here): 46: <div class="pad-all-double ui-helper-clearfix clear"> 47: $[content] 48: </div> 49: </div>{/if} 50: </div> Not working?1. Log out of your account so you view it as a guest. 2. Check you followed the instructions above properly. 3. Unless PB have since changed the variable names, refer to step 2. Original request
|
|
inherit
120077
0
Mar 22, 2021 9:37:29 GMT -8
My Name is Billy Moonstone
726
February 2008
askandprosper
|
Post by My Name is Billy Moonstone on Jan 25, 2013 23:59:32 GMT -8
This is great Shrike, works perfectly and an essential mod I reckon
|
|
inherit
178825
0
Nov 13, 2024 11:25:29 GMT -8
spiceelicious
Not a blond bimbo
1,076
April 2012
spiceelicious
|
Post by spiceelicious on Jan 28, 2013 11:57:46 GMT -8
Thanks!
|
|
Viperzzzzz
inherit
-5192284
0
Nov 22, 2024 6:05:29 GMT -8
Viperzzzzz
0
January 1970
GUEST
|
Post by Viperzzzzz on Feb 27, 2013 7:00:03 GMT -8
I did this, it didn't work, I really haven't found out how to prevent guests from viewing my forum after v5. HELP!
|
|
inherit
\o/ ^o^ /o_ /o\
16464
0
Jul 22, 2024 13:57:10 GMT -8
pawl
29,621
November 2003
pollo
Pink Stars
|
Post by pawl on Feb 28, 2013 8:53:43 GMT -8
I did this, it didn't work, I really haven't found out how to prevent guests from viewing my forum after v5. HELP! Could you give us a link to the forum in question, and confirm that the template mod is active? =]
|
|
janih
New Member
Looking for new members
Posts: 36
inherit
192480
0
Jun 28, 2015 19:25:14 GMT -8
janih
Looking for new members
36
April 2013
janih
|
Post by janih on Apr 18, 2013 4:44:16 GMT -8
cool thanks works a treat.
|
|
inherit
186174
0
Mar 28, 2021 11:29:11 GMT -8
ʞɔnʇS
160
November 2012
stuck
|
Post by ʞɔnʇS on Apr 20, 2013 12:04:42 GMT -8
Brilliant, worked first time for me ??n?S
|
|
DX121
New Member
Posts: 52
inherit
210514
0
Apr 7, 2021 16:27:47 GMT -8
DX121
52
June 2014
dx121
|
Post by DX121 on Jun 21, 2014 2:57:42 GMT -8
YAY! This feature still works! Alright! SWEET! Thank you!!
|
|
inherit
222144
0
Apr 26, 2016 9:01:28 GMT -8
NatAni
43
June 2015
natani
|
Post by NatAni on Jan 3, 2016 2:24:13 GMT -8
Thanks for this - works a treat
|
|
inherit
237277
0
Jun 21, 2018 8:33:59 GMT -8
adm1n0
71
September 2016
adm1n0
|
Post by adm1n0 on Nov 13, 2016 12:45:31 GMT -8
Perfect! Thank you!
|
|
inherit
244025
0
Apr 23, 2017 20:04:12 GMT -8
misterkarma
3
April 2017
misterkarma
|
Post by misterkarma on Apr 23, 2017 18:33:00 GMT -8
It's doing nothing for me...
|
|
inherit
I need a new CT, thinking.... [insert Jeopardy theme song here]
110769
0
Aug 21, 2021 0:07:21 GMT -8
Tumbleweed
20,825
September 2007
tumbleweed
|
Post by Tumbleweed on Apr 23, 2017 22:05:42 GMT -8
It's doing nothing for me... I just tried it and it works fine. Did you view your site as a guest making sure you have the correct theme showing to guests?
|
|