diff --git a/banners.php b/banners.php
deleted file mode 100644
index fd345cc9..00000000
--- a/banners.php
+++ /dev/null
@@ -1,31 +0,0 @@
-fetchAll(PDO::FETCH_ASSOC);
+} else {
+ $newsplus = false;
+}
+
+$searchArray = array(
"config" => $config,
"boards" => $boards,
"tags" => $tags,
@@ -83,25 +90,37 @@ $searchHTML = Element("8chan/boards-search.html", array(
"page_updated" => date('r'),
"html_boards" => $boardsHTML,
- "html_tags" => $tagsHTML
+ "html_tags" => $tagsHTML,
+ "newsplus" => $newsplus
+);
+
+$searchHTML = Element("8chan/boards-index.html", $searchArray);
+
+$pageHTML = Element("page.html", array(
+ "title" => "8chan, the infinitely expanding imageboard",
+ "config" => $config,
+ "body" => $searchHTML,
)
);
-$pageHTML = Element("page.html", array(
- "title" => _("Boardlist"),
+$searchHTML2 = Element("8chan/boards-search.html", $searchArray);
+
+$pageHTML2 = Element("page.html", array(
+ "title" => "Boards on 8chan",
"config" => $config,
- "body" => $searchHTML,
- "title" => _("Boards on ∞chan")
+ "body" => $searchHTML2,
)
);
+
// We only want to cache if this is not a dynamic form request.
// Otherwise, our information will be skewed by the search criteria.
if (php_sapi_name() == 'cli') {
// Preserves the JSON output format of [{board},{board}].
$nonAssociativeBoardList = array_values($response['boardsFull']);
- file_write("boards.html", $pageHTML);
+ file_write("index.html", $pageHTML);
+ file_write("boards.html", $pageHTML2);
file_write("boards.json", json_encode($nonAssociativeBoardList));
$topbar = array();
diff --git a/dnsbls_bypass.php b/dnsbls_bypass.php
index c1954497..479df472 100644
--- a/dnsbls_bypass.php
+++ b/dnsbls_bypass.php
@@ -22,16 +22,16 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
if ($resp === '1') {
$tor = checkDNSBL($_SERVER['REMOTE_ADDR']);
if (!$tor) {
- $query = prepare('INSERT INTO ``dnsbl_bypass`` VALUES(:ip, NOW()) ON DUPLICATE KEY UPDATE `created`=NOW()');
+ $query = prepare('INSERT INTO ``dnsbl_bypass`` VALUES(:ip, NOW(), 0) ON DUPLICATE KEY UPDATE `created`=NOW(),`uses`=0');
$query->bindValue(':ip', $_SERVER['REMOTE_ADDR']);
$query->execute() or error(db_error($query));
- } else {
- $cookie = bin2hex(openssl_random_pseudo_bytes(16));
- $query = prepare('INSERT INTO ``tor_cookies`` VALUES(:cookie, NOW(), 0)');
- $query->bindValue(':cookie', $cookie);
- $query->execute() or error(db_error($query));
- setcookie("tor", $cookie);
}
+ $cookie = bin2hex(openssl_random_pseudo_bytes(16));
+ $query = prepare('INSERT INTO ``tor_cookies`` VALUES(:cookie, NOW(), 0)');
+ $query->bindValue(':cookie', $cookie);
+ $query->execute() or error(db_error($query));
+ setcookie("tor", $cookie, time()+60*60*3);
+
echo Element("page.html", array("config" => $config, "body" => '', "title" => _("Success!"), "subtitle" => _("You may now go back and make your post.")));
} else {
error(_('You failed the CAPTCHA') . _('. Try again. If it\'s not working, email admin@8chan.co for support.'));
diff --git a/faq.php b/faq.php
index 35408d3f..b3245d25 100644
--- a/faq.php
+++ b/faq.php
@@ -50,6 +50,9 @@ $body = <<
More information about US obscenity laws and how they relate to 8chan boards
More information about the Dost test
+ +TL;DR: 8chan considers all nude images of children to be child porn and they will be deleted and the posting address banned if viable.
+Just who is this 8chan person anyway?
You may do this in your board settings, click on "Edit board volunteers".
diff --git a/inc/8chan-mod-config.php b/inc/8chan-mod-config.php
index 962b5a51..1583d033 100644
--- a/inc/8chan-mod-config.php
+++ b/inc/8chan-mod-config.php
@@ -43,6 +43,7 @@
$config['mod']['view_ban'] = BOARDVOLUNTEER;
$config['mod']['reassign_board'] = GLOBALVOLUNTEER;
$config['mod']['move'] = GLOBALVOLUNTEER;
+ $config['mod']['pm_all'] = GLOBALVOLUNTEER;
$config['mod']['shadow_capcode'] = 'Global Volunteer';
// Mod pages assignment
diff --git a/inc/8chan-mod-pages.php b/inc/8chan-mod-pages.php
index 19e5feef..86741811 100644
--- a/inc/8chan-mod-pages.php
+++ b/inc/8chan-mod-pages.php
@@ -68,7 +68,7 @@
$salt = generate_salt();
$hashed = hash('sha256', $salt . sha1($password));
- $query = prepare('UPDATE ``mods`` SET `password` = :hashed, `salt` = :salt WHERE BINARY username = :mod');
+ $query = prepare('UPDATE ``mods`` SET `password` = :hashed, `salt` = :salt, `email` = NULL WHERE BINARY username = :mod');
$query->bindValue(':hashed', $hashed);
$query->bindValue(':salt', $salt);
$query->bindValue(':mod', $mods[0]['username']);
@@ -105,7 +105,7 @@
if (!preg_match('/^[a-zA-Z0-9._]{1,30}$/', $_POST['username']))
error(_('Invalid username'));
- if ($count > 10) {
+ if ($count > 20) {
error(_('Too many board volunteers!'));
}
@@ -219,7 +219,7 @@
if ($size[0] > 20 or $size[0] < 11 or $size[1] > 16 or $size[1] < 11){
error(_('Image wrong size!'));
}
- if (sizeof($banners) > 256) {
+ if (sizeof($banners) > 512) {
error(_('Too many flags.'));
}
@@ -284,7 +284,7 @@ FLAGS;
if (isset($_POST['delete'])){
foreach ($_POST['delete'] as $i => $d){
- if (!preg_match('/[0-9+]/', $d)){
+ if (!preg_match('/^[0-9]+$/', $d)){
error('Nice try.');
}
unlink("$dir/$d.png");
@@ -419,6 +419,9 @@ FLAGS;
function mod_8_banners($b) {
global $config, $mod, $board;
+
+ error('Banner editing is currently disabled. Please check back later!');
+
require_once 'inc/image.php';
if (!hasPermission($config['mod']['edit_banners'], $b))
@@ -468,7 +471,7 @@ FLAGS;
if (isset($_POST['delete'])){
foreach ($_POST['delete'] as $i => $d){
- if (!preg_match('/[0-9+]\.(png|jpeg|jpg|gif)/', $d)){
+ if (!preg_match('/^[0-9]+\.(png|jpeg|jpg|gif)$/', $d)){
error('Nice try.');
}
unlink("$dir/$d");
@@ -757,7 +760,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 && strpos($match, '?') === false && strpos($match, ';') === false) {
+ if (strpos($match, $allowed_url) === 0) {
$match_okay = true;
}
}
diff --git a/inc/config.php b/inc/config.php
index 822c6cb2..c7f3bf41 100644
--- a/inc/config.php
+++ b/inc/config.php
@@ -670,17 +670,19 @@
$config['markup'][] = array(
"/\[(aa|code)\](.+?)\[\/(?:aa|code)\]/ms",
function($matches) {
- $markupchars = array('_', '\'', '~', '*', '=');
+ $markupchars = array('_', '\'', '~', '*', '=', '-');
$replacement = $markupchars;
array_walk($replacement, function(&$v) {
$v = "".ord($v).";";
});
- // These are hacky fixes for ###board-tags### and >quotes.
+ // These are hacky fixes for ###board-tags###, ellipses and >quotes.
$markupchars[] = '###';
$replacement[] = '###';
$markupchars[] = '>';
$replacement[] = '>';
+ $markupchars[] = '...';
+ $replacement[] = '...';
if ($matches[1] === 'aa') {
return '' . str_replace($markupchars, $replacement, $matches[2]) . '';
diff --git a/inc/functions.php b/inc/functions.php
index e866100f..1443ad68 100755
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -121,7 +121,7 @@ function loadConfig() {
}
if (!file_exists('inc/instance-config.php'))
- $error('Tinyboard is not configured! Create inc/instance-config.php.');
+ $error('Posting is down momentarily. Please try again later.');
// Initialize locale as early as possible
@@ -2557,7 +2557,7 @@ function strip_combining_chars($str) {
$o = 0;
$ord = ordutf8($char, $o);
- 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)){
+ if ( ($ord >= 768 && $ord <= 879) || ($ord >= 1536 && $ord <= 1791) || ($ord >= 3655 && $ord <= 3659) || ($ord >= 7616 && $ord <= 7679) || ($ord >= 8400 && $ord <= 8447) || ($ord >= 65056 && $ord <= 65071)){
continue;
}
diff --git a/inc/image.php b/inc/image.php
index 291f3e2a..82cfed33 100644
--- a/inc/image.php
+++ b/inc/image.php
@@ -361,7 +361,7 @@ class ImageConvert extends ImageBase {
escapeshellarg($this->src . '[0]'),
$this->width,
$this->height,
- escapeshellarg($this->temp)))) || !file_exists($this->temp)) {
+ escapeshellarg('jpg:'.$this->temp)))) || !file_exists($this->temp)) {
if (strpos($error, "known incorrect sRGB profile") === false &&
strpos($error, "iCCP: Not recognizing known sRGB profile that has been edited") === false) {
diff --git a/inc/instance-config.php b/inc/instance-config.php
index 2aa2ecf8..335893e1 100644
--- a/inc/instance-config.php
+++ b/inc/instance-config.php
@@ -81,7 +81,7 @@
$config['poster_id_length'] = 6;
$config['ayah_enabled'] = false;
$config['cbRecaptcha'] = true;
- $config['url_banner'] = '/banners.php';
+ $config['url_banner'] = 'https://banners.8ch.net';
$config['additional_javascript_compile'] = true;
//$config['default_stylesheet'] = array('Notsuba', 'notsuba.css');
$config['additional_javascript'][] = 'js/jquery.min.js';
@@ -108,7 +108,6 @@
$config['additional_javascript'][] = 'js/hide-images.js';
$config['additional_javascript'][] = 'js/expand-all-images.js';
$config['additional_javascript'][] = 'js/local-time.js';
- $config['additional_javascript'][] = 'js/no-animated-gif.js';
$config['additional_javascript'][] = 'js/expand.js';
$config['additional_javascript'][] = 'js/auto-reload.js';
$config['additional_javascript'][] = 'js/options/user-css.js';
@@ -166,7 +165,7 @@
$config['markup_paragraphs'] = true;
$config['markup_rtl'] = true;
- $config['boards'] = array(array('' => '/', '' => '/boards.html', '' => '/faq.html', '' => '/random.php', '' => '/create.php', '' => '/bans.html', '' => '/search.php', '' => '/mod.php', '' => 'https://qchat.rizon.net/?channels=#8chan'), array('b', 'n', 'boards'), array('operate', 'meta'), array(''=>'https://twitter.com/infinitechan'));
+ $config['boards'] = array(array(' home' => '/', ' board list' => '/boards.html', ' faq' => '/faq.html', ' random' => '/random.php', ' create' => '/create.php', ' bans' => '/bans.html', ' search' => '/search.php', ' manage' => '/mod.php', ' irc' => 'https://qchat.rizon.net/?channels=#8chan'), array(''=>'https://twitter.com/infinitechan'));
//$config['boards'] = array(array('' => '/', '' => '/boards.html', '' => '/faq.html', '' => '/random.php', '' => '/create.php', '' => '/search.php', '' => '/mod.php', '' => 'https://qchat.rizon.net/?channels=#8chan'), array('b', 'meta', 'int'), array('v', 'a', 'tg', 'fit', 'pol', 'tech', 'mu', 'co', 'sp', 'boards'), array(''=>'https://twitter.com/infinitechan'));
$config['footer'][] = 'All posts on 8chan are the responsibility of the individual poster and not the administration of 8chan, pursuant to 47 U.S.C. § 230.';
@@ -232,6 +231,7 @@ $config['report_captcha'] = true;
$config['no_top_bar_boards'] = false;
$config['page_404'] = 'page_404';
+$config['convert_args'] = '-size %dx%d %s -thumbnail %dx%d -quality 85%% -background \'#d6daf0\' -alpha remove -auto-orient +profile "*" %s';
// Flavor and design.
$config['site_name'] = "∞chan";
diff --git a/inc/locale/messages.mo b/inc/locale/messages.mo
deleted file mode 100644
index 2a796f57..00000000
Binary files a/inc/locale/messages.mo and /dev/null differ
diff --git a/inc/mod/pages.php b/inc/mod/pages.php
index 48864297..44e2a4b2 100644
--- a/inc/mod/pages.php
+++ b/inc/mod/pages.php
@@ -3557,6 +3557,7 @@ function mod_edit_page($id) {
break;
case 'infinity':
$c = $content;
+ $config['max_links'] = PHP_INT_MAX;
markup($content);
$write = $content;
$content = $c;
diff --git a/index.php b/index.php
index 1081ba65..9f570af1 100644
--- a/index.php
+++ b/index.php
@@ -1,5 +1,5 @@
fetchAll(PDO::FETCH_ASSOC);
@@ -10,4 +10,4 @@ if ($query) {
$index = Element("8chan/index.html", array("config" => $config, "newsplus" => $newsplus));
file_write('index.html', $index);
-echo $index;
+echo $index;*/
diff --git a/js/favorites.js b/js/favorites.js
index acef9c7e..e233db4b 100644
--- a/js/favorites.js
+++ b/js/favorites.js
@@ -11,7 +11,7 @@
*/
if (!localStorage.favorites) {
- localStorage.favorites = '[]';
+ localStorage.favorites = '["operate","b"]';
}
function favorite(board) {
diff --git a/js/forced-anon.js b/js/forced-anon.js
index 26d0cb4f..629d2d20 100644
--- a/js/forced-anon.js
+++ b/js/forced-anon.js
@@ -111,10 +111,10 @@ $(document).ready(function() {
$('.poster_id').each(toggle_id);
}
- if(forced_anon) {
+ if (forced_anon) {
enable_fa();
if (window.Options && Options.get_tab('general')) {
- $('#toggle-locked-threads>input').prop('checked', true);
+ $('#forced-anon>input').prop('checked', true);
}
}
diff --git a/js/update_boards.js b/js/update_boards.js
index 31f5407c..8cda77f1 100644
--- a/js/update_boards.js
+++ b/js/update_boards.js
@@ -3,22 +3,21 @@ $(document).ready(function(){
window.boards = new Array();
if (window.Options && Options.get_tab('general')) {
- Options.extend_tab("general", "");
+ Options.extend_tab("general", "");
- if (typeof localStorage.show_top === 'undefined') {
- localStorage.show_top = 'true';
- var show_top = JSON.parse(localStorage.show_top);
- $('#show-top>input').attr('checked', 'checked');
- } else {
- var show_top = JSON.parse(localStorage.show_top);
- if (show_top) $('#show-top>input').attr('checked', 'checked');
+ if (typeof localStorage.show_top_boards === 'undefined') {
+ localStorage.show_top_boards = 'false';
+ var show_top = JSON.parse(localStorage.show_top_boards);
}
+ var show_top = JSON.parse(localStorage.show_top_boards);
+ if (show_top) $('#show_top_boards>input').attr('checked', 'checked');
- $('#show-top>input').on('change', function() {
+
+ $('#show_top_boards>input').on('change', function() {
var show_top = ($(this).is(':checked'));
- localStorage.show_top = JSON.stringify(show_top);
+ localStorage.show_top_boards = JSON.stringify(show_top);
});
}
@@ -28,7 +27,7 @@ function handle_boards(data) {
})
if (boards[0]) {
- $('.sub[data-description="3"]').after(' [ '+boards.slice(0,25).join(" / ")+' ] ');
+ $('.sub[data-description="1"]').after(' [ '+boards.slice(0,25).join(" / ")+' ] ');
}
}
diff --git a/post.php b/post.php
index 3bee1913..3f714bed 100644
--- a/post.php
+++ b/post.php
@@ -5,10 +5,6 @@
require "./inc/functions.php";
require "./inc/anti-bot.php";
-// The dnsbls is an optional DNS blacklist include.
-// Squelch warnings if it doesn't exist.
-@include "./inc/dnsbls.php";
-
// Fix for magic quotes
if (get_magic_quotes_gpc()) {
function strip_array($var) {
@@ -234,6 +230,7 @@ elseif (isset($_POST['post'])) {
// Check if board exists
if (!openBoard($post['board']))
error($config['error']['noboard']);
+
if (!isset($_POST['name']))
$_POST['name'] = $config['anonymous'];
@@ -253,6 +250,12 @@ elseif (isset($_POST['post'])) {
} else
$post['op'] = true;
+ // The dnsbls is an optional DNS blacklist include.
+ // Squelch warnings if it doesn't exist.
+ if (!$config['captcha']['enabled'] && !($post['op'] && $config['new_thread_capt'])) {
+ @include "./inc/dnsbls.php";
+ }
+
// Check if banned
checkBan($board['uri']);
diff --git a/stylesheets/style.css b/stylesheets/style.css
index 3865e3f7..ffa7c731 100644
--- a/stylesheets/style.css
+++ b/stylesheets/style.css
@@ -1250,6 +1250,7 @@ div.mix {
font-family: Mona, "MS PGothic", "MS Pゴシック", sans-serif;
display: block!important;
font-size: 12pt;
+ line-height: 1.1;
}
.dx,
.dy,
diff --git a/templates/8chan/index.html b/templates/8chan/index.html
index caab5157..c06bd151 100644
--- a/templates/8chan/index.html
+++ b/templates/8chan/index.html
@@ -211,9 +211,9 @@
[ /b/ - Random | /n/ - News | /boards/ - Boards]
- {% trans %}Top 25 boards:{% endtrans %}
-
-