About Protected Mode

Allows you to put your site into protected mode so that users must be logged in to access the front-end of the site.

Category Admin Helpers
Admin helper modules are those that provide helpful tools, UI enhancements or optimizations to the admin panel (excluding Fieldtype or Inputfield modules).
Release StateStable
Should be safe for use in production environments. *
Authoradrian
Module Version1.1.0
Class NameProtectedMode
Compatibility2.4, 2.5, 2.6, 2.7, 3.0
Date AddedSeptember 26, 2014
Last UpdatedNovember 15, 2017
Recommended ByNew recommendations may take up to 1 day to appear.

Instructions

This module's files should be placed in /site/modules/ProtectedMode/
How to install or uninstall modules

README

Protected Mode

Processwire module to prevent access to front-end of website unless logged in.

Very handy during development/maintenance to allow the clients and testers to view the site, but keep everyone else out.

Config Settings

  • Checkbox to enable/disable the protected mode
  • Textarea field for message to be displayed to visitors
  • Textarea field for message to be displayed to users who are not allowed
  • Textarea for CSS to style the login form if you wish
  • Various 503 settings
  • Text options for modifying placeholders etc
  • All text is translatable

License

This program is free software; you can redistribute it and/ormodify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

(See included LICENSE file for full license text.)

Comments

  • Mike

    Mike 3 years ago 00

    Hi, Adrian, thanks for the module, I was almost starting to build the same, when I discovered yours :-)

    I replace the hardcoded english labels of the form with the translate method __('string'). Maybe a good thing for other peaople too?

    Cheers, Mike

  • Adrian

    Adrian 3 years ago 00

    Hi Mike,

    Sorry, I forgot to make some things translatable. Would you mind sending me a pull request with your changes?

    Thanks!

  • Dave

    Dave 2 years ago 00

    Can this module be used to password protect a single page within a website? Example: I want to protect a coupon page. Only those that have submitted their email address will receive a password to get into the coupon page so that they may download the coupons. Thanks!

    • Adrian

      Adrian 2 years ago 00

      Hi Dave,

      You should take a look at this module instead: http://modules.processwire.com/modules/page-protector/

      • Dave

        Dave 2 years ago 10

        Thanks Adrian, I already discovered it and implemented it - works like a charm!

  • Peter Knight

    Peter Knight 2 years ago 00

    Great Module Adrian. Thanks for creating this.
    It would be great if the Message was a little more than plain text.
    Ideas are it could be rich text or perhaps it could be the page ID of a PW page which wasn't protected. Just a thought :-)

    • Adrian

      Adrian 2 years ago 00

      Hi Peter - you should also take a look at: http://modules.processwire.com/modules/page-protector/

      With that module you can inject the login into any template php file so it can be styled however you want.

  • Peter Knight

    Peter Knight 2 years ago 00

    Thanks Adrian. Looks great.

Post a Comment

Your e-mail is kept confidential and not included with your comment. Website is optional.