Merge pull request #920 from vichan-devel/5.2.1

5.2.1 Release
This commit is contained in:
Lorenzo Yario 2025-04-02 04:45:22 -05:00 committed by GitHub
commit 83b644f0f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 80 additions and 26 deletions

View File

@ -1164,9 +1164,32 @@
'<iframe style="float: left; margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%" frameborder="0" src="https://www.dailymotion.com/embed/video/$2" allowfullscreen></iframe>'
),
array(
'/^https?:\/\/(\w+\.)?metacafe\.com\/watch\/(\d+)\/([a-zA-Z0-9_\-.]+)\/(\?[^\'"<>]+)?$/i',
'<iframe style="float: left; margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%" frameborder="0" src="https://www.metacafe.com/embed/$2/$3/" allowfullscreen></iframe>'
'/^https?:\/\/(www\.)?rumble\.com\/embed\/([a-zA-Z0-9]+)(\/\?[^\'"<>]*)?$/i',
'<iframe class="rumble" width="%%tb_width%%" height="%%tb_height%%" src="https://rumble.com/embed/$2/" frameborder="0" allowfullscreen></iframe>'
),
array(
'/^https?:\/\/(www\.)?bitchute\.com\/(?:video|embed)\/([a-zA-Z0-9]+)(\/)?(\?[^\'"<>]*)?$/i',
'<iframe allowfullscreen="true" width="%%tb_width%%" height="%%tb_height%%" scrolling="no" frameborder="0" style="border: none;" src="https://www.bitchute.com/embed/$2"></iframe>'
),
array(
'/^https?:\/\/(?:www\.)?odysee\.com\/(?:@[^\/]+\/)?([-a-zA-Z0-9_]+:[a-zA-Z0-9]+)(\/)?(\?[^\'"<>]*)?$/i',
'<iframe width="%%tb_width%%" height="%%tb_height%%" src="https://odysee.com/$/embed/$1" allowfullscreen></iframe>'
),
array(
'/^https?:\/\/(www\.)?kick\.com\/([a-zA-Z0-9_]+)(\?[^\'"<>]*)?$/i',
'<iframe src="https://player.kick.com/$2" height="%%tb_height%%" width="%%tb_width%%" frameborder="0" scrolling="no" allowfullscreen="true"></iframe>'
),
/*
//Both TikTok and Instagram are commented out since they contain some extra scripting you might not want natively on your website.
array(
'/^https?:\/\/(www\.)?tiktok\.com\/@([a-zA-Z0-9_.]+)\/video\/([0-9]+)(\?[^\'"<>]*)?$/i',
'<blockquote class="tiktok-embed" cite="https://www.tiktok.com/@$2/video/$3" data-video-id="$3" style="max-width: %%tb_width%%px;min-width: 325px;"><section></section></blockquote><script async src="https://www.tiktok.com/embed.js"></script>'
),
array(
'/^https?:\/\/(www\.)?instagram\.com\/(p|reel|tv)\/([a-zA-Z0-9_-]+)(\/)?(\?[^\'"<>]*)?$/i',
'<blockquote class="instagram-media" data-instgrm-permalink="https://www.instagram.com/$2/$3/" data-instgrm-version="14" style="max-width: %%tb_width%%px; min-width: 326px; width: 100%;"></blockquote><script async src="//www.instagram.com/embed.js"></script>'
),
*/
array(
'/^https?:\/\/(\w+\.)?(vocaroo\.com\/|voca\.ro\/)([a-zA-Z0-9]{2,12})$/i',
'<iframe style="float: left; margin: 10px 20px;" width="300" height="60" frameborder="0" src="https://vocaroo.com/embed/$3"></iframe>'

View File

@ -2643,6 +2643,10 @@ function mod_config(Context $ctx, $board_config = false) {
if ($board_config && !openBoard($board_config))
error($config['error']['noboard']);
else {
include $board_config . '/config.php';;
}
if (!hasPermission($config['mod']['edit_config'], $board_config))
error($config['error']['noaccess']);

View File

@ -1,7 +1,7 @@
<?php
// Installation/upgrade file
define('VERSION', '5.2.0');
define('VERSION', '5.2.1');
require 'inc/bootstrap.php';
loadConfig();

View File

@ -60,8 +60,8 @@ var banlist_init = function(token, my_boards, inMod) {
// duration?
expires: {name: _("Expires"), width: "235px", fmt: function(f) {
if (!f.expires || f.expires == 0) return "<em>"+_("never")+"</em>";
return strftime(window.post_date, new Date((f.expires|0)*1000), datelocale) +
((f.expires < time()) ? "" : " <small>"+_("in ")+until(f.expires|0)+"</small>");
var formattedDate = strftime("%m/%d/%Y (%a) %H:%M:%S", new Date((f.expires|0)*1000), datelocale);
return formattedDate + ((f.expires < time()) ? "" : " <small>"+_("in ")+until(f.expires|0)+"</small>");
} },
username: {name: _("Staff"), width: "100px", fmt: function(f) {
var pre='',suf='',un=f.username;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -1234,12 +1234,35 @@ div.mix {
display: inline-block;
}
.ban-reason-table .warning-reason-table tr td:first-child {
text-align: right;
padding-right: 10px;
.ban-reason-table {
margin: 10px auto;
border-collapse: collapse;
width: auto;
font-size: 10pt;
}
.ban-reason-table .warning-reason-table tr:hover td {
cursor: pointer;
background-color: rgba(100%,100%,100%,0.2);
.ban-reason-table th,
.ban-reason-table td {
border: 1px solid #98E;
padding: 4px 8px;
text-align: left;
}
.ban-reason-table th {
background-color: #98E;
color: black;
font-weight: bold;
}
.ban-reason-table tr:nth-child(even) td {
background-color: #EEF2FF;
}
.ban-reason-table tr:nth-child(odd) td {
background-color: #FFFFFF;
}
.ban-reason-table tr:hover td {
background-color: #D6DAF0;
cursor: pointer;
}

View File

@ -11,7 +11,7 @@
</tr>
<tr>
<th>{% trans 'IP' %}</th>
<td>{{ ban.cmask }}</td>
<td><a class="ip-link" style="margin:0;" href="?/IP/{{ ban.mask|cloak_mask }}">{{ ban.mask|cloak_mask }}</a></td>
</tr>
<tr>
<th>{% trans 'Reason' %}</th>

View File

@ -7,7 +7,7 @@
{% trans 'Username' %}
</th>
<td>
<input type="text" name="username" size="20" maxlength="30" value="{{ username|e }}">
<input type="text" name="username" size="20" maxlength="30" value="{{ username|e }}" autofocus>
</td>
</tr>
<tr>

View File

@ -103,7 +103,7 @@
<fieldset>
<legend>{% trans 'New ban' %}</legend>
{% set redirect = '?/IP/' ~ ip|cloak_ip ~ '#bans' %}
{% include 'mod/ban_form.html' %}
{% include 'mod/ban_form.html' with { 'reasons': config.premade_ban_reasons } %}
</fieldset>
{% endif %}

View File

@ -1,13 +1,13 @@
{% if post.embed %}
{{ post.embed }}
{% else %}
<div class="files">
{% for file in post.files %}
<div class="file{% if post.num_files > 1 %} multifile" style="width:{{ file.thumbwidth + 40 }}px"{% else %}"{% endif %}>
{% else %}
<div class="files {% if post.num_files > 1 %} multifile{% endif %}">
{% for file in post.files %}
<div class="file{% if post.num_files > 1 %} multifile" style="width:{{ file.thumbwidth + 40 }}px"{% else %}"{% endif %}>
{% if file.file == 'deleted' %}
<img class="post-image deleted" src="{{ config.root }}{{ config.image_deleted }}" alt="" />
{% else %}
<p class="fileinfo">File: <a href="{{ config.uri_img }}{{ file.file }}">{{ file.file }}</a> <span class="unimportant">
<p class="fileinfo"><span>File: <a href="{{ config.uri_img }}{{ file.file }}">{{ file.file }}</a></span><span class="unimportant">
(
{% if file.thumb == 'spoiler' %}
{% trans %}Spoiler Image{% endtrans %},
@ -21,18 +21,22 @@
{% endif %}
{% if config.show_filename and file.filename %}
,
{% if file.filename|length > config.max_filename_display %}
<a class="postfilename" href="{{ config.uri_img }}{{ file.file|e|bidi_cleanup }}" download="{{ file.filename|e|bidi_cleanup }}" data-truncate="true" title="{% trans %}Save as original filename{% endtrans %}">{{ file.filename|truncate_filename(config.max_filename_display)|e|bidi_cleanup }}</a>
{% if file.thumb == 'spoiler' %}
<a href="{{ config.uri_img }}{{ file.file|e|bidi_cleanup }}" download="{{ file.filename|e|bidi_cleanup }}" title="{% trans %}Spoiler Image{% endtrans %}">{% trans %}Spoiler Image{% endtrans %}</a>
{% elseif file.filename|length > config.max_filename_display %}
<a href="{{ config.uri_img }}{{ file.file|e|bidi_cleanup }}" download="{{ file.filename|e|bidi_cleanup }}" title="Save as original filename: {{ file.filename|e|bidi_cleanup }}">{{ file.filename|truncate_filename(config.max_filename_display)|e|bidi_cleanup }}</a>
{% else %}
<a class="postfilename" href="{{ config.uri_img }}{{ file.file|e|bidi_cleanup }}" download="{{ file.filename|e|bidi_cleanup }}" title="{% trans %}Save as original filename{% endtrans %}">{{ file.filename|e|bidi_cleanup }}</a>
<a href="{{ config.uri_img }}{{ file.file|e|bidi_cleanup }}" download="{{ file.filename|e|bidi_cleanup }}" title="Save as original filename">{{ file.filename|e|bidi_cleanup }}</a>
{% endif %}
{% endif %}
)
</span>
{% include "post/image_identification.html" %}
{% include "post/file_controls.html" %}</span></p>
{% include "post/file_controls.html" %}
</p>
{% include "post/image.html" with {'post':file} %}
{% endif %}
</div>
{% endfor %}
{% endfor %}
</div>
{% endif %}
{% endif %}