mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-26 05:32:59 +00:00
Add comment_time_icon setting and add link to edit master settings from credits
This commit is contained in:
parent
54f89296a1
commit
0f30af6f83
5 changed files with 18 additions and 12 deletions
|
@ -133,6 +133,7 @@ $guiConfig = <<<'GUICONFIG'
|
||||||
]},
|
]},
|
||||||
"comment_max_length": {"type": "number", "description": "The maximum allowed length, in characters, for comments", "default": 5000 },
|
"comment_max_length": {"type": "number", "description": "The maximum allowed length, in characters, for comments", "default": 5000 },
|
||||||
"comment_min_length": {"type": "number", "description": "The minimum allowed length, in characters, for comments", "default": 10 },
|
"comment_min_length": {"type": "number", "description": "The minimum allowed length, in characters, for comments", "default": 10 },
|
||||||
|
"comment_time_icon": {"type": "text", "description": "The icon to show next to the time that a comment was posted.", "default": "🕗" },
|
||||||
"upload_enabled": {"type": "checkbox", "description": "Whether to allow uploads to the server.", "default": true},
|
"upload_enabled": {"type": "checkbox", "description": "Whether to allow uploads to the server.", "default": true},
|
||||||
"upload_allowed_file_types": {"type": "array", "description": "An array of mime types that are allowed to be uploaded.", "default": [
|
"upload_allowed_file_types": {"type": "array", "description": "An array of mime types that are allowed to be uploaded.", "default": [
|
||||||
"image/jpeg",
|
"image/jpeg",
|
||||||
|
@ -2072,7 +2073,7 @@ function render_sidebar($pageindex, $root_pagename = "")
|
||||||
|
|
||||||
register_module([
|
register_module([
|
||||||
"name" => "Page Comments",
|
"name" => "Page Comments",
|
||||||
"version" => "0.1",
|
"version" => "0.2",
|
||||||
"author" => "Starbeamrainbowlabs",
|
"author" => "Starbeamrainbowlabs",
|
||||||
"description" => "Adds threaded comments to the bottom of every page.",
|
"description" => "Adds threaded comments to the bottom of every page.",
|
||||||
"id" => "feature-comments",
|
"id" => "feature-comments",
|
||||||
|
@ -2354,6 +2355,8 @@ function fetch_comment_thread($comment_data, $comment_id)
|
||||||
*/
|
*/
|
||||||
function render_comments($comments_data, $depth = 0)
|
function render_comments($comments_data, $depth = 0)
|
||||||
{
|
{
|
||||||
|
global $settings;
|
||||||
|
|
||||||
if(count($comments_data) == 0) {
|
if(count($comments_data) == 0) {
|
||||||
if($depth == 0)
|
if($depth == 0)
|
||||||
return "<p><em>No comments here! Start the conversation above.</em></p>";
|
return "<p><em>No comments here! Start the conversation above.</em></p>";
|
||||||
|
@ -2373,7 +2376,7 @@ function render_comments($comments_data, $depth = 0)
|
||||||
$result .= "\t<p class='comment-footer'>";
|
$result .= "\t<p class='comment-footer'>";
|
||||||
$result .= "\t\t<span class='comment-footer-item'><button class='reply-button'>Reply</button></span>\n";
|
$result .= "\t\t<span class='comment-footer-item'><button class='reply-button'>Reply</button></span>\n";
|
||||||
$result .= "\t\t<span class='comment-footer-item'><a class='permalink-button' href='#comment-$comment->id' title='Permalink to this comment'>🔗</a></span>\n";
|
$result .= "\t\t<span class='comment-footer-item'><a class='permalink-button' href='#comment-$comment->id' title='Permalink to this comment'>🔗</a></span>\n";
|
||||||
$result .= "\t\t<span class='comment-footer-item'><time datetime='" . date("c", strtotime($comment->timestamp)) . "' title='The time this comment was posted'>🕗 " . date("l jS \of F Y \a\\t h:ia T", strtotime($comment->timestamp)) . "</time></span>\n";
|
$result .= "\t\t<span class='comment-footer-item'><time datetime='" . date("c", strtotime($comment->timestamp)) . "' title='The time this comment was posted'>$settings->comment_time_icon " . date("l jS \of F Y \a\\t h:ia T", strtotime($comment->timestamp)) . "</time></span>\n";
|
||||||
$result .= "\t</p>\n";
|
$result .= "\t</p>\n";
|
||||||
$result .= "\t" . render_comments($comment->replies, $depth + 1) . "\n";
|
$result .= "\t" . render_comments($comment->replies, $depth + 1) . "\n";
|
||||||
$result .= "\t</div>";
|
$result .= "\t</div>";
|
||||||
|
@ -4487,7 +4490,7 @@ register_module([
|
||||||
|
|
||||||
register_module([
|
register_module([
|
||||||
"name" => "Credits",
|
"name" => "Credits",
|
||||||
"version" => "0.7.5",
|
"version" => "0.7.6",
|
||||||
"author" => "Starbeamrainbowlabs",
|
"author" => "Starbeamrainbowlabs",
|
||||||
"description" => "Adds the credits page. You *must* have this module :D",
|
"description" => "Adds the credits page. You *must* have this module :D",
|
||||||
"id" => "page-credits",
|
"id" => "page-credits",
|
||||||
|
@ -4598,7 +4601,7 @@ register_module([
|
||||||
$credits_html
|
$credits_html
|
||||||
<h2>Site status</h2>
|
<h2>Site status</h2>
|
||||||
<table>
|
<table>
|
||||||
<tr><th>Site name:</th><td>$settings->sitename (<a href='?action=update'>$settings->admindisplaychar Update</a>, <a href='?action=export'>Export as zip - Check for permission first</a>)</td></tr>
|
<tr><th>Site name:</th><td>$settings->sitename (<a href='?action=update'>{$settings->admindisplaychar}Update</a>, <a href='?action=configure'>{$settings->admindisplaychar}Edit master settings</a>, <a href='?action=export'>Export as zip - Check for permission first</a>)</td></tr>
|
||||||
<tr><th>Pepperminty Wiki version:</th><td>$version</td></tr>
|
<tr><th>Pepperminty Wiki version:</th><td>$version</td></tr>
|
||||||
<tr><th>Number of pages:</th><td>" . count(get_object_vars($pageindex)) . "</td></tr>
|
<tr><th>Number of pages:</th><td>" . count(get_object_vars($pageindex)) . "</td></tr>
|
||||||
<tr><th>Number of modules:</th><td>" . count($modules) . "</td></tr>
|
<tr><th>Number of modules:</th><td>" . count($modules) . "</td></tr>
|
||||||
|
|
|
@ -46,11 +46,11 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Page Comments",
|
"name": "Page Comments",
|
||||||
"version": "0.1",
|
"version": "0.2",
|
||||||
"author": "Starbeamrainbowlabs",
|
"author": "Starbeamrainbowlabs",
|
||||||
"description": "Adds threaded comments to the bottom of every page.",
|
"description": "Adds threaded comments to the bottom of every page.",
|
||||||
"id": "feature-comments",
|
"id": "feature-comments",
|
||||||
"lastupdate": 1494959920,
|
"lastupdate": 1495278880,
|
||||||
"optional": false
|
"optional": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -118,11 +118,11 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Credits",
|
"name": "Credits",
|
||||||
"version": "0.7.5",
|
"version": "0.7.6",
|
||||||
"author": "Starbeamrainbowlabs",
|
"author": "Starbeamrainbowlabs",
|
||||||
"description": "Adds the credits page. You *must* have this module :D",
|
"description": "Adds the credits page. You *must* have this module :D",
|
||||||
"id": "page-credits",
|
"id": "page-credits",
|
||||||
"lastupdate": 1472230366,
|
"lastupdate": 1495279824,
|
||||||
"optional": false
|
"optional": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
register_module([
|
register_module([
|
||||||
"name" => "Page Comments",
|
"name" => "Page Comments",
|
||||||
"version" => "0.1",
|
"version" => "0.2",
|
||||||
"author" => "Starbeamrainbowlabs",
|
"author" => "Starbeamrainbowlabs",
|
||||||
"description" => "Adds threaded comments to the bottom of every page.",
|
"description" => "Adds threaded comments to the bottom of every page.",
|
||||||
"id" => "feature-comments",
|
"id" => "feature-comments",
|
||||||
|
@ -283,6 +283,8 @@ function fetch_comment_thread($comment_data, $comment_id)
|
||||||
*/
|
*/
|
||||||
function render_comments($comments_data, $depth = 0)
|
function render_comments($comments_data, $depth = 0)
|
||||||
{
|
{
|
||||||
|
global $settings;
|
||||||
|
|
||||||
if(count($comments_data) == 0) {
|
if(count($comments_data) == 0) {
|
||||||
if($depth == 0)
|
if($depth == 0)
|
||||||
return "<p><em>No comments here! Start the conversation above.</em></p>";
|
return "<p><em>No comments here! Start the conversation above.</em></p>";
|
||||||
|
@ -302,7 +304,7 @@ function render_comments($comments_data, $depth = 0)
|
||||||
$result .= "\t<p class='comment-footer'>";
|
$result .= "\t<p class='comment-footer'>";
|
||||||
$result .= "\t\t<span class='comment-footer-item'><button class='reply-button'>Reply</button></span>\n";
|
$result .= "\t\t<span class='comment-footer-item'><button class='reply-button'>Reply</button></span>\n";
|
||||||
$result .= "\t\t<span class='comment-footer-item'><a class='permalink-button' href='#comment-$comment->id' title='Permalink to this comment'>🔗</a></span>\n";
|
$result .= "\t\t<span class='comment-footer-item'><a class='permalink-button' href='#comment-$comment->id' title='Permalink to this comment'>🔗</a></span>\n";
|
||||||
$result .= "\t\t<span class='comment-footer-item'><time datetime='" . date("c", strtotime($comment->timestamp)) . "' title='The time this comment was posted'>🕗 " . date("l jS \of F Y \a\\t h:ia T", strtotime($comment->timestamp)) . "</time></span>\n";
|
$result .= "\t\t<span class='comment-footer-item'><time datetime='" . date("c", strtotime($comment->timestamp)) . "' title='The time this comment was posted'>$settings->comment_time_icon " . date("l jS \of F Y \a\\t h:ia T", strtotime($comment->timestamp)) . "</time></span>\n";
|
||||||
$result .= "\t</p>\n";
|
$result .= "\t</p>\n";
|
||||||
$result .= "\t" . render_comments($comment->replies, $depth + 1) . "\n";
|
$result .= "\t" . render_comments($comment->replies, $depth + 1) . "\n";
|
||||||
$result .= "\t</div>";
|
$result .= "\t</div>";
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
register_module([
|
register_module([
|
||||||
"name" => "Credits",
|
"name" => "Credits",
|
||||||
"version" => "0.7.5",
|
"version" => "0.7.6",
|
||||||
"author" => "Starbeamrainbowlabs",
|
"author" => "Starbeamrainbowlabs",
|
||||||
"description" => "Adds the credits page. You *must* have this module :D",
|
"description" => "Adds the credits page. You *must* have this module :D",
|
||||||
"id" => "page-credits",
|
"id" => "page-credits",
|
||||||
|
@ -112,7 +112,7 @@ register_module([
|
||||||
$credits_html
|
$credits_html
|
||||||
<h2>Site status</h2>
|
<h2>Site status</h2>
|
||||||
<table>
|
<table>
|
||||||
<tr><th>Site name:</th><td>$settings->sitename (<a href='?action=update'>$settings->admindisplaychar Update</a>, <a href='?action=export'>Export as zip - Check for permission first</a>)</td></tr>
|
<tr><th>Site name:</th><td>$settings->sitename (<a href='?action=update'>{$settings->admindisplaychar}Update</a>, <a href='?action=configure'>{$settings->admindisplaychar}Edit master settings</a>, <a href='?action=export'>Export as zip - Check for permission first</a>)</td></tr>
|
||||||
<tr><th>Pepperminty Wiki version:</th><td>$version</td></tr>
|
<tr><th>Pepperminty Wiki version:</th><td>$version</td></tr>
|
||||||
<tr><th>Number of pages:</th><td>" . count(get_object_vars($pageindex)) . "</td></tr>
|
<tr><th>Number of pages:</th><td>" . count(get_object_vars($pageindex)) . "</td></tr>
|
||||||
<tr><th>Number of modules:</th><td>" . count($modules) . "</td></tr>
|
<tr><th>Number of modules:</th><td>" . count($modules) . "</td></tr>
|
||||||
|
|
|
@ -111,6 +111,7 @@
|
||||||
]},
|
]},
|
||||||
"comment_max_length": {"type": "number", "description": "The maximum allowed length, in characters, for comments", "default": 5000 },
|
"comment_max_length": {"type": "number", "description": "The maximum allowed length, in characters, for comments", "default": 5000 },
|
||||||
"comment_min_length": {"type": "number", "description": "The minimum allowed length, in characters, for comments", "default": 10 },
|
"comment_min_length": {"type": "number", "description": "The minimum allowed length, in characters, for comments", "default": 10 },
|
||||||
|
"comment_time_icon": {"type": "text", "description": "The icon to show next to the time that a comment was posted.", "default": "🕗" },
|
||||||
"upload_enabled": {"type": "checkbox", "description": "Whether to allow uploads to the server.", "default": true},
|
"upload_enabled": {"type": "checkbox", "description": "Whether to allow uploads to the server.", "default": true},
|
||||||
"upload_allowed_file_types": {"type": "array", "description": "An array of mime types that are allowed to be uploaded.", "default": [
|
"upload_allowed_file_types": {"type": "array", "description": "An array of mime types that are allowed to be uploaded.", "default": [
|
||||||
"image/jpeg",
|
"image/jpeg",
|
||||||
|
|
Loading…
Reference in a new issue