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

Add conditional link to user preferences page to watchlist

This commit is contained in:
Starbeamrainbowlabs 2019-12-23 22:31:44 +00:00
parent d467222660
commit f6d183a11e
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 8 additions and 4 deletions

View file

@ -175,7 +175,7 @@
"version": "0.3.3", "version": "0.3.3",
"author": "Starbeamrainbowlabs", "author": "Starbeamrainbowlabs",
"description": "Adds a user preferences page, letting people do things like change their email address and password.", "description": "Adds a user preferences page, letting people do things like change their email address and password.",
"lastupdate": 1566671167, "lastupdate": 1577140256,
"optional": false, "optional": false,
"extra_data": [] "extra_data": []
}, },

View file

@ -1,7 +1,7 @@
<?php <?php
register_module([ register_module([
"name" => "User Preferences", "name" => "User Preferences",
"version" => "0.3.3", "version" => "0.3.4",
"author" => "Starbeamrainbowlabs", "author" => "Starbeamrainbowlabs",
"description" => "Adds a user preferences page, letting people do things like change their email address and password.", "description" => "Adds a user preferences page, letting people do things like change their email address and password.",
"id" => "feature-user-preferences", "id" => "feature-user-preferences",
@ -45,10 +45,14 @@ register_module([
} }
$content = "<h2>User Preferences</h2>\n"; $content = "<h2>User Preferences</h2>\n";
if(isset($_GET["success"]) && $_GET["success"] === "yes") if(isset($_GET["success"]) && $_GET["success"] === "yes") {
{
$content .= "<p class='user-prefs-status-message'><em>" . $statusMessages[$_GET["operation"]] . "</em></p>\n"; $content .= "<p class='user-prefs-status-message'><em>" . $statusMessages[$_GET["operation"]] . "</em></p>\n";
} }
if(has_action("watchlist") && module_exists("feature-watchlist")) {
$content .= "<p><em>Looking for your watchlist? Find it <a href='?action=watchlist'>here</a>!</p>";
}
// If avatar support is present, allow the user to upload a new avatar // If avatar support is present, allow the user to upload a new avatar
if(has_action("avatar") && module_exists("feature-upload")) { if(has_action("avatar") && module_exists("feature-upload")) {
$content .= "<a href='?action=upload&avatar=yes' class='preview'><figure>\n"; $content .= "<a href='?action=upload&avatar=yes' class='preview'><figure>\n";