Merge branch 'config' into display-appeal-src-ip

This commit is contained in:
Zankaria 2024-04-24 13:03:31 +00:00
commit 5f1f7319a3
211 changed files with 697 additions and 494 deletions

View file

@ -1,7 +1,8 @@
{% filter remove_whitespace %}
{# Automatically removes unnecessary whitespace #}
<div class="ban">
<iframe width="420" height="315" src="https://www.youtube.com/embed/FXPKJUE86d0" frameborder="0" allowfullscreen></iframe>
<img style="display:block;margin-left:auto;margin-right:auto;" width="420" height="600" src="static/banned.jpg" alt="Purge list: you">
<br>
{% if ban.expires and time() >= ban.expires %}
<h2>{% trans %}You were banned! ;_;{% endtrans %}</h2>
{% else %}
@ -30,8 +31,8 @@
</p>
{% endif %}
<p>
{% trans %}Your ban was filed on{% endtrans %}
<strong>{{ ban.created|date(config.ban_date) }}</strong>
{% trans %}Your ban was filed on{% endtrans %}
<strong> {{ ban.created|date(config.ban_date) }}</strong>
{% if config.show_modname %}
{% if ban.username %}
{% trans %}by{% endtrans %} <strong> {{ ban.username }} </strong>
@ -39,14 +40,12 @@
{% trans %}by{% endtrans %} <em> 'system' </em>
{% endif %}
{% endif %}
{% trans %}and{% endtrans %} <span id="expires">
{% trans %}and{% endtrans %} <span id="expires">
{% if ban.expires and time() >= ban.expires %}
{% trans %} has since expired. Refresh the page to continue.{% endtrans %}
{% elseif ban.expires %}
{% trans %}expires{% endtrans %} <span id="countdown">{{ ban.expires|until }}</span> {% trans %}from now, which is on{% endtrans %}
<strong>
{{ ban.expires|date(config.ban_date) }}
</strong>
{% trans %}expires{% endtrans %} <span id="countdown">{{ ban.expires|until }}</span> {% trans %}from now, which is on{% endtrans %}
<strong> {{ ban.expires|date(config.ban_date) }} </strong>
<script>
var secondsLeft = {{ ban.expires - time() }};
var end = new Date().getTime() + secondsLeft*1000;
@ -75,7 +74,7 @@
}
}
var countdown = document.getElementById("countdown");
updateExpiresTime();
var int = setInterval(updateExpiresTime, 1000);
</script>
@ -85,30 +84,31 @@
</span>
</p>
<p>{% trans %}Your IP address is{% endtrans %} <strong>{{ ban.ip }}</strong>.</p>
<p>{% trans %}Your ban ID is{% endtrans %} <strong>{{ ban.id }}</strong>.</p>
{% if config.ban_page_extra %}
<p>{{ config.ban_page_extra }}</p>
{% endif %}
{% if post and config.ban_show_post %}
<hr>
<p>{% trans %}You were banned for the following post on{% endtrans %} {{ board.url }}:</p>
{{ post }}
<br>
{% endif %}
{% if config.ban_appeals and (not ban.expires or ban.expires - ban.created > config.ban_appeals_min_length )%}
<hr>
{% if pending_appeal %}
<p>
{% trans %}You submitted an appeal for this ban on{% endtrans %}
{% trans %}You submitted an appeal for this ban on{% endtrans %}
<strong>{{ pending_appeal|date(config.ban_date) }}</strong>. {% trans %}It is still pending{% endtrans %}.
</p>
{% elseif denied_appeals|length >= config.ban_appeals_max %}
{% if denied_appeals|length == 1 %}
<p>
{% trans %}You appealed this ban on{% endtrans %}
<strong>{{ denied_appeals[0]|date(config.ban_date) }}</strong>
{% trans %}You appealed this ban on{% endtrans %}
<strong>{{ denied_appeals[0]|date(config.ban_date) }}</strong>
{% trans %}and it was denied. You may not appeal this ban again.{% endtrans %}
</p>
{% else %}
@ -118,15 +118,15 @@
{% if denied_appeals|length %}
{% if denied_appeals|length == 1 %}
<p>
{% trans %}You appealed this ban on{% endtrans %}
<strong>{{ denied_appeals[0]|date(config.ban_date) }}</strong>
{% trans %}You appealed this ban on{% endtrans %}
<strong>{{ denied_appeals[0]|date(config.ban_date) }}</strong>
{% trans %}and it was denied.{% endtrans %}
</p>
<p>{% trans %}You may appeal this ban again. Please enter your reasoning below.{% endtrans %}</p>
{% else %}
<p>
{% trans %}You last appealed this ban on{% endtrans %}
<strong>{{ denied_appeals[denied_appeals|length - 1]|date(config.ban_date) }}</strong>
{% trans %}You last appealed this ban on{% endtrans %}
<strong>{{ denied_appeals[denied_appeals|length - 1]|date(config.ban_date) }}</strong>
{% trans %}and it was denied.{% endtrans %}
</p>
<p>{% trans %}You may appeal this ban again. Please enter your reasoning below.{% endtrans %}</p>

