Not logged in. · Lost password · Register
Forum: General Help and Support Syntax and Usage RSS
Edit the text of the "Access Denied" Page
How to customize the message a user gets when he tries to view a closed wiki
Avatar
bootsmaat #1
Member since May 2014 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: Edit the text of the "Access Denied" Page
Hello!

My wiki can only be viewed by registered users. When a user is not logged in, she is presented with a page that says something along the lines of "You cannot view this page, please log in to get access." I would like to customize this message and specifically tell people how to contact the admin so they can get access to the wiki.

How can I change this message?

When googling for a solution, people recommend the showlogin plugin (https://www.dokuwiki.org/plugin:showlogin). But in the newest release Dokuwiki has the functionality to show the login form without a plugin (see https://www.dokuwiki.org/changes) and I would like to use the core functionality as much as possible. I only want to modify the message displayed above the login form.

I thought about modifying the language files (e.g. /inc/lang/de-informal/denied.txt) but this seems like a bad approach. When the language files are updated, the customization will be lost.

Any ideas? Thanks in advance!
Avatar
Michitux #2
Member since Apr 2008 · 377 posts · Location: Karlsruhe, Germany
Group memberships: Members, Wiki Managers
Show profile · Link to this post
You can change that file by copying it into a subdirectory of the conf directory, have a look at the documentation for more detailed instructions.
Did you like my help or work for DokuWiki (plugins)? Consider giving something back.
Avatar
gamma #3
Member since Sep 2006 · 123 posts · Location: Berlin
Group memberships: Members
Show profile · Link to this post
In reply to post #1
It's not a localization problem. I think this is a serious problem within the method html_denied which reads like

  74  function html_denied() {
  75      print p_locale_xhtml('denied');
  76 
  77      if(!$_SERVER['REMOTE_USER']){
  78          html_login();
  79      }
  80  }

So it will always try to authenticate and bring up the login. Especially for wikis where denied pages should not display the login it could be a threat.
Avatar
bootsmaat #4
Member since May 2014 · 2 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #2
Quote by Michitux:
You can change that file by copying it into a subdirectory of the conf directory, have a look at the documentation for more detailed instructions.

Thank you! Works perfectly.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-11-20, 01:25:09 (UTC +01:00)