-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Hide admin navigation tabs, sidebar elements, or buttons per user — or apply custom CSS modifications to them (fade, disable, highlight, etc). Optionally, block direct access to admin pages server-side so hidden sections can't be reached just by knowing the URL.
- Copy
GS-Hide-Tabs.phpinto your GetSimpleplugins/folder. - Activate it from Plugins in the admin panel.
- Go to Settings → GS Hide Tabs.
Rules are entered as plain text, one line per user:
username: rule1, rule2, rule3
Use the Select User dropdown to insert real usernames (pulled from your GetSimple user XML files, including special characters like info@domain.com), and the built-in helper table to insert common rules with one click.
| Prefix | Effect | Example |
|---|---|---|
id: |
Target an element by ID | id:nav_theme |
class: |
Target elements by class | class:delconfirm |
selector: |
Target any raw CSS selector | selector:#sidebar a[href*="theme"] |
page: |
Server-side block of an admin script | page:pages.php |
within: |
Scope a rule to a parent selector | class:delconfirm within:#pages |
Any id:, class:, or selector: rule can be turned from a hide into a CSS modification by appending {property:value}:
username: id:nav_upload {opacity:0.5}, class:delconfirm {border:2px solid red}
id:, class:, and selector: rules only add display:none (or custom CSS) to the admin UI. They hide the link, not the destination — a user who knows or bookmarks the direct URL (e.g. pages.php) can still open it.
For anything that actually needs to be off-limits, use a page: rule instead:
username: page:pages.php, page:file-manager.php
username2: page:settings.php?tab=seo
-
page:filename.phpblocks the entire admin script for that user (they get a 403 page with a link back to the dashboard). -
page:filename.php?param=valueblocks only that specific query-string variant — useful for GetSimple admin pages that host multiple sections behind one script via GET parameters (e.g.settings.php?tab=seo), rather than separate files.
page: rules are enforced before the target page runs any of its own logic, since GetSimple loads plugins via inc/common.php at the very top of every admin script.
Note: hiding and blocking are independent. If you want a tab both hidden and unreachable, add both an id:/class: rule (for the nav) and a matching page: rule (for access control).
-
page:blocking matches against$_SERVER['SCRIPT_NAME']and$_GET. It does not currently inspect$_POST, so an action reachable only via a POST request to an otherwise-unblocked script won't be caught. - Query-scoped blocking (
?tab=seo) only helps where the target admin page actually distinguishes sections via GET parameters. - CSS modifications (
{...}) are lightly sanitized (angle brackets stripped) but are not a substitute forpage:blocking when real access control is the goal.
Settings are stored as JSON at:
data/other/gs-hide-tabs.json
3.0
- Added
page:rule type for real server-side access blocking (403), including optional query-string scoping. - Added helper table entry and inline documentation for the new rule type.
2.x
- CSS-based hide/modify rules per user (
id:,class:,selector:,within:,{property:value}modifiers).
If you find the plugin useful, you can support development and hosting here: getsimple-ce.ovh/donate