Mobirise Free Add-ons

🔐 AccessProtect

🔐 Access Management — Overview

This module lets you protect pages with ranked roles, manage members, and declare protected pages (gates). Members log in, receive a role (with a role_rank), and can access pages whose min_rank requirement they meet or exceed.

🚀 Typical Workflow

  1. Create roles in roles.php (e.g. viewer=rank 1, editor=5, admin=9).
  2. Create members in members.php. By default they get the lowest role; you can change it from the dropdown.
  3. Declare protected pages in pages.php by adding a page_key and min_rank. Copy the snippet into the target PHP page.
  4. Members log in via login.php. If enabled, reCAPTCHA is required.
  5. Access is granted when member_max_rank ≥ page.min_rank.
AdminPanel Overview

🧩 Roles (roles.php)

Roles define permissions through a numeric role_rank. Higher rank = more access. You generally need only a few (e.g. 1, 5, 9).

AdminPanel Overview

👥 Members (members.php)

Manage the member list (email, display name, active flag). You can toggle active, reset passwords, and assign a role from a dropdown. The UI includes secure password generation and a “copy credentials” helper.

Security note: Passwords are never stored in plaintext—only a one-time display after you create/reset.
AdminPanel Overview

📄 Pages & Gates (pages.php + gates/gates.php)

Each protected page is identified by a unique page_key with a required min_rank. The gate function enforces access control.

Automatic snippet: In pages.php, every entry shows a “Copy code / View” button that automatically generates the gate snippet for that specific page_key. Just copy it and paste it at the very top of the target PHP page to protect it.
  1. Register your page in pages.php with its page_key and required min_rank.
  2. Click Copy code (or View) to get the generated snippet.
  3. Paste the snippet at the very top of the target PHP file.

Snippet inserted in the protected page:

<?php
require_once $_SERVER['DOCUMENT_ROOT'].'/gates/gates.php';
gate('your_page_key'); // min_rank is enforced from DB (apm_pages)
?>
<!-- your page content -->
How it works: gate() checks the member session, looks up the page’s min_rank, computes the member’s maximum role_rank from their roles, and denies access (HTTP 403) if insufficient.
Access Denied example

🔑 Login (login.php) & reCAPTCHA v2

Members sign in with their email/password. reCAPTCHA v2 is supported and auto-discovered from a recaptcha_keys.json file placed in any direct subfolder of the same root as login.php (folder name can vary: administration, admin, xxxxxx, …).

AdminPanel Overview

✅ Best Practices


⚠️ Disclaimer

Important: Before using blocks, add-ons or software, please make a full backup of your project folder.

While this tool has been tested to operate safely, it performs mass modifications to your files and folders. The author cannot be held responsible for any loss, corruption, or damage caused by its use.

Use at your own risk — always work on a copy when in doubt.

* Use of the Website/Services is at your own risk. The Website/Services are provided on an "AS IS" and "AS AVAILABLE" basis without any representation or endorsement made and without warranty of any kind whether express or implied, including but not limited to the implied warranties of satisfactory quality, fitness for a particular purpose, non-infringement, compatibility, security and accuracy. To the extent permitted by law, Zen2cool will not be liable for any indirect or consequential loss or damage whatsoever (including without limitation loss of business, opportunity, data, profits) arising out of or in connection with the use of the Website/Services. We strictly try not to break any copyright law, and in case any data gets included unknowingly in our design/product, we are always willing to remove/rectify the same since we respect the copyright law.

* Mobirise and the Mobirise Logo are trademarks of Mobirise.com and are acknowledged as such.

Ton logo
© Zen2cool — All rights reserved.