inherit
186212
0
Sept 14, 2021 23:13:53 GMT -8
katanya123
163
November 2012
katanya123
|
Post by katanya123 on Nov 28, 2012 15:46:53 GMT -8
This is something we have on our current board when not logged in.
The coding from v4.5 does not appear to work, any chance of a plug-in or new code, please?
|
|
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 Nov 28, 2012 16:16:45 GMT -8
This could actually be done with a template modification to make it look like a normal error page. This looks like a lot, but that's just because we're adding things in several places:
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:
46: <div class="pad-all-double ui-helper-clearfix clear"> 47: $[content] 48: </div> 49: </div>{/if} 50: </div>
Notes -collected from later posts • The error text we provide in the second piece of code can be changed to whatever you want. • You should only need to do this for the default theme as this is the only one guests will use.
|
|
inherit
186212
0
Sept 14, 2021 23:13:53 GMT -8
katanya123
163
November 2012
katanya123
|
Post by katanya123 on Nov 28, 2012 16:29:17 GMT -8
Fantastic, thanks!
Can I also change the text Oops, there was an error! to something else?
|
|
inherit
58740
0
Aug 20, 2024 7:29:21 GMT -8
®i©hie
I'm not very active here anymore thanks to my full-time job. - 12/27/23
14,036
September 2005
soe
|
Post by ®i©hie on Nov 28, 2012 16:33:25 GMT -8
Fantastic, thanks! Can I also change the text Oops, there was an error! to something else? yes, you can.
|
|
inherit
186212
0
Sept 14, 2021 23:13:53 GMT -8
katanya123
163
November 2012
katanya123
|
Post by katanya123 on Nov 29, 2012 2:30:51 GMT -8
Do you think it will only need to be changed on the default as that is the only one guests can actually see?
|
|
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 Nov 29, 2012 2:43:42 GMT -8
Do you think it will only need to be changed on the default as that is the only one guests can actually see? Assuming V5 is like V4 (which I'm pretty sure it is), yes, you'll only need to do that on the default theme for that reason.
|
|
inherit
187402
0
Mar 23, 2016 19:15:19 GMT -8
Barkley
1,591
December 2012
avinalaff
|
Post by Barkley on Mar 28, 2013 6:09:04 GMT -8
This isn't working that I can tell. I've followed to the letter, and tested. www.loveeverton.proboards.comI note I have some red code on line 15, that has been like that since I can remember, so wondered if an admin could check it for me please? Much obliged. loveeverton.proboards.com/admin/themes/2/template/1305EDIT: It's working fine. What I wanted was to change the general message for the message guests get throughout the forum. Will check the board for other options.
|
|