Not logged in. · Lost password · Register
Forum: General Help and Support Templates and Layout RSS
customize login page
Page:  previous  1  2 
Avatar
selfmade-man #16
Member for 3 months · 3 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 65215
If I understand that right.... the "login" page is embedded in the Dokuwiki code? Not the best solution in my eyes because it's nearly impossible to change it's appearance.
Anyway, let's assume that this denied.txt really annoys me. Where can I find the code that is responsible for that login page? I mean somewhere must be a command that loads the text and displays it. If I can change that line, text will be gone.

Meanwhile I will try to find another "denied.txt" that is a bit less repulsive than ACCESS DENIED (or Zugriff Verweigert in German).
But I hope someone can tell me how it can be done properly.
Avatar
turnermm (Moderator) #17
Member since Oct 2009 · 4628 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
In inc/html.php, you will find this function:

function html_denied() {
    print p_locale_xhtml('denied');

    if(empty($_SERVER['REMOTE_USER'])){
        html_login();
    }
}

Change this to:
function html_denied() {

    if(empty($_SERVER['REMOTE_USER'])){
        html_login();
       return;
    }
    print p_locale_xhtml('denied');
}

But you will have to do this over again every time there is an upgrade.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
selfmade-man #18
Member for 3 months · 3 posts
Group memberships: Members
Show profile · Link to this post
But you will have to do this over again every time there is an upgrade.

No problem... I can live with that :-)

Thank you for this solution, seems to be what I was looking for.
As I said before, I don't speak PHP.... so you just moved the "print p_locale_xhtml('denied');" line one level (or whatever it is called) down? And so it will not appear on the login page?
What happens if that line is just deleted?
Avatar
turnermm (Moderator) #19
Member since Oct 2009 · 4628 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
What happens if that line is just deleted?

Pages for which users do not have permission will not get the denied message and so will not know why they can't edit, read, etc.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
turnermm (Moderator) #20
Member since Oct 2009 · 4628 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
In reply to post ID 65203
An upgrade to the goto plugin which I'm working on might be an answer for you.
  https://github.com/turnermm/goto/archive/user.zip
See https://www.dokuwiki.org/plugin:goto:supplement for documentation
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
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:
Page:  previous  1  2 
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-05-24, 10:03:21 (UTC +02:00)