forked from GithubBackups/vichan
Add data-md5 attributes as on 4chan
This commit is contained in:
parent
d398a49fc6
commit
f295d77f2d
@ -29,6 +29,9 @@ function load_twig() {
|
||||
));
|
||||
$twig->addExtension(new Twig_Extensions_Extension_Tinyboard());
|
||||
$twig->addExtension(new Twig_Extensions_Extension_I18n());
|
||||
|
||||
$twig->addFilter(new Twig_SimpleFilter('hex2bin', 'hex2bin'));
|
||||
$twig->addFilter(new Twig_SimpleFilter('base64_encode', 'base64_encode'));
|
||||
}
|
||||
|
||||
function Element($templateFile, array $options) {
|
||||
|
@ -21,6 +21,7 @@
|
||||
{% endif %}
|
||||
"
|
||||
style="width:{{ post.thumbwidth }}px;height:{{ post.thumbheight }}px"
|
||||
data-md5="{{ post.hash|hex2bin|base64_encode }}"
|
||||
>
|
||||
</video>
|
||||
{% else %}
|
||||
@ -40,6 +41,7 @@
|
||||
{% endif %}
|
||||
"
|
||||
style="width:{{ post.thumbwidth }}px;height:{{ post.thumbheight }}px" alt=""
|
||||
data-md5="{{ post.hash|hex2bin|base64_encode }}"
|
||||
/>
|
||||
{% endif %}
|
||||
</a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user