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/media/theme.php

30 lines
1.1 KiB
PHP
Raw Normal View History

2020-01-26 13:19:35 +00:00
<?php declare(strict_types=1);
2020-01-26 23:12:48 +00:00
use function MicroHTML\INPUT;
class MediaTheme extends Themelet
{
public function get_buttons_html(int $image_id): string
{
2020-01-26 23:12:48 +00:00
return (string)SHM_SIMPLE_FORM(
2020-01-30 10:31:11 +00:00
"media_rescan/",
2020-01-26 23:12:48 +00:00
INPUT(["type"=>'hidden', "name"=>'image_id', "value"=>$image_id]),
SHM_SUBMIT('Scan Media Properties'),
);
}
public function get_help_html()
{
2020-10-26 15:14:50 +00:00
return '<p>Search for posts based on the type of media.</p>
<div class="command_example">
<pre>content:audio</pre>
2020-10-26 15:14:50 +00:00
<p>Returns posts that contain audio, including videos and audio files.</p>
2020-01-26 23:12:48 +00:00
</div>
<div class="command_example">
<pre>content:video</pre>
2020-10-26 15:14:50 +00:00
<p>Returns posts that contain video, including animated GIFs.</p>
</div>
2020-10-26 15:14:50 +00:00
<p>These search terms depend on the posts being scanned for media content. Automatic scanning was implemented in mid-2019, so posts uploaded before, or posts uploaded on a system without ffmpeg, will require additional scanning before this will work.</p>
';
}
}