diff --git a/public_html/media/css/post-small.css b/public_html/media/css/post-small.css
index 90c2f477..cfc5295a 100644
--- a/public_html/media/css/post-small.css
+++ b/public_html/media/css/post-small.css
@@ -10,7 +10,12 @@
}
.post-type-youtube:after,
-.post-type-flash:after {
+.post-type-swf:after,
+.post-type-mp4:after,
+.post-type-webm:after,
+.post-type-ogg:after,
+.post-type-3gp:after,
+.post-type-flv:after {
position: absolute;
right: 1px; /* border */
top: 1px; /* border */
@@ -19,18 +24,22 @@
content: ' ';
pointer-events: none;
}
-.post-type-flash {
+.post-type-youtube,
+.post-type-swf,
+.post-type-mp4,
+.post-type-webm,
+.post-type-ogg,
+.post-type-3gp,
+.post-type-flv {
border-color: red;
}
-.post-type-youtube {
- border-color: red;
-}
-.post-type-flash:after {
- background: url('../img/thumb-overlay-swf.png');
-}
-.post-type-youtube:after {
- background: url('../img/thumb-overlay-yt.png');
-}
+.post-type-swf:after { background: url('../img/thumb-overlay-swf.png'); }
+.post-type-youtube:after { background: url('../img/thumb-overlay-yt.png'); }
+.post-type-mp4:after { background: url('../img/thumb-overlay-mp4.png'); }
+.post-type-webm:after { background: url('../img/thumb-overlay-webm.png'); }
+.post-type-ogg:after { background: url('../img/thumb-overlay-ogg.png'); }
+.post-type-3gp:after { background: url('../img/thumb-overlay-3gp.png'); }
+.post-type-flv:after { background: url('../img/thumb-overlay-flv.png'); }
.post .toggle-tag {
diff --git a/public_html/media/img/thumb-overlay-3gp.png b/public_html/media/img/thumb-overlay-3gp.png
new file mode 100644
index 00000000..16e5af83
Binary files /dev/null and b/public_html/media/img/thumb-overlay-3gp.png differ
diff --git a/public_html/media/img/thumb-overlay-flv.png b/public_html/media/img/thumb-overlay-flv.png
new file mode 100644
index 00000000..5bae1c2b
Binary files /dev/null and b/public_html/media/img/thumb-overlay-flv.png differ
diff --git a/public_html/media/img/thumb-overlay-mp4.png b/public_html/media/img/thumb-overlay-mp4.png
new file mode 100644
index 00000000..49f2aaf0
Binary files /dev/null and b/public_html/media/img/thumb-overlay-mp4.png differ
diff --git a/public_html/media/img/thumb-overlay-ogg.png b/public_html/media/img/thumb-overlay-ogg.png
new file mode 100644
index 00000000..da892f6b
Binary files /dev/null and b/public_html/media/img/thumb-overlay-ogg.png differ
diff --git a/public_html/media/img/thumb-overlay-swf.png b/public_html/media/img/thumb-overlay-swf.png
index dc3de9f8..11ffacc0 100644
Binary files a/public_html/media/img/thumb-overlay-swf.png and b/public_html/media/img/thumb-overlay-swf.png differ
diff --git a/public_html/media/img/thumb-overlay-webm.png b/public_html/media/img/thumb-overlay-webm.png
new file mode 100644
index 00000000..135c9ac5
Binary files /dev/null and b/public_html/media/img/thumb-overlay-webm.png differ
diff --git a/public_html/media/img/thumb-overlay-yt.png b/public_html/media/img/thumb-overlay-yt.png
index c29d0d00..601a2b9b 100644
Binary files a/public_html/media/img/thumb-overlay-yt.png and b/public_html/media/img/thumb-overlay-yt.png differ
diff --git a/src/Helpers/TextHelper.php b/src/Helpers/TextHelper.php
index e07a0f53..30b212e1 100644
--- a/src/Helpers/TextHelper.php
+++ b/src/Helpers/TextHelper.php
@@ -346,7 +346,13 @@ class TextHelper
'image/jpeg' => 'jpg',
'image/gif' => 'gif',
'image/png' => 'png',
- 'application/x-shockwave-flash' => 'swf'];
+ 'application/x-shockwave-flash' => 'swf',
+ 'video/mp4' => 'mp4',
+ 'video/webm' => 'webm',
+ 'video/ogg' => 'ogg',
+ 'application/ogg' => 'ogg',
+ 'video/x-flv' => 'flv',
+ 'video/3gpp' => '3gp'];
return isset($mimeTypes[$mimeType])
? $mimeTypes[$mimeType]
: null;
diff --git a/src/Models/SearchParsers/PostSearchParser.php b/src/Models/SearchParsers/PostSearchParser.php
index 162bf06a..46edd9ae 100644
--- a/src/Models/SearchParsers/PostSearchParser.php
+++ b/src/Models/SearchParsers/PostSearchParser.php
@@ -192,6 +192,8 @@ class PostSearchParser extends AbstractSearchParser
$type = PostType::Flash;
elseif ($value == 'img')
$type = PostType::Image;
+ elseif ($value == 'video' or in_array($value, ['mp4', 'webm', 'ogg', '3gp', 'ogg']))
+ $type = PostType::Video;
elseif ($value == 'yt' or $value == 'youtube')
$type = PostType::Youtube;
else
diff --git a/src/Views/post-small.phtml b/src/Views/post-small.phtml
index 59761bc4..d52faf15 100644
--- a/src/Views/post-small.phtml
+++ b/src/Views/post-small.phtml
@@ -4,7 +4,8 @@ CustomAssetViewDecorator::addStylesheet('post-small.css');
$classNames =
[
'post',
- 'post-type-' . TextHelper::camelCaseToHumanCase(PostType::toString($this->context->post->type))
+ 'post-type-' .(TextHelper::resolveMimeType($this->context->post->mimeType) ?:
+ TextHelper::camelCaseToHumanCase(PostType::toString($this->context->post->type))),
];
$masstag = (isset($this->context->source)