mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 04:23:01 +00:00
Add help section on avatars
This commit is contained in:
parent
a5b8bad725
commit
e01f8d9852
3 changed files with 20 additions and 5 deletions
|
@ -4112,6 +4112,7 @@ register_module([
|
|||
$shortFilename = substr($filepath, 1 + (strrpos($filepath, '/') !== false ? strrpos($filepath, '/') : -1));
|
||||
|
||||
header("content-disposition: inline; filename=\"$shortFilename\"");
|
||||
header("last-modified: " . gmdate('D, d M Y H:i:s T', $pageindex->{$env->page}->lastmodified));
|
||||
|
||||
// If the size is set or original, then send (or redirect to) the original image
|
||||
// Also do the same for SVGs if svg rendering is disabled.
|
||||
|
@ -4607,7 +4608,7 @@ register_module([
|
|||
* @apiGroup Upload
|
||||
* @apiPermission Anonymous
|
||||
*
|
||||
* @apiParam {string} username The username to fetch the avatar for
|
||||
* @apiParam {string} user The username to fetch the avatar for
|
||||
* @apiParam {string} size The preferred size of the avatar
|
||||
*/
|
||||
add_action("avatar", function() {
|
||||
|
@ -4650,6 +4651,12 @@ register_module([
|
|||
{
|
||||
add_help_section("910-user-preferences", "User Preferences", "<p>As you are logged in, $settings->sitename lets you configure a selection of personal preferences. These can be viewed and tweaked to you liking over on the <a href='?action=user-preferences'>preferences page</a>, which can be accessed at any time by clicking the cog icon (it looks something like this: <a href='?action=user-preferences'>$settings->user_preferences_button_text</a>), though the administrator of $settings->sitename ($settings->admindetails_name) may have changed its appearance.</p>");
|
||||
}
|
||||
|
||||
if($settings->avatars_show)
|
||||
{
|
||||
add_help_section("915-avatars", "Avatars", "<p>$settings->sitename allows you to upload an avatar and have it displayed next to your name. If you don't have an avatar uploaded yet, then $settings->sitename will take a <a href='https://www.techopedia.com/definition/19744/hash-function'>hash</a> of your email address and ask <a href='https://gravatar.com'>Gravatar</a> for for your Gravatar instead. If you haven't told $settings->sitename what your email address is either, a hash of your username is used instead. If you don't have a gravatar, then $settings->sitename asks Gravatar for an identicon instead.</p>
|
||||
<p>Your avatar on $settings->sitename currently looks like this: <img class='avatar' src='?action=avatar&user=" . urlencode($env->user) . "' />" . ($settings->upload_enabled ? " - you can upload a new one by going to your <a href='?action=user-preferences'>preferences</a>, or <a href='?action=upload&avatar=yes' />clicking here</a>." : ", but $settings->sitename currently has uploads disabled, so you can't upload a new one directly to $settings->sitename. You can, however, set your email address in your <a href='?action=user-preferences'>preferences</a> and <a href='https://en.gravatar.com/'>create a Gravatar</a>, and then it should show up here on $settings->sitename shortly.") . "</p>");
|
||||
}
|
||||
}
|
||||
]);
|
||||
|
||||
|
@ -6281,6 +6288,8 @@ register_module([
|
|||
}
|
||||
}
|
||||
|
||||
header("last-modified: " . gmdate('D, d M Y H:i:s T', $pageindex->{$env->page}->lastmodified));
|
||||
|
||||
// Perform a redirect if the requested page is a redirect page
|
||||
if(isset($pageindex->$page->redirect) &&
|
||||
$pageindex->$page->redirect === true)
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
"author": "Starbeamrainbowlabs",
|
||||
"description": "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File\/' prefix.",
|
||||
"id": "feature-upload",
|
||||
"lastupdate": 1497791727,
|
||||
"lastupdate": 1497793903,
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
|
@ -113,7 +113,7 @@
|
|||
"author": "Starbeamrainbowlabs",
|
||||
"description": "Adds a user preferences page, letting pople do things like change their email address and password.",
|
||||
"id": "feature-user-preferences",
|
||||
"lastupdate": 1497791119,
|
||||
"lastupdate": 1497796098,
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
|
@ -230,7 +230,7 @@
|
|||
"author": "Starbeamrainbowlabs",
|
||||
"description": "Allows you to view pages. You really should include this one.",
|
||||
"id": "page-view",
|
||||
"lastupdate": 1495291771,
|
||||
"lastupdate": 1497794006,
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
|
|
|
@ -176,7 +176,7 @@ register_module([
|
|||
* @apiGroup Upload
|
||||
* @apiPermission Anonymous
|
||||
*
|
||||
* @apiParam {string} username The username to fetch the avatar for
|
||||
* @apiParam {string} user The username to fetch the avatar for
|
||||
* @apiParam {string} size The preferred size of the avatar
|
||||
*/
|
||||
add_action("avatar", function() {
|
||||
|
@ -219,6 +219,12 @@ register_module([
|
|||
{
|
||||
add_help_section("910-user-preferences", "User Preferences", "<p>As you are logged in, $settings->sitename lets you configure a selection of personal preferences. These can be viewed and tweaked to you liking over on the <a href='?action=user-preferences'>preferences page</a>, which can be accessed at any time by clicking the cog icon (it looks something like this: <a href='?action=user-preferences'>$settings->user_preferences_button_text</a>), though the administrator of $settings->sitename ($settings->admindetails_name) may have changed its appearance.</p>");
|
||||
}
|
||||
|
||||
if($settings->avatars_show)
|
||||
{
|
||||
add_help_section("915-avatars", "Avatars", "<p>$settings->sitename allows you to upload an avatar and have it displayed next to your name. If you don't have an avatar uploaded yet, then $settings->sitename will take a <a href='https://www.techopedia.com/definition/19744/hash-function'>hash</a> of your email address and ask <a href='https://gravatar.com'>Gravatar</a> for for your Gravatar instead. If you haven't told $settings->sitename what your email address is either, a hash of your username is used instead. If you don't have a gravatar, then $settings->sitename asks Gravatar for an identicon instead.</p>
|
||||
<p>Your avatar on $settings->sitename currently looks like this: <img class='avatar' src='?action=avatar&user=" . urlencode($env->user) . "' />" . ($settings->upload_enabled ? " - you can upload a new one by going to your <a href='?action=user-preferences'>preferences</a>, or <a href='?action=upload&avatar=yes' />clicking here</a>." : ", but $settings->sitename currently has uploads disabled, so you can't upload a new one directly to $settings->sitename. You can, however, set your email address in your <a href='?action=user-preferences'>preferences</a> and <a href='https://en.gravatar.com/'>create a Gravatar</a>, and then it should show up here on $settings->sitename shortly.") . "</p>");
|
||||
}
|
||||
}
|
||||
]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue