Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

SNIPPIT:: A Simple Custom Pages Access Denied Tweak

Asked Modified Viewed 3,804 times
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
  • Started this discussions
asked
Fusioneer

A Simple Custom Pages Access Denied Tweak

www.fangree.co.uk/infusions/forum/attachments/custom_pages_access_denied_preview.png

This should have really been used in V7.01 for the Custom Pages (viewpage.php) Access Message.

As it stands if a user does not have access to a Custom Page there will be a simple and pretty lame text saying...

Quote

You are not permitted to view this page.


So I have simply tweaked it to be a little more User Friendly and give it some class.

First upload this image to /images/
www.fangree.co.uk/infusions/notice_panel/images/warn.png

In viewpage.php around line 48 look for...

echo "<div style='text-align:center'><br />\n".$locale['400']."\n<br /><br /></div>\n";


We will change that to...

   echo "<div class='admin-message' style='text-align:center'><br /><img style='border:0px; vertical-align:middle;' src ='".BASEDIR."images/warn.png' alt=''/><br /> ".$locale['400']."<br /><a href='javascript:history.back()'>Go Back</a>\n<br /><br /></div>\n";


Save.

Now edit locale/English/custom_pages.php

Change locale400 to this...

$locale['400'] = "<span style='color:#ff0000'><b>Access Denied!</b></span><br>You are not permitted to view this page.";


Save

Now upload and overwrite both files.

Done

See the Attached image for the preview.

The javascript:history.back() functions is used for users to go back to previous page.
0 replies

2 posts

P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

btw you can change locale only with same thingies.
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
  • Started this discussions
answered
Fusioneer

What?
Not sure what you mean?
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 2 posts
  • Votes 0 votes
  • Topic users 2 members

2 participants

C
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
  • Started this discussions
P
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet