Help extension

Provides foundation for help pages that are generated from loaded extensions, starting with comprehensive search documentation. Addresses #522
This commit is contained in:
Matthew Barbour
2019-08-02 15:05:49 -05:00
committed by matthew
parent 00464d2579
commit a18589ee0a
31 changed files with 769 additions and 6 deletions

View File

@ -91,4 +91,47 @@ class NumericScoreTheme extends Themelet
$page->add_block(new Block("Navigation", $nav_html, "left", 10));
$page->add_block(new Block(null, $html, "main", 30));
}
public function get_help_html()
{
return '<p>Search for images that have received numeric scores by the score or by the scorer.</p>
<div class="command_example">
<pre>score=1</pre>
<p>Returns images with a score of 1.</p>
</div>
<div class="command_example">
<pre>score>0</pre>
<p>Returns images with a score of 1 or more.</p>
</div>
<p>Can use &lt;, &lt;=, &gt;, &gt;=, or =.</p>
<div class="command_example">
<pre>upvoted_by=username</pre>
<p>Returns images upvoted by "username".</p>
</div>
<div class="command_example">
<pre>upvoted_by_id=123</pre>
<p>Returns images upvoted by user 123.</p>
</div>
<div class="command_example">
<pre>downvoted_by=username</pre>
<p>Returns images downvoted by "username".</p>
</div>
<div class="command_example">
<pre>downvoted_by_id=123</pre>
<p>Returns images downvoted by user 123.</p>
</div>
<div class="command_example">
<pre>order:score_desc</pre>
<p>Sorts the search results by score, descending.</p>
</div>
<div class="command_example">
<pre>order:score_asc</pre>
<p>Sorts the search results by score, ascending.</p>
</div>
';
}
}