mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-21 16:13:00 +00:00
fix missing/wrong help sections, typos
This commit is contained in:
parent
df617bac2a
commit
9d36365d84
6 changed files with 28 additions and 24 deletions
|
@ -19,6 +19,7 @@ This is the next release of Pepperminty Wiki, that hasn't been released yet.
|
|||
- Fixed typos in system text
|
||||
- Fixed handling of [`firstrun_complete`](https://starbeamrainbowlabs.com/labs/peppermint/peppermint-config-info.php#config_firstrun_complete) setting if `peppermint.json` is prefilled with a `firstrun_complete` directive but the Wiki hasn't been initialised for the first time yet - useful for installations inside Docker
|
||||
- Fill in `secret` with a secrely random value inside `peppermint.json` if it doesn't exist.... even if `peppermint.json` already exists. Also useful for Docker users.
|
||||
- Fixed missing / wrong help sections for `page-sitemap` (shown only to mods) and `page-user-list`
|
||||
- Clarify that `peppermint.json` is NOT covered by the [`data_storage_dir` configuration directive](https://starbeamrainbowlabs.com/labs/peppermint/peppermint-config-info.php#config_data_storage_dir)
|
||||
- Fix PHP warning when posting new comments ([#247](https://github.com/sbrl/Pepperminty-Wiki/pull/247) - thanks, @neapsix!)
|
||||
- Fix PHP 8.2 deprecation warnings ([#248](https://github.com/sbrl/Pepperminty-Wiki/pull/248) - thanks, @neapsix!)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
register_module([
|
||||
"name" => "Page deleter",
|
||||
"version" => "0.10.3",
|
||||
"version" => "0.10.4",
|
||||
"author" => "Starbeamrainbowlabs",
|
||||
"description" => "Adds an action to allow administrators to delete pages.",
|
||||
"id" => "page-delete",
|
||||
|
@ -115,7 +115,7 @@ register_module([
|
|||
});
|
||||
|
||||
// Register a help section
|
||||
add_help_section("60-delete", "Deleting Pages", "<p>If you are logged in as an adminitrator, then you have the power to delete pages. To do this, click "Delete" in the "More..." menu when browsing the pge you wish to delete. When you are sure that you want to delete the page, click the given link.</p>
|
||||
add_help_section("60-delete", "Deleting Pages", "<p>If you are logged in as an administrator, then you have the power to delete pages. To do this, click "Delete" in the "More..." menu when browsing the pge you wish to delete. When you are sure that you want to delete the page, click the given link.</p>
|
||||
<p><strong>Warning: Once a page has been deleted, you can't bring it back! You will need to recover it from your backup, if you have one (which you really should).</strong></p>");
|
||||
}
|
||||
]);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
register_module([
|
||||
"name" => "Page editor",
|
||||
"version" => "0.19.1",
|
||||
"version" => "0.19.2",
|
||||
"author" => "Starbeamrainbowlabs",
|
||||
"description" => "Allows you to edit pages by adding the edit and save actions. You should probably include this one.",
|
||||
"id" => "page-edit",
|
||||
|
@ -27,7 +27,7 @@ register_module([
|
|||
* @apiPermission Anonymous
|
||||
*
|
||||
* @apiUse PageParameter
|
||||
* @apiParam {string} newpage Optional. Set to 'yes' if a new page is being created. Only affects a few bits of text here and there, and the HTTP response code recieved on success from the `save` action.
|
||||
* @apiParam {string} newpage Optional. Set to 'yes' if a new page is being created. Only affects a few bits of text here and there, and the HTTP response code received on success from the `save` action.
|
||||
* @apiParam {string} unknownpagename Optional. Set to 'yes' if the name of the page to be created is currently unknown. If set, a page name box will be shown too.
|
||||
*/
|
||||
|
||||
|
@ -356,12 +356,12 @@ window.addEventListener("load", function(event) {
|
|||
* @apiPermission Anonymous
|
||||
*
|
||||
* @apiUse PageParameter
|
||||
* @apiParam {string} newpage GET only. Set to 'yes' to indicate that this is a new page that is being saved. Only affects the HTTP response code you recieve upon success.
|
||||
* @apiParam {string} newpage GET only. Set to 'yes' to indicate that this is a new page that is being saved. Only affects the HTTP response code you receive upon success.
|
||||
* @apiParam {string} content POST only. The new content to save to the given filename.
|
||||
* @apiParam {string} tags POST only. A comma-separated list of tags to assign to the current page. Will replace the existing list of tags, if any are present.
|
||||
* @apiParam {string} prev-content-hash POST only. The hash of the original content before editing. If this hash is found to be different to a hash computed of the currentl saved content, a conflict resolution page will be returned instead of saving the provided content.
|
||||
* @apiParam {string} prev-content-hash POST only. The hash of the original content before editing. If this hash is found to be different to a hash computed of the currently saved content, a conflict resolution page will be returned instead of saving the provided content.
|
||||
*
|
||||
* @apiError UnsufficientPermissionError You don't currently have sufficient permissions to save an edit.
|
||||
* @apiError InsufficientPermissionError You don't currently have sufficient permissions to save an edit.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -145,7 +145,7 @@ register_module([
|
|||
if(!save_userdata()) {
|
||||
http_response_code(503);
|
||||
exit(page_renderer::render_main("Login Error - $settings->sitename", "<p>Your credentials were correct, but $settings->sitename was unable to log you in as an updated hash of your password couldn't be saved. Updating your password hash to the latest and strongest hashing algorithm is an important part of keeping your account secure.</p>
|
||||
<p>Please contact ".htmlentities($settings->admindetails_name).", $settings->sitename's adminstrator, for assistance (their email address can be found at the bottom of every page, including this one).</p>"));
|
||||
<p>Please contact ".htmlentities($settings->admindetails_name).", $settings->sitename's administrator, for assistance (their email address can be found at the bottom of every page, including this one).</p>"));
|
||||
}
|
||||
error_log("[PeppermintyWiki/$settings->sitename/login] Updated password hash for $user.");
|
||||
}
|
||||
|
@ -205,7 +205,7 @@ register_module([
|
|||
});
|
||||
|
||||
// Register a section on logging in on the help page.
|
||||
add_help_section("30-login", "Logging in", "<p>In order to edit $settings->sitename and have your edit attributed to you, you need to be logged in. Depending on the settings, logging in may be a required step if you want to edit at all. Thankfully, loggging in is not hard. Simply click the "Login" link in the top left, type your username and password, and then click login.</p>
|
||||
add_help_section("30-login", "Logging in", "<p>In order to edit $settings->sitename and have your edit attributed to you, you need to be logged in. Depending on the settings, logging in may be a required step if you want to edit at all. Thankfully, logging in is not hard. Simply click the "Login" link in the top left, type your username and password, and then click login.</p>
|
||||
<p>If you do not have an account yet and would like one, try contacting " . hide_email($settings->admindetails_email, $settings->admindetails_name) . ", $settings->sitename's administrator and ask them nicely to see if they can create you an account.</p>");
|
||||
|
||||
// Re-check the password hashing cost, if necessary
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
|
||||
register_module([
|
||||
"name" => "Sitemap",
|
||||
"version" => "0.1.1",
|
||||
"version" => "0.1.2",
|
||||
"author" => "Starbeamrainbowlabs",
|
||||
"description" => "Adds XML sitemap generation. Additional manual setup is required to notify search engines about the sitemap. See the Features FAQ in the documentation (or your wiki's credits page) for more information.",
|
||||
"id" => "page-sitemap",
|
||||
"code" => function() {
|
||||
global $settings;
|
||||
global $settings, $env;
|
||||
/**
|
||||
* @api {get} ?action=sitemap Get an XML sitemap
|
||||
* @apiName Sitemap
|
||||
|
@ -56,8 +56,12 @@ register_module([
|
|||
exit($sitemap);
|
||||
});
|
||||
|
||||
add_help_section("800-raw-page-content", "Viewing Raw Page Content", "<p>Although you can use the edit page to view a page's source, you can also ask $settings->sitename to send you the raw page source and nothing else. This feature is intented for those who want to automate their interaction with $settings->sitename.</p>
|
||||
<p>To use this feature, navigate to the page for which you want to see the source, and then alter the <code>action</code> parameter in the url's query string to be <code>raw</code>. If the <code>action</code> parameter doesn't exist, add it. Note that when used on an file's page this action will return the source of the description and not the file itself.</p>");
|
||||
if($env->is_admin) {
|
||||
add_help_section("947-sitemap", "Sitemap", "<p>$settings->sitename has a sitemap. You can find it here: <a href='?action=sitemap'>sitemap</a>.</p>
|
||||
<p>In order for crawlers to discover this sitemap however, you must update your <code>robots.txt</code> file for the domain $settings->sitename is hosted on to add a line like so:</p>
|
||||
<pre><code>Sitemap: http://example.com/path/to/index.php?action=sitemap</code></pre>
|
||||
<p>....replacing the relevant parts of the URL as appropriate. Note that more than one <code>Sitemap:</code> directive is allowed in a single <code>robots.txt</code> file.</p>");
|
||||
}
|
||||
}
|
||||
]);
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
register_module([
|
||||
"name" => "User list",
|
||||
"version" => "0.1",
|
||||
"version" => "0.1.1",
|
||||
"author" => "Starbeamrainbowlabs",
|
||||
"description" => "Adds a 'user-list' action that generates a list of users. Supports json output with 'format=json' in the queyr string.",
|
||||
"id" => "page-user-list",
|
||||
|
@ -44,8 +44,7 @@ register_module([
|
|||
exit(page_renderer::render_main("User List - $settings->sitename", $content));
|
||||
});
|
||||
|
||||
add_help_section("800-raw-page-content", "Viewing Raw Page Content", "<p>Although you can use the edit page to view a page's source, you can also ask $settings->sitename to send you the raw page source and nothing else. This feature is intented for those who want to automate their interaction with $settings->sitename.</p>
|
||||
<p>To use this feature, navigate to the page for which you want to see the source, and then alter the <code>action</code> parameter in the url's query string to be <code>raw</code>. If the <code>action</code> parameter doesn't exist, add it. Note that when used on an file's page this action will return the source of the description and not the file itself.</p>");
|
||||
add_help_section("18-user-list", "User list", "<p>$settings->sitename has a page that lists all the users on the site. You can access it here: <a href='?action=user-list'>user list</a>.</p>");
|
||||
}
|
||||
]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue