This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/ext/mime/theme.php
2024-06-21 18:24:38 +01:00

45 lines
1.1 KiB
PHP

<?php
declare(strict_types=1);
namespace Shimmie2;
class MimeSystemTheme extends Themelet
{
public function get_help_html(): string
{
$mimes = DataHandlerExtension::get_all_supported_mimes();
sort($mimes);
$exts = [];
foreach ($mimes as $mime) {
$exts[] = FileExtension::get_for_mime($mime);
}
$mimes = join("</li><li>", $mimes);
sort($exts);
$exts = join("</li><li>", $exts);
return '<p>Search for posts by extension</p>
<div class="command_example">
<code>ext=jpg</code>
<p>Returns posts with the extension "jpg".</p>
</div>
These extensions are available in the system:
<ul><li>'.$exts.'</li></ul>
<hr/>
<p>Search for posts by MIME type</p>
<div class="command_example">
<code>mime=image/jpeg</code>
<p>Returns posts that have the MIME type "image/jpeg".</p>
</div>
These MIME types are available in the system:
<ul><li>'.$mimes.'</li></ul>
';
}
}