View file

@ -31,10 +31,10 @@
<title>{{ board.url }} - {{ board.title|e }}{% if page_num %} - Page {{ page_num }}{% endif %}</title>
</head>
<body class="8chan vichan {% if mod %}is-moderator{% else %}is-not-moderator{% endif %} active-{% if not no_post_form %}index{% else %}ukko{% endif %}" data-stylesheet="{% if config.default_stylesheet.1 != '' %}{{ config.default_stylesheet.1 }}{% else %}default{% endif %}">
<div class="bar top">
<div id="top-hud" class="bar top">
{{ boardlist.top }}
</div>
{% if pm %}<div class="top_notice">You have <a href="?/PM/{{ pm.id }}">an unread PM</a>{% if pm.waiting > 0 %}, plus {{ pm.waiting }} more waiting{% endif %}.</div><hr />{% endif %}
{% if config.url_banner %}<img class="board_image" src="{{ config.url_banner }}" {% if config.banner_width or config.banner_height %}style="{% if config.banner_width %}width:{{ config.banner_width }}px{% endif %};{% if config.banner_width %}height:{{ config.banner_height }}px{% endif %}" {% endif %}alt="" />{% endif %}
<div id="pagewrap">
@ -96,8 +96,8 @@
{{ body }}
{% include 'report_delete.html' %}
</form>
{{ boardlist.bottom }}
{{ config.ad.bottom }}
@ -105,8 +105,8 @@
<footer>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p class="unimportant" style="margin-top:20px;text-align:center;">- <a href="https://github.com/savetheinternet/Tinyboard">Tinyboard</a> +
<a href='https://github.com/vichan-devel/vichan'>vichan</a> +
<p class="unimportant" style="margin-top:20px;text-align:center;">- <a href="https://github.com/savetheinternet/Tinyboard">Tinyboard</a> +
<a href='https://github.com/vichan-devel/vichan'>vichan</a> +
<a href='https://github.com/lainchan/lainchan'>lainchan</a> {{ config.version }} -
<br><a href="https://github.com/savetheinternet/Tinyboard">Tinyboard</a> Copyright &copy; 2010-2014 Tinyboard Development Group
<br><a href="https://github.com/vichan-devel/vichan">vichan</a> Copyright &copy; 2012-2016 vichan-devel
@ -116,7 +116,7 @@
</footer>
</div>
<div class="bar bottom">
<div id="bottom-hud" class="bar bottom">
<div class="pages">
{{ btn.prev }} [ {% for page in pages %}
<a {% if page.selected %}class="selected"{% endif %}{% if not page.selected %}href="{{ page.link }}"{% endif %}>{{ page.num }}</a>{% if not loop.last %} /{% endif %}
@ -135,7 +135,6 @@
<script type="text/javascript">{% raw %}
ready();
{% endraw %}</script>
</body>
</html>

View file

@ -45,7 +45,7 @@ function ago($timestamp) {
switch(true){
case ($difference < 60) :
return "" + $difference + ' ' + _('second(s)');
case ($difference < 3600): //60*60 = 3600
case ($difference < 3600): //60*60 = 3600
return "" + ($num = Math.round($difference/(60))) + ' ' + _('minute(s)');
case ($difference < 86400): //60*60*24 = 86400
return "" + ($num = Math.round($difference/(3600))) + ' ' + _('hour(s)');
@ -136,7 +136,7 @@ function changeStyle(styleName, link) {
localStorage.stylesheet = styleName;
{% endif %}
{% raw %}
// Main stylesheet
if (!document.getElementById('stylesheet')) {
var s = document.createElement('link');
@ -161,18 +161,18 @@ function changeStyle(styleName, link) {
}
document.getElementById('code_stylesheet').href = codestyles[styleName];
if (document.getElementsByClassName('styles').length != 0) {
var styleLinks = document.getElementsByClassName('styles')[0].childNodes;
for (var i = 0; i < styleLinks.length; i++) {
styleLinks[i].className = '';
}
}
if (link) {
link.className = 'selected';
}
if (typeof $ != 'undefined')
$(window).trigger('stylesheet', styleName);
}
@ -181,11 +181,11 @@ function changeStyle(styleName, link) {
{% endraw %}
{% if config.stylesheets_board %}
{% raw %}
if (!localStorage.board_stylesheets) {
localStorage.board_stylesheets = '{}';
}
var stylesheet_choices = JSON.parse(localStorage.board_stylesheets);
if (board_name && stylesheet_choices[board_name]) {
for (var styleName in styles) {
@ -213,7 +213,7 @@ function changeStyle(styleName, link) {
function init_stylechooser() {
var newElement = document.createElement('div');
newElement.className = 'styles';
for (styleName in styles) {
var style = document.createElement('a');
style.innerHTML = '[' + styleName + ']';
@ -225,9 +225,9 @@ function init_stylechooser() {
}
style.href = 'javascript:void(0);';
newElement.appendChild(style);
}
document.getElementsByTagName('body')[0].insertBefore(newElement, document.getElementsByTagName('body')[0].lastChild.nextSibling);
}
document.getElementById('bottom-hud').before(newElement);
}
function get_cookie(cookie_name) {
@ -243,7 +243,7 @@ function highlightReply(id) {
// don't highlight on middle click
return true;
}
var divs = document.getElementsByTagName('div');
for (var i = 0; i < divs.length; i++)
{
@ -279,10 +279,10 @@ function dopost(form) {
if (form.elements['email'] && form.elements['email'].value != 'sage') {
localStorage.email = form.elements['email'].value;
}
saved[document.location] = form.elements['body'].value;
sessionStorage.body = JSON.stringify(saved);
return form.elements['body'].value != "" || (form.elements['file'] && form.elements['file'].value != "") || (form.elements.file_url && form.elements['file_url'].value != "");
}
@ -301,7 +301,7 @@ function citeReply(id, with_link) {
var textarea = document.getElementById('body');
if (!textarea) return false;
if (document.selection) {
// IE
textarea.focus();
@ -311,7 +311,7 @@ function citeReply(id, with_link) {
var start = textarea.selectionStart;
var end = textarea.selectionEnd;
textarea.value = textarea.value.substring(0, start) + '>>' + id + '\n' + textarea.value.substring(end, textarea.value.length);
textarea.selectionStart += ('>>' + id).length + 1;
textarea.selectionEnd = textarea.selectionStart;
} else {
@ -344,15 +344,15 @@ function rememberStuff() {
localStorage.password = generatePassword();
document.forms.post.password.value = localStorage.password;
}
if (localStorage.name && document.forms.post.elements['name'])
document.forms.post.elements['name'].value = localStorage.name;
if (localStorage.email && document.forms.post.elements['email'])
document.forms.post.elements['email'].value = localStorage.email;
if (window.location.hash.indexOf('q') == 1)
citeReply(window.location.hash.substring(2), true);
if (sessionStorage.body) {
var saved = JSON.parse(sessionStorage.body);
if (get_cookie('{% endraw %}{{ config.cookies.js }}{% raw %}')) {
@ -362,14 +362,14 @@ function rememberStuff() {
saved[url] = null;
}
sessionStorage.body = JSON.stringify(saved);
document.cookie = '{% endraw %}{{ config.cookies.js }}{% raw %}={};expires=0;path=/;';
}
if (saved[document.location]) {
document.forms.post.body.value = saved[document.location];
}
}
if (localStorage.body) {
document.forms.post.body.value = localStorage.body;
localStorage.body = '';
@ -391,14 +391,14 @@ var script_settings = function(script_name) {
function init() {
init_stylechooser();
{% endraw %}
{% endraw %}
{% if config.allow_delete %}
if (document.forms.postcontrols) {
document.forms.postcontrols.password.value = localStorage.password;
}
{% endif %}
{% raw %}
if (window.location.hash.indexOf('q') != 1 && window.location.hash.substring(1))
highlightReply(window.location.hash.substring(1));
}
@ -436,4 +436,3 @@ sc.innerHTML = 'var sc_project={{ config.statcounter_project }};var sc_invisible
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(sc, s);
{% endif %}

View file

@ -11,7 +11,9 @@
<title>{{ title }}</title>
</head>
<body class="8chan vichan {% if mod %}is-moderator{% else %}is-not-moderator{% endif %} active-page" data-stylesheet="{% if config.default_stylesheet.1 != '' %}{{ config.default_stylesheet.1 }}{% else %}default{% endif %}">
{{ boardlist.top }}
<div id="top-hud">
{{ boardlist.top }}
</div>
{% if pm %}<div class="top_notice">You have <a href="?/PM/{{ pm.id }}">an unread PM</a>{% if pm.waiting > 0 %}, plus {{ pm.waiting }} more waiting{% endif %}.</div><hr>{% endif %}
<header>
@ -26,8 +28,8 @@
{{ body }}
<hr>
<footer>
<p class="unimportant" style="margin-top:20px;text-align:center;">- <a href="https://github.com/savetheinternet/Tinyboard">Tinyboard</a> +
<a href='https://github.com/vichan-devel/vichan'>vichan</a> +
<p class="unimportant" style="margin-top:20px;text-align:center;">- <a href="https://github.com/savetheinternet/Tinyboard">Tinyboard</a> +
<a href='https://github.com/vichan-devel/vichan'>vichan</a> +
<a href='https://github.com/lainchan/lainchan'>lainchan</a> {{ config.version }} -
<br><a href="https://github.com/savetheinternet/Tinyboard">Tinyboard</a> Copyright &copy; 2010-2014 Tinyboard Development Group
<br><a href="https://github.com/vichan-devel/vichan">vichan</a> Copyright &copy; 2012-2016 vichan-devel
@ -35,6 +37,7 @@
</footer>
<div class="pages"></div>
<div id="bottom-hud"></div>
<script type="text/javascript">{% raw %}
ready();
{% endraw %}</script>

View file

@ -113,6 +113,7 @@
<li>BMP Files</li>
<li>GIF Files</li>
<li>PNG Files</li>
<li>WEBP Files</li>
<li>MP3 Files</li>
<li>MP4 Files (Supports thumbnail) </li>
<li>WEBM Files (Supports thumbnail) </li>

View file

@ -29,7 +29,7 @@
<title>{{ board.url }} - {{ meta_subject }}</title>
</head>
<body id="thread" class="8chan vichan {% if mod %}is-moderator{% else %}is-not-moderator{% endif %} active-thread" data-stylesheet="{% if config.default_stylesheet.1 != '' %}{{ config.default_stylesheet.1 }}{% else %}default{% endif %}">
<div class="bar top">
<div id="top-hud" class="bar top">
{{ boardlist.top }}
</div>
<a name="top"></a>
@ -67,9 +67,9 @@
<form name="postcontrols" action="{{ config.post_url }}" method="post">
<input type="hidden" name="board" value="{{ board.uri }}" />
{% if mod %}<input type="hidden" name="mod" value="1" />{% endif %}
{{ body }}
<div id="thread-interactions">
<span id="thread-links">
<a id="thread-return" href="{{ return }}">[{% trans %}Return{% endtrans %}]</a>
@ -81,24 +81,24 @@
| <a id="thread-home" href="{{ config.root }}">[{% trans %}Home{% endtrans %}]</a>
{% endif %}
</span>
<span id="thread-quick-reply">
<a id="link-quick-reply" href="#">[{% trans %}Post a Reply{% endtrans %}]</a>
</span>
{% include 'report_delete.html' %}
</div>
<div class="clearfix"></div>
</form>
{{ boardlist.bottom }}
{{ config.ad.bottom }}
<footer>
<p class="unimportant" style="margin-top:20px;text-align:center;">- <a href="https://github.com/savetheinternet/Tinyboard">Tinyboard</a> +
<a href='https://github.com/vichan-devel/vichan'>vichan</a> +
<p class="unimportant" style="margin-top:20px;text-align:center;">- <a href="https://github.com/savetheinternet/Tinyboard">Tinyboard</a> +
<a href='https://github.com/vichan-devel/vichan'>vichan</a> +
<a href='https://github.com/lainchan/lainchan'>lainchan</a> {{ config.version }} -
<br><a href="https://github.com/savetheinternet/Tinyboard">Tinyboard</a> Copyright &copy; 2010-2014 Tinyboard Development Group
<br><a href="https://github.com/vichan-devel/vichan">vichan</a> Copyright &copy; 2012-2016 vichan-devel
@ -106,7 +106,7 @@
{% for footer in config.footer %}<p class="unimportant" style="text-align:center;">{{ footer }}</p>{% endfor %}
</footer>
</div>
<div class="bar bottom">
<div id="bottom-hud" class="bar bottom">
<div class="threadlinks">
<span class="threadlink">[ <a href="{{ return }}">{% trans %}Return{% endtrans %}</a> /</span>
<span class="threadlink"><a href="#" style="padding-left: 10px"> {% trans %}Go to top{% endtrans %}</a> /</span>