mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-02-21 21:19:36 +01:00
Merge branch 'master' of git://github.com/ctrlcctrlv/infinity
This commit is contained in:
commit
c819a2c9fd
@ -54,7 +54,7 @@ case "check":
|
||||
$query = prepare("DELETE FROM `captchas` WHERE `cookie` = ? AND `extra` = ?");
|
||||
$query->execute([$_GET['cookie'], $_GET['extra']]);
|
||||
|
||||
if ($ary[0]['text'] !== $_GET['text']) {
|
||||
if (strtolower($ary[0]['text']) !== strtolower($_GET['text'])) {
|
||||
echo "0";
|
||||
}
|
||||
else {
|
||||
|
@ -55,6 +55,11 @@ if (isset( $_GET['tags'] ) && $_GET['tags'] != "") {
|
||||
}
|
||||
|
||||
$search['tags'] = array_splice( $search['tags'], 0, 5 );
|
||||
|
||||
foreach ($search['tags'] as &$tag)
|
||||
{
|
||||
$tag = strtolower( $tag );
|
||||
}
|
||||
}
|
||||
|
||||
// What time range?
|
||||
@ -64,7 +69,7 @@ if (isset( $_GET['time'] ) && is_numeric( $_GET['time'] ) ) {
|
||||
|
||||
// Include what in the uri / title / subtitle?
|
||||
if (isset( $_GET['title'] ) && $_GET['title'] != "") {
|
||||
$search['title'] = $_GET['title'];
|
||||
$search['title'] = strtolower( $_GET['title'] );
|
||||
}
|
||||
|
||||
/* Search boards */
|
||||
@ -92,10 +97,10 @@ foreach ($boards as $board) {
|
||||
if (strpos("/{$board['uri']}/", $search['title']) !== false) {
|
||||
$board['weight'] = 30;
|
||||
}
|
||||
else if (strpos($board['title'], $search['title']) !== false) {
|
||||
else if (strpos(strtolower($board['title']), $search['title']) !== false) {
|
||||
$board['weight'] = 20;
|
||||
}
|
||||
else if (strpos($board['subtitle'], $search['title']) !== false) {
|
||||
else if (strpos(strtolower($board['subtitle']), $search['title']) !== false) {
|
||||
$board['weight'] = 10;
|
||||
}
|
||||
else {
|
||||
|
17
faq.php
17
faq.php
@ -70,12 +70,14 @@ $body = <<<EOT
|
||||
<p>Make sure you are using the volunteer interface to view your board. The URL of your browser should be <a href="/mod.php?/yourboard"><tt>https://8ch.net/mod.php?/yourboard</tt></a>.</p>
|
||||
|
||||
<p>If you are the owner of the board, put "## Board Owner" in the name field. If someone else is the owner and you are just assisting them, put "## Board Volunteer" in the name field. Write your post and click "Reply". It will appear with your capcode.</p>
|
||||
<h2>Help! The owner of X board is doing something I don't like!</h2>
|
||||
<p>If they aren't doing anything illegal, I can't help you. I don't dictate how board owners should manage their boards.</p>
|
||||
<p>If they are doing something illegal, email me.</p>
|
||||
|
||||
<h2>Can you give me X board?</h2>
|
||||
<p>If the owner of the board is inactive or the board is broken due to bad CSS, sure. Send me an email. You can see a list of boards that qualify for being taken over <a href="/claim.html">here</a>.</p>
|
||||
<h2>Help! The owner of X board is doing something I don't like! Can I have X board?</h2>
|
||||
<p>If they aren't doing anything illegal, I can't help you. I don't dictate how board owners should manage their boards <a href="http://8archive.moe/meta/thread/18555/#18555">outside of a few conditions</a>:</p>
|
||||
<ol>
|
||||
<li>the board owner nukes the board either by deleting all the posts or banning so much IP space hardly anyone can post</li>
|
||||
<li>the board owner implements CSS which makes posting impossible or very difficult, and someone wants to use the board name for something else</li>
|
||||
<li>the board owner allows illegal content to be posted, or states in the rules that the global rule doesn't apply</li>
|
||||
</ol>
|
||||
<p>If they are, email me.</p>
|
||||
|
||||
<h2>Can you add some new feature?</h2>
|
||||
<p>Open a <a href="https://github.com/ctrlcctrlv/8chan/issues">Github issue</a>. Better yet, write it yourself and open a pull request.
|
||||
@ -164,9 +166,8 @@ Assuming the /b/ board, they are as follows:</p>
|
||||
<p>The current key fingerprint is <tt>6F12 EC72 A82A BCA3 5235 063A 10DD C983 901A A183</tt>.</p>
|
||||
|
||||
<h2>How do I donate?</h2>
|
||||
<p>Donations can be sent to 1NpQaXqmCBji6gfX8UgaQEmEstvVY7U32C (Bitcoin) or LUPgSCJt3iGeJXUETVhmnbQ89Riaq1yjZm (Litecoin).</p>
|
||||
<p>Donations can be sent to 1NpQaXqmCBji6gfX8UgaQEmEstvVY7U32C (Bitcoin) or LgNczzSm64C3BmaXyFVQnM3PvcmSd196f6 (Litecoin).</p>
|
||||
<p>I am also a big fan of Monero (XMR). You can send XMR to our <a href="http://openalias.org">OpenAlias</a> in the simplewallet client, or simply send to 49dBJhGhYFxJEfydS6hH6GRyg1W4cDgupdNVtw7j1WtcUY7xPXwNLw6fUVay644viaCcEhMFG1Z7SjjxRXEFDdNWJdvH9kS.</p>
|
||||
<p>If you would like to support development of the engine that 8chan runs on (infinity), you may also <a href="https://flattr.com/submit/auto?user_id=copypaste&url=https%3A%2F%2F8ch.net%2Finfinity.html" target="_blank"><img src="//button.flattr.com/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0"></a>.</p>
|
||||
<h2>Are you really a cripple?</h2>
|
||||
<p>Yes.</p>
|
||||
<img src="/static/Mamoru.jpg" alt="Mamoru" style="width:128px">
|
||||
|
@ -528,8 +528,14 @@ FLAGS;
|
||||
$force_subject_op = isset($_POST['force_subject_op']) ? 'true' : 'false';
|
||||
$force_flag = isset($_POST['force_flag']) ? 'true' : 'false';
|
||||
$tor_posting = isset($_POST['tor_posting']) ? 'true' : 'false';
|
||||
$tor_image_posting = isset($_POST['tor_image_posting']) ? 'true' : 'false';
|
||||
$new_thread_capt = isset($_POST['new_thread_capt']) ? 'true' : 'false';
|
||||
$oekaki = ($imgboard || $fileboard) && isset($_POST['oekaki']) ? 'true' : 'false';
|
||||
$view_bumplock = isset($_POST['view_bumplock']) ? '-1' : 'MOD';
|
||||
|
||||
if (($tor_image_posting === 'true') && isset($_POST['meta_noindex'])) {
|
||||
error('Please index your board to enable this.');
|
||||
}
|
||||
|
||||
if ($_POST['locale'] !== 'en' && in_array($_POST['locale'], $possible_languages)) {
|
||||
$locale = "\$config['locale'] = '{$_POST['locale']}.UTF-8';";
|
||||
@ -706,12 +712,14 @@ FLAGS;
|
||||
\$config['force_subject_op'] = $force_subject_op;
|
||||
\$config['force_flag'] = $force_flag;
|
||||
\$config['tor_posting'] = $tor_posting;
|
||||
\$config['tor_image_posting'] = $tor_image_posting;
|
||||
\$config['new_thread_capt'] = $new_thread_capt;
|
||||
\$config['hour_max_threads'] = $hour_max_threads;
|
||||
\$config['reply_limit'] = $reply_limit;
|
||||
\$config['max_pages'] = $max_pages;
|
||||
\$config['max_newlines'] = $max_newlines;
|
||||
\$config['oekaki'] = $oekaki;
|
||||
\$config['mod']['view_bumplock'] = $view_bumplock;
|
||||
$code_tags $katex $replace $multiimage $allow_flash $allow_pdf $user_flags
|
||||
$assets
|
||||
$locale
|
||||
@ -735,7 +743,7 @@ EOT;
|
||||
foreach ($matched[0] as $match) {
|
||||
$match_okay = false;
|
||||
foreach ($config['allowed_offsite_urls'] as $allowed_url) {
|
||||
if (strpos($match, $allowed_url) !== false && strpos($match, '#') === false) {
|
||||
if (strpos($match, $allowed_url) !== false && strpos($match, '#') === false && strpos($match, '?') === false && strpos($match, ';') === false) {
|
||||
$match_okay = true;
|
||||
}
|
||||
}
|
||||
|
@ -951,7 +951,9 @@ function fetchBoardActivity( array $uris = array(), $forTime = false, $detailed
|
||||
}
|
||||
|
||||
// Set the active posters as the unserialized array.
|
||||
$boardActivity['active'][$bsRow['stat_uri']] = unserialize( $bsRow['author_ip_array'] );
|
||||
$uns = @unserialize($bsRow['author_ip_array']);
|
||||
if (!$uns) continue;
|
||||
$boardActivity['active'][$bsRow['stat_uri']] = $uns;
|
||||
// Start the average PPH off at the current post count.
|
||||
$boardActivity['average'][$bsRow['stat_uri']] = $bsRow['post_count'];
|
||||
}
|
||||
@ -970,7 +972,9 @@ function fetchBoardActivity( array $uris = array(), $forTime = false, $detailed
|
||||
}
|
||||
|
||||
// Merge our active poster arrays. Unique counting is done below.
|
||||
$boardActivity['active'][$bsRow['stat_uri']] = array_merge( $boardActivity['active'][$bsRow['stat_uri']], unserialize( $bsRow['author_ip_array'] ) );
|
||||
$uns = @unserialize($bsRow['author_ip_array']);
|
||||
if (!$uns) continue;
|
||||
$boardActivity['active'][$bsRow['stat_uri']] = array_merge( $boardActivity['active'][$bsRow['stat_uri']], $uns );
|
||||
// Add our post count to the average. Averaging is done below.
|
||||
$boardActivity['average'][$bsRow['stat_uri']] += $bsRow['post_count'];
|
||||
}
|
||||
@ -1019,7 +1023,7 @@ function fetchBoardTags( $uris ) {
|
||||
$boardTags[ $tagRow['uri'] ] = array();
|
||||
}
|
||||
|
||||
$boardTags[ $tagRow['uri'] ][] = $tag;
|
||||
$boardTags[ $tagRow['uri'] ][] = strtolower( $tag );
|
||||
}
|
||||
}
|
||||
|
||||
@ -2553,7 +2557,7 @@ function strip_combining_chars($str) {
|
||||
$o = 0;
|
||||
$ord = ordutf8($char, $o);
|
||||
|
||||
if ( ($ord >= 768 && $ord <= 879) || ($ord >= 7616 && $ord <= 7679) || ($ord >= 8400 && $ord <= 8447) || ($ord >= 65056 && $ord <= 65071)){
|
||||
if ( ($ord >= 768 && $ord <= 879) || ($ord >= 1750 && $ord <= 1773) || ($ord >= 3655 && $ord <= 3659) || ($ord >= 7616 && $ord <= 7679) || ($ord >= 8400 && $ord <= 8447) || ($ord >= 65056 && $ord <= 65071)){
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@
|
||||
$config['allowed_ext_files'][] = 'mp4';
|
||||
$config['webm']['use_ffmpeg'] = true;
|
||||
$config['webm']['allow_audio'] = true;
|
||||
$config['webm']['max_length'] = 60 * 30;
|
||||
$config['webm']['max_length'] = 60 * 120;
|
||||
|
||||
// Mod shit
|
||||
$config['mod']['groups'][25] = 'GlobalVolunteer';
|
||||
|
6
post.php
6
post.php
@ -449,8 +449,8 @@ elseif (isset($_POST['post'])) {
|
||||
$tor = checkDNSBL();
|
||||
if ($tor && !(isset($_SERVER['HTTP_X_TOR'], $_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] == '127.0.0.2' && $_SERVER['HTTP_X_TOR'] = 'true'))
|
||||
error('To post on 8chan over Tor, you must use the hidden service for security reasons. You can find it at <a href="http://fullchan4jtta4sx.onion">http://fullchan4jtta4sx.onion</a>.');
|
||||
if ($tor && $post['has_file'])
|
||||
error('Sorry. Tor users can\'t upload files.');
|
||||
if ($tor && $post['has_file'] && !$config['tor_image_posting'])
|
||||
error('Sorry. Tor users can\'t upload files on this board.');
|
||||
if ($tor && !$config['tor_posting'])
|
||||
error('Sorry. The owner of this board has decided not to allow Tor posters for some reason...');
|
||||
|
||||
@ -946,7 +946,7 @@ elseif (isset($_POST['post'])) {
|
||||
// Commit the post to the database.
|
||||
$post['id'] = $id = post($post);
|
||||
|
||||
insertFloodPost($post);
|
||||
if (!$tor) insertFloodPost($post);
|
||||
|
||||
// Update statistics for this board.
|
||||
updateStatisticsForPost( $post );
|
||||
|
@ -1657,8 +1657,8 @@ td.board-tags a.tag-link {
|
||||
.announcement {
|
||||
font-size: 75%;
|
||||
padding-bottom: 1%;
|
||||
margin-left: 25%;
|
||||
margin-right: 25%;
|
||||
margin-left: 5%;
|
||||
margin-right: 5%;
|
||||
}
|
||||
|
||||
/* Gallery view */
|
||||
|
@ -1,8 +1,6 @@
|
||||
<form method="POST">
|
||||
<p>{% trans %}Your IP is listed in our DNSBL. To stop attackers, we require users who use certain IP ranges to pass a test which proves they are human every 24 hours.{% endtrans %}</p>
|
||||
<p>{% trans %}Tor users need to fill out the CAPTCHA every 3 hours or 5 posts.{% endtrans %}</p>
|
||||
|
||||
<p>{% trans %}It is also possible that the site is currently under attack and we are requiring everyone to pass the test right now. Sorry for the inconvenience.{% endtrans %}</p>
|
||||
<p>{% trans %}Please fill out the CAPTCHA below to make your post. This is required once every 24 hours for normal users.{% endtrans %}
|
||||
<p>{% trans %}Tor users need to fill out the CAPTCHA every 3 hours or 5 posts, and must have cookies enabled so they can keep the "tor" cookie.{% endtrans %}</p>
|
||||
|
||||
{{ ayah_html|raw }}
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
<p class="unimportant"><em>{% trans %}Flags are likely heavily cached by your browser and the website. Please give them time to update if you change one!{% endtrans %}</em></p>
|
||||
{% for flag, description in config.user_flags %}
|
||||
<tr>
|
||||
<td><input name="delete[]" type="checkbox" value="{{flag}}"></td><td><img src="static/custom-flags/{{board.uri}}/{{flag}}.png"> <input type="file" name="flag-{{ flag }}"></td><td><input type="text" name="description-{{flag}}" value="{{ description|addslashes }}"></td>
|
||||
<td><input name="delete[]" type="checkbox" value="{{flag}}"></td><td><img src="static/custom-flags/{{board.uri}}/{{flag}}.png"> <input type="file" name="flag-{{ flag }}"></td><td><input type="text" name="description-{{flag}}" value="{{ description|e }}"></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
@ -42,7 +42,7 @@
|
||||
<tr><th>{% trans %}Automatically convert ... to …{% endtrans %}</th><td><input type="checkbox" name="auto_unicode" {% if config.auto_unicode %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Disallow combining characters ("Zalgo", Vietnamese text){% endtrans %}</th><td><input type="checkbox" name="strip_combining_chars" {% if config.strip_combining_chars %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}No index{% endtrans %}<br><span class="unimportant">{% trans %}Hide from boards index<br/>and do not index in search engines{% endtrans %}</span></th><td><input type="checkbox" name="meta_noindex" {% if not board.indexed %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Archive my board on 8archive.moe{% endtrans %}<br><span class="unimportant">{% trans %}This archives your board on 8archive.moe if you opt in{% endtrans %}</span></th><td><input type="checkbox" name="8archive" {% if board['8archive'] %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Archive my board on 8archive.moe{% endtrans %}<br><span class="unimportant">{% trans %}This archives your board on 8archive.moe if you opt in (broken at the moment){% endtrans %}</span></th><td><input type="checkbox" name="8archive" {% if board['8archive'] %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}[code] tags{% endtrans %}</th><td><input type="checkbox" name="code_tags" {% if 'js/code_tags/run_prettify.js' in config.additional_javascript %}checked{% endif %}></td></tr>
|
||||
<tr class='imgboard fileboard'><th>{% trans %}Oekaki{% endtrans %}</th><td><input type="checkbox" name="oekaki" {% if config.oekaki %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Format math between $${% endtrans %}</th><td><input type="checkbox" name="katex" {% if config.katex %}checked{% endif %}></td></tr>
|
||||
@ -52,7 +52,9 @@
|
||||
<tr><th>{% trans %}Don't allow users to repost images (whole board){% endtrans %}</th><td><input type="checkbox" name="image_reject_repost" {% if config.image_reject_repost %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Don't allow users to repost images (same thread){% endtrans %}</th><td><input type="checkbox" name="image_reject_repost_in_thread" {% if config.image_reject_repost_in_thread %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Allow a poster to delete his own posts{% endtrans %}</th><td><input type="checkbox" name="allow_delete" {% if config.allow_delete %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Allow posters to post via the Tor onion router{% endtrans %}<br/><span class="unimportant">Disabling this is evil, but if you really care about "ban evasion", here you go.</span></th><td><input type="checkbox" name="tor_posting" {% if config.tor_posting %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Allow posters to see when a thread is bumplocked{% endtrans %}</th><td><input type="checkbox" name="view_bumplock" {% if config.mod.view_bumplock == -1 %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Allow posters to post via the Tor onion router{% endtrans %}</th><td><input type="checkbox" name="tor_posting" {% if config.tor_posting %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Allow posters to post upload files via Tor (trial){% endtrans %}</th><td><input type="checkbox" name="tor_image_posting" {% if config.tor_image_posting %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Enable CAPTCHA{% endtrans %}<br/><span class="unimportant">Users must solve a CAPTCHA in order to post.<br> This is not ReCAPTCHA, it is custom to 8chan.</span></th><td><input type="checkbox" name="captcha" {% if config.captcha.enabled %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Enable CAPTCHA for thread creation only{% endtrans %}<br/><span class="unimportant">Users must solve a CAPTCHA in order to create new threads,<br>but do not have to solve a CAPTCHA in order to post replies.</span></th><td><input type="checkbox" name="new_thread_capt" {% if config.new_thread_capt %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Public bans{% endtrans %}<br><span class="unimportant">{% trans %}Displays your bans for the public{% endtrans %}</span></th><td><input type="checkbox" name="public_bans" {% if board.public_bans %}checked{% endif %}></td></tr>
|
||||
|
@ -12,7 +12,7 @@
|
||||
<img class="icon" title="Locked" src="{{ config.image_locked }}" alt="Locked" />
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if post.bumplocked and (config.mod.view_bumplock < 0 or (post.mod and post.mod|hasPermission(config.mod.view_bumplock, board.uri))) %}
|
||||
{% if post.sage and (config.mod.view_bumplock < 0 or (mod and mod|hasPermission(config.mod.view_bumplock, board.uri))) %}
|
||||
{% if config.font_awesome %}
|
||||
<i class="fa fa-anchor" title="Bumplocked"></i>
|
||||
{% else %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user