Gallery Template for displaying thumbnails.
[show modes: view edit info]
[begin mode view]
[msg_start()]
[
$list = dirlist($_body);
$thumbsize = 120;
$list2 = foreach($list, chr(10)) {[
    $_data = {
              <div style="display: inline-block; vertical-align: top; text-align: center; width: [$thumbsize]px; padding: 10px;"><a target="_new" href="/pictures/galleries/[$_body]/[$_data]">
                  <img src="/pictures/thumb.star?src=galleries/[$_body]/[$_data]&w=[$thumbsize]&h=[$thumbsize]" style="margin: 4px; box-shadow: 3px 2px 5px rgba(0,0,0,0.4)"><br>
[
iif(strpos($_data, "."), substr($_data, 0, strrpos($_data, ".")), $_data);
]</a>
              </div>
    };
]};
$list2;
]
[msg_end()]
[end mode view]
[begin mode abbr]

[end mode abbr]
[begin mode info]
<table>
	<tr><th>Title:</th><td>[info_display($_title)]</td></tr>
	<tr><th>Subtitle:</th><td>[info_display($_subtitle)]</td></tr>
<tr><th>Parent:</th><td>[$_parent]</td></tr>
<tr><th>Permissions:</th><td>[$_permissions]</td></tr>
<tr><th>Author:</th><td>[$_author]</td></tr>
<tr><th>Group:</th><td>[$_group]</td></tr>
<tr><th>ID:</th><td>[$_id]</td></tr>
<tr><th>Template:</th><td>[$_template]</td></tr>
<tr><th>Directory:</th><td>[info_display($_body)]</td></tr>
    </table> 
[end mode info]
[begin mode edit]
    <form method="post" action="/">
        <input type="hidden" name="page" value="[$_title]">
        <input type="hidden" name="mode" value="submit">
<table>
        <tr><th>Title:</th><td><input type="text" class="textbox" name="title" value="[edit_display($_title)]" style="width: 100%"></td></tr>
        <tr><th>Subtitle:</th><td><input type="text" class="textbox" name="subtitle" value="[edit_display($_subtitle)]" style="width: 100%"></td></tr>
        <tr><th>Parent:</th><td><input type="text" class="textbox" name="parent" value="[$_parent]"></td></tr>
        <tr><th>Permissions:</th><td><input type="text" class="textbox" name="permissions" value="[$_permissions]"></td></tr>
        <tr><th>Author:</th><td><input type="text" class="textbox" name="author" value="[$_author]"></td></tr>
        <tr><th>Group:</th><td><input type="text" class="textbox" name="group" value="[$_group]"></td></tr>
        <tr><th>Template:</th><td><input type="text" class="textbox" name="template" value="[$_template]"></td></tr>
        <tr><th>Path to display:</th><td><input type="text" class="textbox" name="body" value="[edit_display($_body)]"><br>
<p>This directory should be within the directory specified by the VROOT global in config.star. For our purposes, that means /pictures/galleries.</p></td></tr>
<tr><td></td><td>
        <input name="submitButton" class="submit" type="submit" value="Submit"> <i>your permissions</i>: [$_viewer.permissions]</td></tr></table>
    </form> 
[end mode edit]
[begin mode submit]
    [$_title = $_params.title]
    [$_subtitle = $_params.subtitle]
    [$_parent = $_params.parent]
    [$_permissions = $_params.permissions]
    [$_author = $_params.author]
    [$_group = $_params.group]
    [$_body = $_params.body]
    [$_template = $_params.template]
    <h2>It was submitted.</h2>
    <a href="/?[$_title]">Return to it.</a>
[end mode submit]