From 967eb1ad139fcb32f184568f8701a82ccd76c373 Mon Sep 17 00:00:00 2001
From: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
Date: Sun, 18 Jun 2017 15:53:21 +0100
Subject: [PATCH] Add section to help on commenting

---
 build/index.php                      | 4 +++-
 module_index.json                    | 2 +-
 modules/feature-comments.php         | 6 ++++--
 modules/feature-upload.php           | 2 +-
 modules/feature-user-preferences.php | 2 +-
 modules/page-view.php                | 2 +-
 6 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/build/index.php b/build/index.php
index 0b4c940..1cfe9a8 100644
--- a/build/index.php
+++ b/build/index.php
@@ -2115,7 +2115,7 @@ register_module([
 	"description" => "Adds threaded comments to the bottom of every page.",
 	"id" => "feature-comments",
 	"code" => function() {
-		global $env;
+		global $env, $settings;
 		
 		/**
 		 * @api {post} ?action=comment	Comment on a page
@@ -2308,6 +2308,8 @@ REPLYJS;
 			page_renderer::AddJSSnippet($reply_js_snippet);
 			
 		}
+		
+		add_help_section("29-commenting", "Commenting", "<p>$settings->sitename has a threaded commenting system on every page. You can find it below each page's content, and can either leave a new comment, or reply to an existing one. If you reply to an existing one, then the authors of all the comments above yours will get notified by email of your reply - so long as they have an email address registered in their preferences.</p>");
 	}
 ]);
 
diff --git a/module_index.json b/module_index.json
index 9c98b28..b71cc24 100755
--- a/module_index.json
+++ b/module_index.json
@@ -50,7 +50,7 @@
         "author": "Starbeamrainbowlabs",
         "description": "Adds threaded comments to the bottom of every page.",
         "id": "feature-comments",
-        "lastupdate": 1495481379,
+        "lastupdate": 1497797540,
         "optional": false
     },
     {
diff --git a/modules/feature-comments.php b/modules/feature-comments.php
index b218b22..3945ca4 100644
--- a/modules/feature-comments.php
+++ b/modules/feature-comments.php
@@ -1,12 +1,12 @@
 <?php
 register_module([
 	"name" => "Page Comments",
-	"version" => "0.2",
+	"version" => "0.2.1",
 	"author" => "Starbeamrainbowlabs",
 	"description" => "Adds threaded comments to the bottom of every page.",
 	"id" => "feature-comments",
 	"code" => function() {
-		global $env;
+		global $env, $settings;
 		
 		/**
 		 * @api {post} ?action=comment	Comment on a page
@@ -199,6 +199,8 @@ REPLYJS;
 			page_renderer::AddJSSnippet($reply_js_snippet);
 			
 		}
+		
+		add_help_section("29-commenting", "Commenting", "<p>$settings->sitename has a threaded commenting system on every page. You can find it below each page's content, and can either leave a new comment, or reply to an existing one. If you reply to an existing one, then the authors of all the comments above yours will get notified by email of your reply - so long as they have an email address registered in their preferences.</p>");
 	}
 ]);
 
diff --git a/modules/feature-upload.php b/modules/feature-upload.php
index 8e47cd7..a7d8cc5 100644
--- a/modules/feature-upload.php
+++ b/modules/feature-upload.php
@@ -1,7 +1,7 @@
 <?php
 register_module([
 	"name" => "Uploader",
-	"version" => "0.5.8",
+	"version" => "0.5.9",
 	"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",
diff --git a/modules/feature-user-preferences.php b/modules/feature-user-preferences.php
index b14fc50..f882535 100644
--- a/modules/feature-user-preferences.php
+++ b/modules/feature-user-preferences.php
@@ -1,7 +1,7 @@
 <?php
 register_module([
 	"name" => "User Preferences",
-	"version" => "0.2.1",
+	"version" => "0.3.1",
 	"author" => "Starbeamrainbowlabs",
 	"description" => "Adds a user preferences page, letting pople do things like change their email address and password.",
 	"id" => "feature-user-preferences",
diff --git a/modules/page-view.php b/modules/page-view.php
index 687273d..4b5a8ba 100644
--- a/modules/page-view.php
+++ b/modules/page-view.php
@@ -1,7 +1,7 @@
 <?php
 register_module([
 	"name" => "Page viewer",
-	"version" => "0.16.4",
+	"version" => "0.16.5",
 	"author" => "Starbeamrainbowlabs",
 	"description" => "Allows you to view pages. You really should include this one.",
 	"id" => "page-view",
