Disable Login Link

  • In the pageHeaderUser template, there is an if surrounding the display for the login button: {if !$__disableLoginLink|isset}


    I can't seem to find an option for this in the ACP, and searching is inconclusive. Does such a configuration exist?

    Also, if I can't configure it in the ACP, is it possible to set the variable in template code? I'd like something like this:


    Code
    1. {if !$__disableLoginLink|isset}
    2. {$__disableLoginLink = true}
    3. {/if}
    4. {if !$__disableLoginLink|isset}
    5. <!-- Show login button -->
    6. {/if}

    I was able to get an inelegant solution to work:

    Code
    1. {if !$__disableLoginLink|isset && $__disableLoginLink|isset}

    If there's a more elegant solution to this, do let me know, but this definitely works.

  • There's a plugin by us, which allows you to dynamically enable and disable it. Just hiding the link doesn't disable the login.


    However, I did not port it to WSC 3.1, yet.

    CSS
    1. * { background-color: rgba(255,0,0,.2); }
    2. * * { background-color: rgba(0,255,0,.2); }
    3. * * * { background-color: rgba(0,0,255,.2); }
    4. * * * * { background-color: rgba(255,0,255,.2); }
  • There's a plugin by us, which allows you to dynamically enable and disable it. Just hiding the link doesn't disable the login.


    However, I did not port it to WSC 3.1, yet.

    Right, I'm not looking to disable login functionality. Only staff will be logging in and they know just to add /login to the end of the url. I just wanted to hide the login button from the front page


    I had originally removed the pageHeaderUser declaration from the pageHeader template, but this caused issues with the sidebar on mobile devices because the wcf js failed (could not find the search bar button).

  • In this case, try editing the template header and after the event beforePageHeader, simply add {assign var='__disableLoginLink' value=true}{/if}


    You may also add this CSS:


    Code
    1. [data-more="com.woltlab.wcf.login"] {
    2. display: none !important;
    3. }
    CSS
    1. * { background-color: rgba(255,0,0,.2); }
    2. * * { background-color: rgba(0,255,0,.2); }
    3. * * * { background-color: rgba(0,0,255,.2); }
    4. * * * * { background-color: rgba(255,0,255,.2); }

    Edited once, last by SoftCreatR ().