1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-25 05:22:59 +00:00

Link to master settings from user preferences for admins

This commit is contained in:
Starbeamrainbowlabs 2017-03-20 19:57:50 +00:00
parent bdbb40070c
commit 86ebcf57a0
5 changed files with 11 additions and 4 deletions

View file

@ -13,6 +13,7 @@
- Accessible via the (by default) small cog next to your username when you're logged in - Accessible via the (by default) small cog next to your username when you're logged in
- The cog is customisable via the new `user_preferences_button_text` setting. - The cog is customisable via the new `user_preferences_button_text` setting.
- You can change your password - You can change your password
- There's link to the master site settings from user preferences for admins.
- [Module API] Added `$env->user_data` and `save_userdata()` to interact with the logged in users' data - [Module API] Added `$env->user_data` and `save_userdata()` to interact with the logged in users' data
- User pages! Every page under `Users/` by default belongs to their respective users. e.g. `Users/admin` and all the pages under it belong to the `admin` user, so no other user can edit them. - User pages! Every page under `Users/` by default belongs to their respective users. e.g. `Users/admin` and all the pages under it belong to the `admin` user, so no other user can edit them.
- You can access your own user page by clicking on your username in the top corner when you're logged in. - You can access your own user page by clicking on your username in the top corner when you're logged in.

View file

@ -2012,7 +2012,7 @@ register_module([
$content = "<h1>Master Control Panel</h1>\n"; $content = "<h1>Master Control Panel</h1>\n";
$content .= "<p>This page lets you configure $settings->sitename's master settings. Please be careful - you can break things easily on this page if you're not careful!</p>\n"; $content .= "<p>This page lets you configure $settings->sitename's master settings. Please be careful - you can break things easily on this page if you're not careful!</p>\n";
$content .= "<p>Mouse over the name of each the settings to see a description of what it does.</p>\n"; $content .= "<p>Mouse over the name of each setting to see a description of what it does.</p>\n";
$content .= "<form action='?action=configure-save' method='post'>\n"; $content .= "<form action='?action=configure-save' method='post'>\n";
foreach($guiConfig as $configKey => $configData) foreach($guiConfig as $configKey => $configData)
@ -3892,6 +3892,9 @@ register_module([
$content .= " <input type='submit' value='Change Password' />\n"; $content .= " <input type='submit' value='Change Password' />\n";
$content .= "</form>\n"; $content .= "</form>\n";
if($env->is_admin)
$content .= "<p>As an admin, you can also <a href='?action=configure'>edit $settings->sitename's master settings</a>.</p>\n";
exit(page_renderer::render_main("User Preferences - $settings->sitename", $content)); exit(page_renderer::render_main("User Preferences - $settings->sitename", $content));
}); });

View file

@ -50,7 +50,7 @@
"author": "Starbeamrainbowlabs", "author": "Starbeamrainbowlabs",
"description": "The module everyone has been waiting for! Adds a web based gui that lets mods change the wiki settings.", "description": "The module everyone has been waiting for! Adds a web based gui that lets mods change the wiki settings.",
"id": "feature-guiconfig", "id": "feature-guiconfig",
"lastupdate": 1482008539, "lastupdate": 1490039426,
"optional": false "optional": false
}, },
{ {
@ -104,7 +104,7 @@
"author": "Starbeamrainbowlabs", "author": "Starbeamrainbowlabs",
"description": "Adds a user preferences page, letting pople do things like change their email address and password.", "description": "Adds a user preferences page, letting pople do things like change their email address and password.",
"id": "feature-user-preferences", "id": "feature-user-preferences",
"lastupdate": 1486814152, "lastupdate": 1490039844,
"optional": false "optional": false
}, },
{ {

View file

@ -36,7 +36,7 @@ register_module([
$content = "<h1>Master Control Panel</h1>\n"; $content = "<h1>Master Control Panel</h1>\n";
$content .= "<p>This page lets you configure $settings->sitename's master settings. Please be careful - you can break things easily on this page if you're not careful!</p>\n"; $content .= "<p>This page lets you configure $settings->sitename's master settings. Please be careful - you can break things easily on this page if you're not careful!</p>\n";
$content .= "<p>Mouse over the name of each the settings to see a description of what it does.</p>\n"; $content .= "<p>Mouse over the name of each setting to see a description of what it does.</p>\n";
$content .= "<form action='?action=configure-save' method='post'>\n"; $content .= "<form action='?action=configure-save' method='post'>\n";
foreach($guiConfig as $configKey => $configData) foreach($guiConfig as $configKey => $configData)

View file

@ -71,6 +71,9 @@ register_module([
$content .= " <input type='submit' value='Change Password' />\n"; $content .= " <input type='submit' value='Change Password' />\n";
$content .= "</form>\n"; $content .= "</form>\n";
if($env->is_admin)
$content .= "<p>As an admin, you can also <a href='?action=configure'>edit $settings->sitename's master settings</a>.</p>\n";
exit(page_renderer::render_main("User Preferences - $settings->sitename", $content)); exit(page_renderer::render_main("User Preferences - $settings->sitename", $content));
}); });